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


PHP WP_Customize_Image_Control::__construct方法代碼示例

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


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

示例1: __construct

 /**
  * Constructor.
  *
  * If $args['settings'] is not defined, use the $id as the setting ID.
  *
  * @since 3.4.0
  * @uses WP_Customize_Upload_Control::__construct()
  *
  * @param WP_Customize_Manager $manager
  * @param string $id
  * @param array $args
  */
 public function __construct($manager, $id, $args)
 {
     $this->statuses = array('' => __('No Image', ''));
     parent::__construct($manager, $id, $args);
     $this->add_tab('upload-new', __('Upload New', 'Theme Name'), array($this, 'tab_upload_new'));
     $this->add_tab('uploaded', __('Uploaded', 'Theme Name'), array($this, 'tab_uploaded'));
     // Early priority to occur before $this->manager->prepare_controls();
     add_action('customize_controls_init', array($this, 'prepare_control'), 5);
 }
開發者ID:ericdebelak,項目名稱:starter-theme,代碼行數:21,代碼來源:customize.php

示例2: __construct

 /**
  * Create a new Voce Image Control
  */
 public function __construct($manager, $id, $args)
 {
     parent::__construct($manager, $id, $args);
     $output_formats = array('src', 'id');
     $this->output_format = 'src';
     if (!empty($args['output_format']) && in_array($args['output_format'], $output_formats)) {
         $this->output_format = $args['output_format'];
     }
     $this->remove_tab('upload-new');
     $this->remove_tab('uploaded');
 }
開發者ID:voceconnect,項目名稱:voce-theme-customizer,代碼行數:14,代碼來源:Voce_Customize_Image_Control.php

示例3: __construct

 /**
  * Constructor.
  *
  * If $args['settings'] is not defined, use the $id as the setting ID.
  *
  * @since 3.4.0
  * @uses WP_Customize_Upload_Control::__construct()
  *
  * @param WP_Customize_Manager $manager
  * @param string $id
  * @param array $args
  */
 public function __construct($manager, $id, $args)
 {
     $this->statuses = array('' => __('No Image', 'tc-profiles'));
     parent::__construct($manager, $id, $args);
     $this->add_tab('upload-new', __('Upload New', 'tc-profiles'), array($this, 'tab_upload_new'));
     $this->add_tab('uploaded', __('Uploaded', 'tc-profiles'), array($this, 'tab_uploaded'));
     if ($this->setting->default) {
         $this->add_tab('default', __('Default', 'tc-profiles'), array($this, 'tab_default_background'));
     }
     // Early priority to occur before $this->manager->prepare_controls();
     add_action('customize_controls_init', array($this, 'prepare_control'), 5);
 }
開發者ID:Trinitycodes,項目名稱:tc-profiles,代碼行數:24,代碼來源:customizer.php

示例4: __construct

 /**
  * Constructor.
  *
  * If $args['settings'] is not defined, use the $id as the setting ID.
  *
  * @uses   WP_Customize_Image_Control::__construct()
  * @param  WP_Customize_Manager $manager
  * @param  string $id
  * @param  array $args
  * @since  1.0.0
  */
 public function __construct($manager, $id, $args)
 {
     parent::__construct($manager, $id, $args);
     $this->theme = reach_get_theme();
     /**
      * Usually, this control will be instantiated during the customize_register
      * event, so if that is the current filter, call the method directly.
      */
     if (current_filter() == 'customize_register') {
         $this->customize_register($manager);
     } elseif (!did_action('customize_register')) {
         add_action('customize_register', array($this, 'customize_register'));
     } else {
         wp_die(__('Reach_Customizer_Retina_Image_Control must be instantiated before or during the customize_register action.', 'reach'));
     }
     add_action('customize_save', array($this, 'customize_save'));
     add_action('customize_save_after', array($this, 'customize_save_after'));
 }
開發者ID:Charitable,項目名稱:Reach,代碼行數:29,代碼來源:class-reach-customizer-retina-image-control.php

示例5: __construct

 public function __construct($manager, $id, $args)
 {
     parent::__construct($manager, $id, $args);
     $this->add_tab('tab_defaults', 'default', array($this, 'tab_defaults'));
 }
開發者ID:Om3rCitak,項目名稱:Kotetsu,代碼行數:5,代碼來源:kotetsu-logo-control.php

示例6: __construct

 /**
  * Constructor.
  *
  * @since 3.4.0
  * @uses WP_Customize_Image_Control::__construct()
  *
  * @param WP_Customize_Manager $manager
  */
 public function __construct($manager, $id, $args = array())
 {
     parent::__construct($manager, $id, $args);
 }
開發者ID:jermbo,項目名稱:allTests,代碼行數:12,代碼來源:wp-customize-image-reloaded.php

