[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/classes/ -> class-bp-customizer-control-range.php (source)

   1  <?php
   2  /**
   3   * Core component class.
   4   *
   5   * @package BuddyPress
   6   * @subpackage Core
   7   */
   8  
   9  // Exit if accessed directly.
  10  defined( 'ABSPATH' ) || exit;
  11  
  12  /**
  13   * BuddyPress Customizer font size control.
  14   *
  15   * @since 2.5.0
  16   */
  17  class BP_Customizer_Control_Range extends WP_Customize_Control {
  18      /**
  19       * @var string
  20       */
  21      public $type = 'range';
  22  
  23      /**
  24       * Enqueue scripts/styles for the color picker.
  25       *
  26       * @since 2.5.0
  27       */
  28  	public function enqueue() {
  29          wp_enqueue_script( 'bp-customizer-controls' );
  30          wp_enqueue_style( 'bp-customizer-controls' );
  31      }
  32  
  33      /**
  34       * Render the control.
  35       *
  36       * @since 2.5.0
  37       */
  38  	public function render_content() {
  39          $id    = 'customize-control-' . str_replace( '[', '-', str_replace( ']', '', $this->id ) );
  40          $class = 'customize-control customize-control-' . $this->type;
  41  
  42          ?><li id="<?php echo esc_attr( $id ); ?>" class="<?php echo esc_attr( $class ); ?>">
  43              <?php if ( $this->label ) : ?>
  44                  <label for="<?php echo esc_attr( "{$id}-range" ); ?>">
  45                      <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
  46                  </label>
  47              <?php endif; ?>
  48  
  49              <input type="range" id="<?php echo esc_attr( "{$id}-range" ); ?>" <?php $this->link(); $this->input_attrs(); ?> value="<?php echo esc_attr( $this->value() ); ?>" />
  50              <output for="<?php echo esc_attr( "{$id}-range" ); ?>"><?php echo esc_html( $this->value() ); ?></output>
  51  
  52              <?php if ( $this->description ) : ?>
  53                  <p><span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span></p>
  54              <?php endif; ?>
  55          </li><?php
  56      }
  57  }


Generated: Sat Jun 6 01:01:27 2020 Cross-referenced by PHPXref 0.7.1