• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP TitanFrameworkOption类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中TitanFrameworkOption的典型用法代码示例。如果您正苦于以下问题:PHP TitanFrameworkOption类的具体用法?PHP TitanFrameworkOption怎么用?PHP TitanFrameworkOption使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TitanFrameworkOption类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: createOption

 public function createOption($settings)
 {
     if (!apply_filters('tf_create_option_continue_' . $this->owner->owner->optionNamespace, true, $settings)) {
         return null;
     }
     $obj = TitanFrameworkOption::factory($settings, $this);
     $this->options[] = $obj;
     do_action('tf_create_option_' . $this->owner->owner->optionNamespace, $obj);
     return $obj;
 }
开发者ID:gambitph,项目名称:titan-framework,代码行数:10,代码来源:class-admin-tab.php


示例2: createOption

 public function createOption($settings)
 {
     $obj = TitanFrameworkOption::factory($settings, $this);
     // $obj = new TitanFrameworkOption( $settings, $this );
     $this->options[] = $obj;
     if (!empty($obj->settings['id'])) {
         $this->owner->optionsUsed[$obj->settings['id']] = $obj;
     }
     do_action('tf_create_option', $obj);
     return $obj;
 }
开发者ID:webkupas,项目名称:Titan-Framework-Embedding-Demo,代码行数:11,代码来源:class-theme-customizer-section.php


示例3: init_group_options

 /**
  * Creates the options contained in the group. Mimics how Admin pages
  * create options.
  *
  * @return void
  */
 public function init_group_options()
 {
     if (!empty($this->settings['options'])) {
         if (is_array($this->settings['options'])) {
             foreach ($this->settings['options'] as $settings) {
                 if (!apply_filters('tf_create_option_continue_' . $this->getOptionNamespace(), true, $settings)) {
                     continue;
                 }
                 $obj = TitanFrameworkOption::factory($settings, $this->owner);
                 $this->options[] = $obj;
                 do_action('tf_create_option_' . $this->getOptionNamespace(), $obj);
             }
         }
     }
 }
开发者ID:gambitph,项目名称:titan-framework,代码行数:21,代码来源:class-option-group.php


示例4: insertOptionBefore

 public function insertOptionBefore($settings, $index = null, $overwrite = false)
 {
     if (is_null($index)) {
         return $this->createOption($settings);
     }
     if (!apply_filters('tf_create_option_continue_' . $this->owner->optionNamespace, true, $settings)) {
         return null;
     }
     $obj = TitanFrameworkOption::factory($settings, $this);
     $count = count($this->options);
     if (!$overwrite) {
         for ($i = $count - 1; $i >= $index; $i--) {
             $this->options[$i + 1] = $this->options[$i];
         }
     }
     $this->options[$index] = $obj;
     do_action('tf_create_option_' . $this->owner->optionNamespace, $obj);
     return $obj;
 }
开发者ID:vinhnq1211,项目名称:funy,代码行数:19,代码来源:class-meta-box.php


示例5: addSubSection

 /**
  * Store Subsection
  *
  * @return  void
  */
 public function addSubSection($settings)
 {
     $this->subID = $settings['id'];
     $settings['capability'] = 'edit_theme_options';
     if (!apply_filters('tf_create_option_continue_' . $this->owner->optionNamespace, true, $settings)) {
         return null;
     }
     $objx = TitanFrameworkOption::factory($settings, $this);
     $this->subSec[] = $objx;
     do_action('tf_create_option_' . $this->owner->optionNamespace, $objx);
     return $objx;
 }
开发者ID:vinhnq1211,项目名称:funy,代码行数:17,代码来源:thim-class-customizer-section.php


示例6: 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


示例7: 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


示例8: 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


示例9: 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


示例10: 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


示例11: 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


示例12: 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


示例13: 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


示例14: 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


示例15: 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


示例16: 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


示例17: array

 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
     add_action('tf_livepreview_pre', array($this, 'preLivePreview'), 10, 3);
 }
开发者ID:webkupas,项目名称:Titan-Framework-Embedding-Demo,代码行数:5,代码来源:class-option-radio-palette.php


示例18: 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


示例19:

 function __construct($settings, $owner)
 {
     parent::__construct($settings, $owner);
 }
开发者ID:banna360,项目名称:genietheme-responsive,代码行数:4,代码来源:class-option-radio-image.php


示例20: 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



注:本文中的TitanFrameworkOption类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Title类代码示例发布时间:2022-05-23
下一篇:
PHP TitanFramework类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap