optionsframework_add_admin

The ColorWay Theme optionsframework add admin function.

Description

optionsframework_add_admin(); 

Usage

  1. if ( !function_exists( 'optionsframework_add_admin' ) ) { 
  2. require_once '/functions/admin-interface.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = optionsframework_add_admin(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/functions/admin-interface.php  
  1. function optionsframework_add_admin() { 
  2.  
  3. global $query_string; 
  4.  
  5. $themename = get_option('of_themename');  
  6. $shortname = get_option('of_shortname');  
  7.  
  8. if ( isset($_REQUEST['page']) && $_REQUEST['page'] == 'optionsframework' ) { 
  9. if (isset($_REQUEST['of_save']) && 'reset' == $_REQUEST['of_save']) { 
  10. $options = get_option('of_template');  
  11. of_reset_options($options, 'optionsframework'); 
  12. header("Location: admin.php?page=optionsframework&reset=true"); 
  13. die; 
  14.  
  15.  
  16. $of_page = add_theme_page($themename, 'Theme Options', 'edit_theme_options', 'optionsframework', 'optionsframework_options_page', 'div'); 
  17.  
  18. // Add framework functionaily to the head individually 
  19. add_action("admin_print_scripts-$of_page", 'of_load_only'); 
  20. }