/** * Static Singleton Factory Method * * @return self */ public static function instance() { if (empty(self::$instance)) { self::$instance = new self(); } return self::$instance; }
public function filter_edit_link($link, $post, $context) { $post = get_post($post); if ($post->post_type !== self::$post_type) { return $link; } $args = array('tab' => Tribe__Events__Aggregator__Tabs__Edit::instance()->get_slug(), 'id' => absint($post->ID)); return Tribe__Events__Aggregator__Page::instance()->get_url($args); }