コード例 #1
0
        $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'));
コード例 #2
0
 function test_class_access()
 {
     $this->assertTrue(wds_faq_page()->wds - faqs instanceof WDSFAQP_Wds_faqs);
 }
コード例 #3
0
 function test_get_instance()
 {
     $this->assertTrue(wds_faq_page() instanceof WDS_FAQ_Page);
 }
コード例 #4
0
 function test_class_access()
 {
     $this->assertTrue(wds_faq_page()->class - cmb instanceof WDS_FAQ_Class_Cmb);
 }