PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 1.5.2
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v1.5.2
2.1.3 2.1.2 2.1.1 2.1.0 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 trunk 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 All 57 releases
darkify / src / Admin / Framework / fields / text / text.php

text.php in Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) 1.5.2, at src/Admin/Framework/fields/text/text.php

29 lines 836 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) {
2 die; } // Cannot access directly.
3 /**
4 *
5 * Field: text
6 *
7 * @since 1.0.0
8 * @version 1.0.0
9 */
10 if ( ! class_exists( 'DarkifyField_text' ) ) {
11 class DarkifyField_text extends DarkifyFields {
12
13 public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14 parent::__construct( $field, $value, $unique, $where, $parent );
15 }
16
17 public function render() {
18
19 $type = ( ! empty( $this->field['attributes']['type'] ) ) ? $this->field['attributes']['type'] : 'text';
20
21 echo wp_kses_post( $this->field_before() );
22
23 echo '<input type="' . esc_attr( $type ) . '" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . wp_kses_post( $this->field_attributes() ) . ' />';
24
25 echo wp_kses_post( $this->field_after() );
26 }
27 }
28 }
29