Advertisement
Guest User

optiontree

a guest
Feb 6th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. if ( function_exists( 'ot_register_settings' ) && OT_USE_THEME_OPTIONS ) {
  2.  
  3. ot_register_settings( array(
  4. array(
  5. 'id' => ot_options_id(),
  6. 'pages' => array(
  7. array(
  8. 'id' => 'ot_theme_options',
  9. 'parent_slug' => apply_filters( 'ot_theme_options_parent_slug', 'themes.php' ),
  10. 'page_title' => apply_filters( 'ot_theme_options_page_title', __( 'Theme Options', 'option-tree' ) ),
  11. 'menu_title' => apply_filters( 'ot_theme_options_menu_title', __( 'Theme Options', 'option-tree' ) ),
  12. 'capability' => $caps = apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ),
  13. 'menu_slug' => apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ),
  14. 'icon_url' => apply_filters( 'ot_theme_options_icon_url', null ),
  15. 'position' => apply_filters( 'ot_theme_options_position', null ),
  16. 'updated_message' => apply_filters( 'ot_theme_options_updated_message', __( 'Theme Options updated.', 'option-tree' ) ),
  17. 'reset_message' => apply_filters( 'ot_theme_options_reset_message', __( 'Theme Options reset.', 'option-tree' ) ),
  18. 'button_text' => apply_filters( 'ot_theme_options_button_text', __( 'Save Changes', 'option-tree' ) ),
  19. 'contextual_help' => apply_filters( 'ot_theme_options_contextual_help', $contextual_help ),
  20. 'sections' => apply_filters( 'ot_theme_options_sections', $sections ),
  21. 'settings' => apply_filters( 'ot_theme_options_settings', $settings )
  22. )
  23. )
  24. )
  25. )
  26. );
  27.  
  28. // Filters the options.php to add the minimum user capabilities.
  29. add_filter( 'option_page_capability_' . ot_options_id(), create_function( '$caps', "return '$caps';" ), 999 );
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement