Last active
December 16, 2016 16:28
-
-
Save zgurya/880f06c1f70b29c33a4f61c21e6d02d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Add options page | |
*/ | |
if( function_exists('acf_add_options_page') ) { | |
$option_page = acf_add_options_page(array( | |
'menu_title' => __('Theme options','textdomain'), | |
'menu_slug' => 'mytheme-settings', | |
'capability' => 'edit_posts', | |
'redirect' => true | |
)); | |
acf_add_options_sub_page(array( | |
'page_title' => __('General options','textdomain'), | |
'menu_title' => __('General options','textdomain'), | |
'menu_slug' => 'mytheme-settings-general', | |
'capability' => 'edit_posts', | |
'parent_slug' => $option_page['menu_slug'] | |
)); | |
acf_add_options_sub_page(array( | |
'page_title' => __('Additional options','textdomain'), | |
'menu_title' => __('Additional options','textdomain'), | |
'menu_slug' => 'mytheme-settings-additional', | |
'capability' => 'edit_posts', | |
'parent_slug' => $option_page['menu_slug'] | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment