PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.2
Jetpack – WP Security, Backup, Speed, & Growth v16.2
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 All 506 releases
jetpack / jetpack_vendor / automattic / jetpack-search / src / customizer / customize-controls / class-label-control.php

class-label-control.php in Jetpack – WP Security, Backup, Speed, & Growth 16.2, at jetpack_vendor/automattic/jetpack-search/src/customizer/customize-controls/class-label-control.php

46 lines 997 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * A label-only Customizer control for use with Jetpack Search configuration
4 *
5 * @package automattic/jetpack
6 * @since 8.6.0
7 */
8
9 namespace Automattic\Jetpack\Search;
10
11 use WP_Customize_Control;
12
13 if ( ! class_exists( 'WP_Customize_Control' ) ) {
14 return;
15 }
16 /**
17 * Label Control class.
18 */
19 class Label_Control extends WP_Customize_Control {
20 /**
21 * Override rendering for custom class name; omit element ID.
22 */
23 protected function render() {
24 echo '<li class="customize-control customize-label-control">';
25 $this->render_content();
26 echo '</li>';
27 }
28
29 /**
30 * Override content rendering.
31 */
32 protected function render_content() {
33 if ( ! empty( $this->label ) ) : ?>
34 <label class="customize-control-title">
35 <?php echo esc_html( $this->label ); ?>
36 </label>
37 <?php endif; ?>
38 <?php if ( ! empty( $this->description ) ) : ?>
39 <span class="description customize-control-description">
40 <?php echo esc_html( $this->description ); ?>
41 </span>
42 <?php
43 endif;
44 }
45 }
46