示例7:

 /**
  * Constructor
  */
 function __construct($manager, $id, $args)
 {
     // Just calling the parent constructor here
     parent::__construct($manager, $id, $args);
 }
開發者ID:se7ven214,項目名稱:Kungfuphp.local,代碼行數:8,代碼來源:class-sds-theme-options-customize-logo-control.php

示例8: __construct

 /**
  * Constructor.
  *
  * @since 3.4.0
  * @uses WP_Customize_Image_Control::__construct()
  * @uses WP_Customize_Image_Control::add_tab()
  *
  * @param WP_Customize_Manager $manager
  */
 public function __construct($manager)
 {
     parent::__construct($manager, 'header_image', array('label' => __('Header Image'), 'settings' => array('default' => 'header_image', 'data' => 'header_image_data'), 'section' => 'header_image', 'context' => 'custom-header', 'removed' => 'remove-header', 'get_url' => 'get_header_image', 'statuses' => array('' => __('Default'), 'remove-header' => __('No Image'), 'random-default-image' => __('Random Default Image'), 'random-uploaded-image' => __('Random Uploaded Image'))));
     // Remove the upload tab.
     $this->remove_tab('upload-new');
 }
開發者ID:jcsilkey,項目名稱:CodeReviewSecurityRepo,代碼行數:15,代碼來源:class-wp-customize-control.php

示例9: __construct

 /**
  * Constructor.
  *
  * @since 4.5.0
  * @access public
  *
  * @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);
     $this->button_labels = array('select' => __('Select logo'), 'change' => __('Change logo'), 'remove' => __('Remove'), 'default' => __('Default'), 'placeholder' => __('No logo selected'), 'frame_title' => __('Select logo'), 'frame_button' => __('Choose logo'));
 }
開發者ID:yaoyonstudio,項目名稱:WordPress,代碼行數:15,代碼來源:class-wp-customize-site-logo-control.php

示例10: __construct

 public function __construct($manager)
 {
     parent::__construct($manager, 'digitalstore_theme_options[logo_image]', array('label' => __('Logo Image'), 'section' => 'strings', 'context' => 'custom-logo-image', 'removed' => 'removed', 'statuses' => array('' => __('No Image', 'edd-digitalstore'), 'removed' => __('Removed', 'edd-digitalstore'))));
 }
開發者ID:SelaInc,項目名稱:Digital-Store,代碼行數:4,代碼來源:class-wp-customize-controls.php

示例11: __construct

 public function __construct($manager)
 {
     parent::__construct($manager, 'header_image', array('label' => __('Header Image'), 'section' => 'header', 'context' => 'custom-header', 'removed' => 'remove-header', 'get_url' => 'get_header_image', 'statuses' => array('' => __('Default'), 'remove-header' => __('No Image'), 'random-default-image' => __('Random Default Image'), 'random-uploaded-image' => __('Random Uploaded Image'))));
     $this->add_tab('default', __('Default'), array($this, 'tab_default_headers'));
 }
開發者ID:nogsus,項目名稱:WordPress,代碼行數:5,代碼來源:class-wp-customize-control.php

示例12: __construct

 public function __construct($manager, $id, $args)
 {
     $this->get_url = array($this, 'get_img_url');
     if (!empty($id)) {
         $this->context = $id;
     }
     parent::__construct($manager, $id, $args);
 }
開發者ID:datalynk,項目名稱:quizzlestick,代碼行數:8,代碼來源:icit-custom-controls.php

示例13: __construct

 /**
  * Constructor.
  *
  * @since 3.4.0
  * @uses WP_Customize_Image_Control::__construct()
  *
  * @param WP_Customize_Manager $manager Customizer bootstrap instance.
  */
 public function __construct($manager)
 {
     parent::__construct($manager, 'background_image', array('label' => __('Background Image'), 'section' => 'background_image'));
 }
開發者ID:aaemnnosttv,項目名稱:develop.git.wordpress.org,代碼行數:12,代碼來源:class-wp-customize-background-image-control.php

示例14: __construct

 public function __construct($manager, $id, $args)
 {
     $this->get_url = array($this, 'get_img_url');
     parent::__construct($manager, $id, $args);
 }
開發者ID:aim-web-projects,項目名稱:kobe-chuoh,代碼行數:5,代碼來源:testimonial.php

示例15: __construct

 public function __construct($manager, $id, $args = array())
 {
     parent::__construct($manager, $id, $args);
     $this->remove_tab('uploaded');
     $this->add_tab('medialibrary', __('Media Library'), array($this, 'tab_medialibrary'));
 }
開發者ID:dauidus,項目名稱:woof,代碼行數:6,代碼來源:customizer.php


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