__( 'Information', pls_get_textdomain() ), 'type' => 'heading' ); $options[] = array( 'name' => __( 'Information', pls_get_textdomain() ), 'desc' => __( 'Looks like you activated the theme options. To jump into using them you need to create an options.php file in you theme root directory. That file needs to contain a optionsframework_options() function that returns the option array. Check out our documentation for more information.', pls_get_textdomain() ), 'type' => 'info' ); return $options; } } } /** * Add an admin bar item. * * Its name can be filtered using "pls_admin_bar_menu_page". */ static function adminbar() { global $wp_admin_bar; /** Add filtering for the name of options page. */ $page_name = apply_filters( 'pls_admin_bar_menu_page', __( 'Theme Options', pls_get_textdomain() ) ); // Commented out for WordPress theme submission // $wp_admin_bar->add_menu( array( // 'id' => 'of_theme_options', // 'title' => $page_name, // 'href' => admin_url( 'admin.php?page=pls-theme-options' ) // )); } /** * Add a menu page called "Theme Options". * * Its title can be filtered using "pls_theme_options_menu_page_title". */ static function add_page() { /** Add filtering for the name of options page. */ $page_name = apply_filters( 'pls_theme_options_menu_page_title', __( 'Theme Options', pls_get_textdomain() ) ); // Commented out for WordPress theme submission /** Add the menu page. */ // $of_page = add_menu_page( // $page_name, // $page_name, // 'edit_theme_options', // 'pls-theme-options', // 'optionsframework_page', // trailingslashit( PLS_IMG_URL ) . 'icons/theme_options.png', // '3c' /* position between 3 and 4 */ ); /** Adds actions to hook in the required css and javascript. */ add_action( "admin_print_styles-$of_page", 'optionsframework_load_styles' ); add_action( "admin_print_scripts-$of_page", 'optionsframework_load_scripts' ); } }