/** * Initialize the plugin by loading admin scripts & styles and adding a * settings page and menu. * * @since 1.0.0 */ private function __construct() { $this->plugin_slug = Sexy_Author_Bio::get_plugin_slug(); // Custom contact methods. add_filter('user_contactmethods', array($this, 'contact_methods'), 10, 1); // Load admin JavaScript. add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts')); // Add the options page and menu item. add_action('admin_menu', array($this, 'add_plugin_admin_menu')); // Init plugin options form. add_action('admin_init', array($this, 'plugin_settings')); }
/** * Return an instance of this class. * * @since 1.0.0 * * @return object A single instance of this class. */ public static function get_instance() { // If the single instance hasn't been set, set it now. if (null == self::$instance) { self::$instance = new self(); } return self::$instance; }
/** * Shows the Sexy Author Bio. * * @return string Sexy Author Bio HTML. */ function get_Sexy_Author_Bio() { return Sexy_Author_Bio::view(get_option('sexyauthorbio_settings')); }