當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Ninja_Forms::includes方法代碼示例

本文整理匯總了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;
 }
開發者ID:jbs321,項目名稱:portfolio,代碼行數:36,代碼來源:ninja-forms.php

示例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;
 }
開發者ID:USSLomaPrieta,項目名稱:usslomaprieta.org,代碼行數:27,代碼來源:ninja-forms.php


注:本文中的Ninja_Forms::includes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。