当前位置: 首页>>代码示例>>PHP>>正文


PHP WP_Customize_Control::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructor.
  *
  * @since 4.1.0
  * @since 4.2.0 Moved from WP_Customize_Upload_Control.
  *
  * @param WP_Customize_Manager $manager Customizer bootstrap instance.
  * @param string               $id      Control ID.
  * @param array                $args    Optional. Arguments to override class property defaults.
  */
 public function __construct($manager, $id, $args = array())
 {
     parent::__construct($manager, $id, $args);
     if (!$this instanceof WP_Customize_Image_Control) {
         $this->button_labels = wp_parse_args($this->button_labels, array('select' => __('Select File'), 'change' => __('Change File'), 'default' => __('Default'), 'remove' => __('Remove'), 'placeholder' => __('No file selected'), 'frame_title' => __('Select File'), 'frame_button' => __('Choose File')));
     }
 }
开发者ID:itspriddle,项目名称:wordpress-playground,代码行数:17,代码来源:class-wp-customize-media-control.php

示例2: __construct

 /**
  * Constructor for our custom control.
  *
  * @param object $wp_customize
  * @param string $control_id
  * @param array $args
  * @uses Site_Logo_Image_Control::l10n()
  */
 public function __construct($wp_customize, $control_id, $args = array())
 {
     // declare these first so they can be overridden
     $this->l10n = array('upload' => __('Add logo', 'layerswp'), 'set' => __('Set as logo', 'layerswp'), 'choose' => __('Choose logo', 'layerswp'), 'change' => __('Change logo', 'layerswp'), 'remove' => __('Remove logo', 'layerswp'), 'placeholder' => __('No logo set', 'layerswp'));
     $this->directory_uri = LAYERS_TEMPLATE_URI . '/core/third-party/site-logo/';
     parent::__construct($wp_customize, $control_id, $args);
 }
开发者ID:angelabier1,项目名称:layerswp,代码行数:15,代码来源:class-site-logo-control.php

示例3: __construct

 public function __construct($manager, $id, $args = array())
 {
     parent::__construct($manager, $id, $args);
     if (!empty($args['llorix_one_lite_message'])) {
         $this->message = $args['llorix_one_lite_message'];
     }
 }
开发者ID:jenia-buianov,项目名称:all_my_sites,代码行数:7,代码来源:customizer.php

示例4: array

 /**
  * This function sets up all of the actions and filters on instance. It also loads (includes)
  * the required files and assets.
  */
 function __construct($manager, $id, $args = array())
 {
     // Hooks
     // TODO
     // Call the parent constructor here
     parent::__construct($manager, $id, $args);
 }
开发者ID:sdsweb,项目名称:baton,代码行数:11,代码来源:class-baton-customizer-font-size-control.php

示例5: __construct

 /**
  * Set up our control.
  *
  * @since  1.0.0
  * @access public
  * @param  object  $manager
  * @param  string  $id
  * @param  array   $args
  * @return void
  */
 public function __construct($manager, $id, $args = array())
 {
     // Let the parent class do its thing.
     parent::__construct($manager, $id, $args);
     // Make sure we have labels.
     $this->l10n = wp_parse_args($this->l10n, array('family' => esc_html__('Font Family', 'ctypo'), 'size' => esc_html__('Font Size', 'ctypo'), 'weight' => esc_html__('Font Weight', 'ctypo'), 'style' => esc_html__('Font Style', 'ctypo'), 'line_height' => esc_html__('Line Height', 'ctypo')));
 }
开发者ID:rnlmedia,项目名称:customizer-typography,代码行数:17,代码来源:control-typography.php

示例6: __construct

 /**
  * Constructor.
  *
  * @since 3.4.0
  * @uses WP_Customize_Control::__construct()
  *
  * @param WP_Customize_Manager $manager
  * @param string $id
  * @param array $args
  */
 public function __construct($manager, $id, $args = array())
 {
     parent::__construct($manager, $id, $args);
     if (!empty($args['choices'])) {
         $this->colours = $args['choices'];
     }
 }
开发者ID:LinaPeterssonOberg,项目名称:exam,代码行数:17,代码来源:customizer-colour.php

