27 Jul

Options Page Add-on v1.2.0 released

By Elliot Condon

This new version for the Options page add-on adds a new parameter and function to control the menu names.

Previously, the menu text was dictated by the parent or sub options page title. Now, however, you can set 2 different values for both menu and title.

There is also a new function to customize the parent menu name!

New: acf_set_options_page_menu()

/*
*  acf_set_options_page_menu
*
*  this function is used to customize the options page admin menu name
*
*  @type	function
*  @date	13/07/13
*
*  @param	{string}	$title
*  @return	N/A
*/

acf_set_options_page_menu( __('Options') );

Updated: acf_add_options_sub_page()

/*
*  acf_add_options_sub_page
*
*  this function is used to add a sub page to the options page menu
*
*  @type    function
*  @date    13/07/13
*
*  @param    {mixed}    $page    either a string for the sub page title, or an array with more information. 
*                            The array can contain the following args:
*                            + {string} title - required
*							 + {string} menu - not required
*                            + {string} slug - not required
*                            + {string} parent - not required
*                            + {string} capability - not required
*  @return    N/A
*/

acf_add_options_sub_page(array(
    'title' => 'Global Options for theme',
    'menu' => 'Global',
));

 

About the Author