'0', 'hidesearch' => '0', 'showfullpost' => '0', 'facebookurl' => '#', 'twitterurl' => '#', 'googleplusurl' => '#', 'linkedinurl' => '#', 'instagramurl' => '#', 'youtubeurl' => '#', 'pinteresturl' => '#', 'tumblrurl' => '#' ); function blogghiamo_toolbar_link_to_mypage( $wp_admin_bar ) { $args = array( 'id' => 'blogghiamo_theme_options', 'parent' => 'site-name', 'title' => __('Blogghiamo Theme Options', 'blogghiamo' ), 'href' => admin_url('themes.php?page=theme_options') ); $wp_admin_bar->add_node( $args ); } add_action( 'admin_bar_menu', 'blogghiamo_toolbar_link_to_mypage', 999 ); if ( is_admin() ) : // Load only if we are viewing an admin page add_action( 'admin_init', 'blogghiamo_options_init' ); add_action( 'admin_menu', 'blogghiamo_options_add_page' ); /** * Init plugin options to white list our options */ function blogghiamo_options_init(){ register_setting( 'blogghiamo_options_add_page', 'blogghiamo_theme_options', 'blogghiamo_options_validate' ); } /** * Load up the menu page */ function blogghiamo_options_add_page() { add_theme_page( __( 'Blogghiamo Theme Options', 'blogghiamo' ), __( 'Blogghiamo Theme Options', 'blogghiamo' ), 'edit_theme_options', 'theme_options', 'blogghiamo_options_do_page' ); } /** * Create the options page */ function blogghiamo_options_do_page() { global $blogghiamo_theme_options; if ( ! isset( $_REQUEST['settings-updated'] ) ) $_REQUEST['settings-updated'] = false; ?>