$dir = $dir ? $dir : trailingslashit(dirname(__FILE__)); return $dir . $path; } /** * This plugin's url * * @since 1.0.0 * @param string $path (Optional) Appended path. * @return string URL and path */ public static function url($path = '') { static $url; $url = $url ? $url : trailingslashit(plugin_dir_url(__FILE__)); return $url . $path; } } /** * Grab the WDS_FAQ_Page object and return it. * Wrapper for WDS_FAQ_Page::get_instance() * * @since 1.0.0 * @return WDS_FAQ_Page Singleton instance of plugin class. */ function wds_faq_page() { return WDS_FAQ_Page::get_instance(); } // Kick it off. add_action('plugins_loaded', array(wds_faq_page(), 'hooks'));
function test_class_access() { $this->assertTrue(wds_faq_page()->wds - faqs instanceof WDSFAQP_Wds_faqs); }
function test_get_instance() { $this->assertTrue(wds_faq_page() instanceof WDS_FAQ_Page); }
function test_class_access() { $this->assertTrue(wds_faq_page()->class - cmb instanceof WDS_FAQ_Class_Cmb); }