本文整理汇总了PHP中Ninja_Forms::includes方法的典型用法代码示例。如果您正苦于以下问题:PHP Ninja_Forms::includes方法的具体用法?PHP Ninja_Forms::includes怎么用?PHP Ninja_Forms::includes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ninja_Forms
的用法示例。
在下文中一共展示了Ninja_Forms::includes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: instance
/**
* Main Ninja_Forms Instance
*
* Insures that only one instance of Ninja_Forms exists in memory at any one
* time. Also prevents needing to define globals all over the place.
*
* @since 2.7
* @static
* @staticvar array $instance
* @return The highlander Ninja_Forms
*/
public static function instance()
{
if (!isset(self::$instance) && !self::$instance instanceof Ninja_Forms) {
self::$instance = new Ninja_Forms();
self::$instance->setup_constants();
self::$instance->includes();
// Start our submissions custom post type class
self::$instance->subs_cpt = new NF_Subs_CPT();
// Add our registration class object
self::$instance->register = new NF_Register();
// The forms variable won't be interacted with directly.
// Instead, the forms() methods will act as wrappers for it.
self::$instance->forms = new NF_Forms();
// Our session manager wrapper class
self::$instance->session = new NF_Session();
register_activation_hook(__FILE__, 'ninja_forms_activation');
add_action('plugins_loaded', array(self::$instance, 'load_lang'));
add_action('init', array(self::$instance, 'init'), 5);
add_action('admin_init', array(self::$instance, 'admin_init'), 5);
add_action('update_option_ninja_forms_settings', array(self::$instance, 'refresh_plugin_settings'), 10);
// add_action( 'admin_head', array( self::$instance, 'admin_head' ) );
add_action('admin_notices', array(self::$instance, 'admin_notice'));
}
return self::$instance;
}
示例2: instance
/**
* Main Ninja_Forms Instance
*
* Insures that only one instance of Ninja_Forms exists in memory at any one
* time. Also prevents needing to define globals all over the place.
*
* @since 2.7
* @static
* @staticvar array $instance
* @return The highlander Ninja_Forms
*/
public static function instance()
{
if (!isset(self::$instance) && !self::$instance instanceof Ninja_Forms) {
self::$instance = new Ninja_Forms();
self::$instance->setup_constants();
self::$instance->includes();
// Start our submissions custom post type class
self::$instance->subs_cpt = new NF_Subs_CPT();
register_activation_hook(__FILE__, 'ninja_forms_activation');
add_action('plugins_loaded', array(self::$instance, 'load_lang'));
add_action('init', array(self::$instance, 'set_transient_id'), 1);
add_action('init', array(self::$instance, 'init'), 5);
add_action('admin_init', array(self::$instance, 'admin_init'), 5);
}
return self::$instance;
}