public static function get_instance() { if (!self::$instance) { self::$instance = new self(); } return self::$instance; }
/** * Initialize the plugin and its dependencies. * * Initialize the plugin and its dependencies. * * @since 1.0.0 * @access public * @see __construct * @internal Uses plugins_loaded action * */ public function plugins_loaded() { $GLOBALS['pms_post_protected'] = false; $GLOBALS['pms_session'] = Postmatic_Social_Comments_Session::get_instance(); $GLOBALS['postmatic-social'] = new Postmatic_Social_Comments_Plugin(array('wordpress', 'gplus', 'twitter', 'facebook')); add_filter('pre_comment_author_email', array($this, 'twitter_author')); //Add settings link to plugins screen $prefix = is_multisite() ? 'network_admin_' : ''; add_action($prefix . 'plugin_action_links_' . Postmatic_Social::get_plugin_basename(), array($this, 'plugin_settings_link')); }