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


PHP TitanFrameworkOption::__construct方法代碼示例

本文整理匯總了PHP中TitanFrameworkOption::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP TitanFrameworkOption::__construct方法的具體用法?PHP TitanFrameworkOption::__construct怎麽用?PHP TitanFrameworkOption::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TitanFrameworkOption的用法示例。


在下文中一共展示了TitanFrameworkOption::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

 /**
  * Constructor
  *
  * @since	1.4
  */
 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     add_action('admin_enqueue_scripts', array($this, 'enqueueSlider'));
     add_action('customize_controls_enqueue_scripts', array($this, 'enqueueSlider'));
     add_action('admin_head', array(__CLASS__, 'createSliderScript'));
 }
開發者ID:shwetadubey,項目名稱:upfit,代碼行數:12,代碼來源:class-option-number.php

示例2: array

 /**
  * Constructor
  *
  * @return	void
  * @since	1.5
  */
 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     add_filter('tf_generate_css_upload_' . $this->getOptionNamespace(), array($this, 'generateCSS'), 10, 2);
     add_action('tf_livepreview_pre_' . $this->getOptionNamespace(), array($this, 'preLivePreview'), 10, 3);
     add_action('tf_livepreview_post_' . $this->getOptionNamespace(), array($this, 'postLivePreview'), 10, 3);
 }
開發者ID:shuvo586,項目名稱:gossip,代碼行數:13,代碼來源:class-option-upload.php

示例3: array

 /**
  * Constructor
  *
  * @param array  $settings Option settings
  * @param string $owner    Namespace
  *
  * @since    1.9.3
  */
 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     tf_add_action_once('admin_enqueue_scripts', array($this, 'load_select_scripts'));
     tf_add_action_once('customize_controls_enqueue_scripts', array($this, 'load_select_scripts'));
     tf_add_action_once('admin_head', array($this, 'init_select_script'));
     tf_add_action_once('customize_controls_print_footer_scripts', array($this, 'init_select_script'));
 }
開發者ID:gambitph,項目名稱:titan-framework,代碼行數:16,代碼來源:class-option-select.php

示例4: array

 /**
  * Constructor
  *
  * @return	void
  * @since	1.4
  */
 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     add_action('admin_enqueue_scripts', array($this, "loadAdminScripts"));
     add_action('customize_controls_enqueue_scripts', array($this, 'loadAdminScripts'));
     add_action('admin_head', array(__CLASS__, 'createFontScript'));
     add_action('tf_create_option_' . $this->getOptionNamespace(), array($this, "rememberGoogleFonts"));
     add_action('wp_enqueue_scripts', array($this, "enqueueGooglefonts"));
     add_filter('tf_generate_css_font_' . $this->getOptionNamespace(), array($this, 'generateCSS'), 10, 2);
 }
開發者ID:hasinhayder,項目名稱:Titan-Framework,代碼行數:16,代碼來源:class-option-font.php

示例5: array

 /**
  * Constructor
  *
  * @since	1.4
  */
 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     add_action('admin_enqueue_scripts', array($this, 'enqueueDatepicker'));
     add_action('customize_controls_enqueue_scripts', array($this, 'enqueueDatepicker'));
     add_action('admin_head', array(__CLASS__, 'createCalendarScript'));
     if (empty(self::$date_epoch)) {
         self::$date_epoch = date('Y-m-d', 0);
     }
 }
開發者ID:ahmadawais,項目名稱:Titan-Framework,代碼行數:15,代碼來源:class-option-date.php

示例6: array

 /**
  * Constructor
  *
  * @since	1.4
  */
 function __construct($settings, $owner)
 {
     if (defined('WP_DEBUG')) {
         if (WP_DEBUG == true) {
             // Warn about deprecation, refer to `font` option
             TitanFramework::displayFrameworkError(sprintf(__('%s has been deprecated and will be removed in version %s! Please use %s instead to avoid errors in the future.', TF_I18NDOMAIN), '<code>select-googlefont</code>', '<code>1.5</code>', '<code>font</code>'));
         }
     }
     parent::__construct($settings, $owner);
     add_filter('tf_generate_css_select-googlefont_' . $this->getOptionNamespace(), array($this, 'generateCSS'), 10, 2);
 }
開發者ID:JDjimenezdelgado,項目名稱:old-mmexperience,代碼行數:16,代碼來源:class-option-select-googlefont.php

示例7: array

 /**
  * Constructor
  *
  * @since	1.3
  */
 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     add_action('admin_enqueue_scripts', array($this, "loadAdminScripts"));
     add_action('customize_controls_enqueue_scripts', array($this, 'loadAdminScripts'));
     // CSS generation for CSS code langs
     add_filter('tf_generate_css_code_' . $this->getOptionNamespace(), array($this, "generateCSSCode"), 10, 2);
     add_filter('wp_head', array($this, "printCSSForPagesAndPosts"), 100);
     // JS inclusion for Javascript code langs
     add_filter('wp_footer', array($this, "printJS"), 100);
     add_filter('wp_footer', array($this, "printJSForPagesAndPosts"), 101);
 }
開發者ID:vinhnq1211,項目名稱:funy,代碼行數:17,代碼來源:class-option-code.php

