LLMS_Metabox_Text_Field
LLMS_Metabox_Text_Field class
Source Source
File: includes/admin/post-types/meta-boxes/fields/llms.class.meta.box.text.php
class LLMS_Metabox_Text_Field extends LLMS_Metabox_Field implements Meta_Box_Field_Interface {
public function __construct( $_field ) {
$this->field = $_field;
}
/**
* outputs the Html for the given field
*
* @since 3.36.0 Convert quotes (double and single) HTML entities back to characters.
* @return void
*/
public function output() {
global $post;
parent::output(); ?>
<input type="text"
name="<?php echo $this->field['id']; ?>"
id="<?php echo $this->field['id']; ?>"
<?php if ( array_key_exists( 'required', $this->field ) && $this->field['required'] ) : ?>
required="required"
<?php endif; ?>
class="<?php echo esc_attr( $this->field['class'] ); ?>"
value="<?php echo htmlentities( htmlspecialchars_decode( $this->meta, ENT_QUOTES ) ); ?>" size="30"
<?php if ( isset( $this->field['required'] ) && $this->field['required'] ) : ?>
required="required"
<?php endif; ?>
/>
<?php
parent::close_output();
}
}
Expand full source code Collapse full source code View on GitHub
Methods Methods
- __construct
- output — outputs the Html for the given field
Changelog Changelog
| Version | Description |
|---|---|
| 3.36.0 | Introduced. |