Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( function_exists( 'ot_register_settings' ) && OT_USE_THEME_OPTIONS ) {
- ot_register_settings( array(
- array(
- 'id' => ot_options_id(),
- 'pages' => array(
- array(
- 'id' => 'ot_theme_options',
- 'parent_slug' => apply_filters( 'ot_theme_options_parent_slug', 'themes.php' ),
- 'page_title' => apply_filters( 'ot_theme_options_page_title', __( 'Theme Options', 'option-tree' ) ),
- 'menu_title' => apply_filters( 'ot_theme_options_menu_title', __( 'Theme Options', 'option-tree' ) ),
- 'capability' => $caps = apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ),
- 'menu_slug' => apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ),
- 'icon_url' => apply_filters( 'ot_theme_options_icon_url', null ),
- 'position' => apply_filters( 'ot_theme_options_position', null ),
- 'updated_message' => apply_filters( 'ot_theme_options_updated_message', __( 'Theme Options updated.', 'option-tree' ) ),
- 'reset_message' => apply_filters( 'ot_theme_options_reset_message', __( 'Theme Options reset.', 'option-tree' ) ),
- 'button_text' => apply_filters( 'ot_theme_options_button_text', __( 'Save Changes', 'option-tree' ) ),
- 'contextual_help' => apply_filters( 'ot_theme_options_contextual_help', $contextual_help ),
- 'sections' => apply_filters( 'ot_theme_options_sections', $sections ),
- 'settings' => apply_filters( 'ot_theme_options_settings', $settings )
- )
- )
- )
- )
- );
- // Filters the options.php to add the minimum user capabilities.
- add_filter( 'option_page_capability_' . ot_options_id(), create_function( '$caps', "return '$caps';" ), 999 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement