PluginProbe
LoginPress | wp-login Custom Login Page Customizer / 3.0.8
LoginPress | wp-login Custom Login Page Customizer v3.0.8
6.2.5 6.2.4 6.2.3 6.2.2 6.2.1 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.3 1.0.4 All 118 releases
loginpress / classes / controls / range.php

range.php in LoginPress | wp-login Custom Login Page Customizer 3.0.8, at classes/controls/range.php

77 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class for Range Control.
4 *
5 * @since 1.0.23
6 * @access public
7 */
8 class LoginPress_Range_Control extends WP_Customize_Control {
9
10 /**
11 * The type of customize control being rendered.
12 *
13 * @since 1.0.23
14 * @access public
15 * @var string
16 */
17 public $type = 'loginpress-range';
18
19 /**
20 * Default for the Controler
21 *
22 * @since 1.0.23
23 * @access public
24 * @var string
25 */
26 public $default;
27
28 /**
29 * Unit for the Controler
30 *
31 * @since 1.0.23
32 * @access public
33 * @var string
34 */
35 public $unit = 'px';
36
37 /**
38 * Enqueue scripts/styles.
39 *
40 * @since 1.0.23
41 * @access public
42 * @return void
43 */
44 public function enqueue() {
45
46 wp_enqueue_script( 'loginpress-range-control-js', LOGINPRESS_DIR_URL . 'js/controls/loginpress-range-control.js', array( 'jquery' ), LOGINPRESS_VERSION, true );
47
48 wp_enqueue_style( 'loginpress-range-control-css', LOGINPRESS_DIR_URL . 'css/controls/loginpress-range-control.css', array(), LOGINPRESS_VERSION );
49 }
50
51 /**
52 * Displays the control content.
53 *
54 * @since 1.0.23
55 * @access public
56 * @return void
57 */
58 public function render_content() {
59 ?>
60 <label>
61 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
62 <div class="loginpress-range-slider" style="width:100%; display:flex;flex-direction: row;justify-content: flex-start;">
63 <span style="width:100%; flex: 1 0 0; vertical-align: middle;">
64 <span class="loginpress-range-slider_reset"><a type="button" value="reset" class="loginpress-range-reset"></a></span>
65 <input class="loginpress-range-slider_range" data-default-value="<?php echo esc_html( $this->default ); ?>" type="range" value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->input_attrs(); $this->link(); ?>>
66 <input type="text" class="loginpress-range-slider_val" value="<?php echo esc_attr( $this->value() ); ?>" />
67 <span><?php echo $this->unit; ?></span>
68 </span>
69 </div>
70 <?php if ( ! empty( $this->description ) ) : ?>
71 <span class="description customize-control-description"><?php echo $this->description; ?></span>
72 <?php endif; ?>
73 </label>
74 <?php
75 }
76 }
77