本文整理汇总了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')));
}
}
示例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);
}
示例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'];
}
}
示例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);
}
示例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')));
}
示例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'];
}
}
示例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);
}
}
示例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);
}
示例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';
}
}
示例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);
}
示例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;
}
示例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'];
}
示例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();
}
示例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;
}
}
示例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);
}