示例7: __construct

 public function __construct($manager, $id, $args = array())
 {
     parent::__construct($manager, $id, $args);
     if ($this->font_set_filter) {
         $this->font_set = apply_filters($this->font_set_filter, $this->font_set, $this->id);
     }
 }
开发者ID:j-kenneth,项目名称:Expeero,代码行数:7,代码来源:TdCustomizeFontControl.php

示例8: __construct

 public function __construct($manager, $id, $args = array())
 {
     if (isset($args['taxonomy']) && in_array($args['taxonomy'], get_taxonomies())) {
         $this->taxonomy = $args['taxonomy'];
     }
     parent::__construct($manager, $id, $args);
 }
开发者ID:datalynk,项目名称:quizzlestick,代码行数:7,代码来源:icit-custom-controls.php

示例9: __construct

 public function __construct($manager, $id, $args = array())
 {
     $this->statuses = array('' => __('Default', 'doctors'));
     parent::__construct($manager, $id, $args);
     if (tally_config('type') == 'none' && $this->css_class == 'biz' || tally_config('type') == 'away' && $this->css_class == 'hbiz' || tally_config('type') == 'none' && $this->css_class == 'hbiz') {
         $this->type = 's';
     }
 }
开发者ID:ReConcepts,项目名称:mashariki,代码行数:8,代码来源:custom_control_color.php

示例10: __construct

 public function __construct($manager, $id, $args = array())
 {
     $_opt_prefix = TC_wfc::$instance->plug_option_prefix;
     $this->customs = get_option("{$_opt_prefix}_customs_" . TC_wfc::$theme_name);
     $this->lang_domain = TC_wfc::$instance->plug_lang;
     $this->selector_settings = TC_wfc::$instance->tc_get_selector_list();
     parent::__construct($manager, $id, $args);
 }
开发者ID:umairriaz90,项目名称:Daschug1,代码行数:8,代码来源:class_customizer_font_controls.php

示例11: __construct

 public function __construct($wp_customize, $id, $args, $field)
 {
     if (isset($args['type'])) {
         $args['type'] = 'wpdlib_' . $args['type'];
     }
     parent::__construct($wp_customize, $id, $args);
     $this->_field = $field;
 }
开发者ID:felixarntz,项目名称:customizer-definitely,代码行数:8,代码来源:CustomizeControl.php

示例12: __construct

 public function __construct($manager, $id, $args = array())
 {
     parent::__construct($manager, $id, $args);
     if (empty($args['psu_args']) || !is_array($args['psu_args'])) {
         $args['psu_args'] = array();
     }
     $this->psu_args = $args['psu_args'];
 }
开发者ID:voceconnect,项目名称:voce-theme-customizer,代码行数:8,代码来源:Voce_Customize_PSU_Control.php

示例13: __construct

 public function __construct($manager, $id, $args = array())
 {
     parent::__construct($manager, $id, $args);
     $this->section = $args['element']['section'];
     $this->label = isset($args['element']['title']) ? $args['element']['title'] : "";
     $this->description = isset($args['element']['description']) ? $args['element']['description'] : '';
     $this->type = $args['element']['type'];
     $this->element['custom_attrs'] = array();
 }
开发者ID:jimdough,项目名称:Roadmaster,代码行数:9,代码来源:WDWT_control_classes.php

示例14: __construct

 public function __construct($manager, $id, $args = array())
 {
     parent::__construct($manager, $id, $args);
     $this->choices = array();
     $post_types = \Morepress\Post_Type::find(array(), 'object');
     foreach ($post_types as $key => $item) {
         $this->choices[$key] = $item->labels->name;
     }
 }
开发者ID:adriend,项目名称:morepress,代码行数:9,代码来源:Post_Type.php

示例15: __construct

 public function __construct($manager, $id, $args = array(), $options = array())
 {
     $this->fonts = get_transient('google_font_names_');
     if (!is_array($this->fonts)) {
         $this->fonts = $this->get_font_names();
     }
     if (!$this->fonts) {
         return;
     }
     parent::__construct($manager, $id, $args);
 }
开发者ID:jun200,项目名称:wordpress,代码行数:11,代码来源:customizer-custom-classes.php


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