Pl global option

[edit] Please Note

These docs are now deprecated, we have a new Support area located here

Revision as of 19:31, 26 March 2012 by Cais (Talk | contribs)

Function

pl_global_option adds an option or array of options into the main global PageLines Settings area.

Usage

Parameters

$args

  • menu - Menu slug.
  • options - Array
  • location - string - top|bottom|before|after
  • option - string - Which option to be before/after if location is set.

Examples

All examples will use the following basic array option

$options = array(
	'foo_field'		=> array(
		'default'	=> '',
		'type'		=> 'text',
		'title'		=> __('Foo', 'pagelines'),
		'inputlabel'=> __('More Foo', 'pagelines'),
		'shortexp'	=> __('Foo foo foo foo.', 'pagelines'),
	),
);

Defaults

This example will add a new Custom menus and use the $options array to populate it.

pl_global_option( array( 'options' => $options ) );

Add to existing menus with positioning

pl_global_option( array( 'menu' => 'website_setup', 'options' => $options, 'location' => 'top' ) );


pl_global_option( array( 'menu' => 'website_setup', 'options' => $options, 'location' => 'bottom' ) );

Add to existing menus before a setting

pl_global_option( array( 'menu' => 'website_setup', 'options' => $options, 'location' => 'before', 'option' => 'pagelines_favicon' ) );

Resources

Changelog

Since 2.2

Source File

pl_global_option() is located in includes/library.layout.php