示例8: array

 /**
  * Constructor
  *
  * @return	void
  * @since	1.4
  */
 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     tf_add_action_once('admin_enqueue_scripts', array($this, 'loadAdminScripts'));
     tf_add_action_once('customize_controls_enqueue_scripts', array($this, 'loadAdminScripts'));
     tf_add_action_once('admin_head', array(__CLASS__, 'createFontScript'));
     tf_add_action_once('wp_enqueue_scripts', array($this, 'enqueueGooglefonts'));
     add_filter('tf_generate_css_font_' . $this->getOptionNamespace(), array($this, 'generateCSS'), 10, 2);
     // Customizer preview handling
     tf_add_action_once('tf_generate_customizer_preview_js', array($this, 'generateCustomizerPreviewJS'));
     tf_add_filter_once('tf_generate_customizer_preview_css_' . $this->getOptionNamespace(), array($this, 'generateCustomizerPreviewCSS'));
     if ($this->settings['enqueue']) {
         self::$optionsToEnqueue[] = $this;
     }
 }
開發者ID:majick777,項目名稱:Titan-Framework,代碼行數:21,代碼來源:class-option-font.php

示例9:

 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
 }
開發者ID:banna360,項目名稱:genietheme-responsive,代碼行數:4,代碼來源:class-option-radio-image.php

示例10: array

 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     add_action('tf_livepreview_pre_' . $this->getOptionNamespace(), array($this, 'preLivePreview'), 10, 3);
 }
開發者ID:banna360,項目名稱:genietheme-responsive,代碼行數:5,代碼來源:class-option-radio-palette.php

示例11: array

 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     add_action("admin_enqueue_scripts", array($this, 'enqueueScripts'));
 }
開發者ID:jashimuddin,項目名稱:Titan-Framework,代碼行數:5,代碼來源:class-option-image.php

示例12: array

 /**
  * Constructor, fixes the settings to allow for multiple ajax buttons in a single option
  *
  * @param	$settings	Array	Option settings
  * @param	$owner		Object	The container of the option
  * @return	void
  */
 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     add_action('admin_head', array(__CLASS__, 'createAjaxScript'));
     // Adjust the settings
     foreach ($this->defaultSecondarySettings as $key => $default) {
         if (!is_array($this->settings[$key])) {
             $this->settings[$key] = array($this->settings[$key]);
         }
     }
     while (count($this->settings['label']) < count($this->settings['action'])) {
         $this->settings['label'][] = $this->settings['label'][count($this->settings['label']) - 1];
     }
     while (count($this->settings['class']) < count($this->settings['action'])) {
         $this->settings['class'][] = 'button-secondary';
     }
     while (count($this->settings['wait_label']) < count($this->settings['action'])) {
         $this->settings['wait_label'][] = $this->settings['wait_label'][count($this->settings['wait_label']) - 1];
     }
     while (count($this->settings['error_label']) < count($this->settings['action'])) {
         $this->settings['error_label'][] = $this->settings['error_label'][count($this->settings['error_label']) - 1];
     }
     while (count($this->settings['success_label']) < count($this->settings['action'])) {
         $this->settings['success_label'][] = $this->settings['success_label'][count($this->settings['success_label']) - 1];
     }
     while (count($this->settings['success_callback']) < count($this->settings['action'])) {
         $this->settings['success_callback'][] = '';
     }
     while (count($this->settings['error_callback']) < count($this->settings['action'])) {
         $this->settings['error_callback'][] = __('Something went wrong', TF_I18NDOMAIN);
     }
     foreach ($this->settings['label'] as $i => $label) {
         if (empty($label)) {
             $this->settings['label'][$i] = __('Click me', TF_I18NDOMAIN);
         }
     }
     foreach ($this->settings['wait_label'] as $i => $label) {
         if (empty($label)) {
             $this->settings['wait_label'][$i] = __('Please wait...', TF_I18NDOMAIN);
         }
     }
     foreach ($this->settings['error_label'] as $i => $label) {
         if (empty($label)) {
             $this->settings['error_label'][$i] = $this->settings['label'][$i];
         }
     }
     foreach ($this->settings['success_label'] as $i => $label) {
         if (empty($label)) {
             $this->settings['success_label'][$i] = $this->settings['label'][$i];
         }
     }
     /**
      * Create ajax handlers for security and last resort success returns
      */
     foreach ($this->settings['action'] as $i => $action) {
         if (!empty($action)) {
             add_action('wp_ajax_' . $action, array($this, 'ajaxSecurityChecker'), 1);
             add_action('wp_ajax_' . $action, array($this, 'ajaxLastSuccess'), 99999);
         }
     }
 }
開發者ID:majick777,項目名稱:Titan-Framework,代碼行數:68,代碼來源:class-option-ajax-button.php

示例13: array

 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     tf_add_action_once('admin_enqueue_scripts', array($this, 'enqueueColorPickerScript'));
     tf_add_action_once('admin_footer', array($this, 'startColorPicker'));
 }
開發者ID:majick777,項目名稱:Titan-Framework,代碼行數:6,代碼來源:class-option-color.php

示例14:

 /**
  * Override the constructor to include the creation of the options within
  * the group.
  *
  * @param array                   $settings The settings of the option.
  * @param TitanFrameworkAdminPage $owner The owner of the option.
  */
 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     $this->init_group_options();
 }
開發者ID:gambitph,項目名稱:titan-framework,代碼行數:12,代碼來源:class-option-group.php

示例15: array

 /**
  * Constructor
  *
  * @return	void
  * @since	1.5
  */
 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     add_filter('tf_generate_css_upload_' . $this->getOptionNamespace(), array($this, 'generateCSS'), 10, 2);
 }
開發者ID:banna360,項目名稱:genietheme-responsive,代碼行數:11,代碼來源:class-option-upload.php


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