%s ', admin_url( 'options-general.php?page=author-info-options' ), __( 'Settings', 'author-info' ) ); } return $links; } // include style sheet only on single post add_action( 'wp_enqueue_scripts', 'author_style_css' ); function author_style_css() { if( is_single() ) { $authorStyleUrl = plugins_url('/css/author-style-sheet.css', __FILE__); // Respects SSL, author-style-sheet.css is relative to the current file $authorStyleFile = WP_PLUGIN_DIR . '/author-info/css/author-style-sheet.css'; if ( file_exists($authorStyleFile) ) { wp_register_style('authorStyleSheets', $authorStyleUrl); wp_enqueue_style( 'authorStyleSheets' ); } } } // add options page and register options if(is_admin()) { add_action('admin_menu','author_info_menu'); add_action('admin_init', 'author_info_css_group_register'); } //register setting fields function author_info_css_group_register() { register_setting('author_info_group','title_color'); register_setting('author_info_group','font_size'); } //author info options page setup function author_info_menu() { add_options_page('Author Info Style Settings', 'Author Info', 'manage_options', 'author-info-options', 'author_info_style_settings'); } function author_info_style_settings() { ?>
Title :
Author Bio :
' . $title . ''.$after_title; }; echo ''; echo $after_widget; } } } //Adding css styles to author info Widget add_action('wp_head', 'author_info_Widget_styles'); function author_info_Widget_styles() { echo ' '; } ?>