languages
3 years ago
CustomHtmlControl.php
3 years ago
CustomTextControl.php
3 years ago
VkCssOptimize.php
1 year ago
class-css-tree-shaking.php
3 years ago
CustomHtmlControl.php
33 lines
| 1 | <?php //phpcs:ignore |
| 2 | /** |
| 3 | * CustomHtmlControl |
| 4 | * |
| 5 | * @package vektor-inc/vk-css-optimize |
| 6 | * @license GPL-2.0+ |
| 7 | * |
| 8 | * @version 0.0.1 |
| 9 | */ |
| 10 | |
| 11 | namespace VektorInc\VK_CSS_Optimize; |
| 12 | |
| 13 | /** |
| 14 | * VkCustomHtmlControl |
| 15 | */ |
| 16 | class CustomHtmlControl extends \WP_Customize_Control { |
| 17 | public $type = 'customtext'; |
| 18 | public $custom_title_sub = ''; // we add this for the extra custom_html. |
| 19 | public $custom_html = ''; // we add this for the extra custom_html. |
| 20 | public function render_content() { |
| 21 | if ( $this->label ) { |
| 22 | // echo '<h2 class="admin-custom-h2">' . wp_kses_post( $this->label ) . '</h2>'; |
| 23 | echo '<h2 class="admin-custom-h2">' . wp_kses_post( $this->label ) . '</h2>'; |
| 24 | } |
| 25 | if ( $this->custom_title_sub ) { |
| 26 | echo '<h3 class="admin-custom-h3">' . wp_kses_post( $this->custom_title_sub ) . '</h3>'; |
| 27 | } |
| 28 | if ( $this->custom_html ) { |
| 29 | echo '<div>' . wp_kses_post( $this->custom_html ) . '</div>'; |
| 30 | } |
| 31 | } // public function render_content() { |
| 32 | } // class Custom_Html_Control extends WP_Customize_Control { |
| 33 |