/** * Instance function * * @since 1.0 * @author Modern Tribe * @return object the instance of the class. */ public static function instance() { if (!isset(self::$instance)) { $className = __CLASS__; self::$instance = new $className(); } return self::$instance; }
/** * Common library plugins have been activated. Functions that need to be applied afterwards can be added here. * * @return void */ public function helpersLoaded() { remove_action('widgets_init', 'tribe_related_posts_register_widget'); if (class_exists('TribeRelatedPosts')) { TribeRelatedPosts::instance(); require_once $this->pluginPath . 'vendor/tribe-related-posts/template-tags.php'; } }
<?php /* Plugin Name: Tribe Related Posts Description: Template tags and shortcode to display related posts by taxonomy. Author: Modern Tribe, Inc., Paul Hughes Version: 1.1 Author URI: http://tri.be */ // Include plugin files. include 'tribe-related-posts.class.php'; include 'tribe-related-posts-widget.php'; include 'template-tags.php'; TribeRelatedPosts::instance();