Pl global option

[edit] Please Note

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

(Difference between revisions)
Line 46: Line 46:
 
----
 
----
  
 +
[[Category:Draft]]
 
[[Category:New Page]]
 
[[Category:New Page]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Revision as of 21:13, 9 March 2012

Contents

Description

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' ) );

Source File

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