PluginProbe
Cool Timeline (Horizontal & Vertical Timeline) / trunk
Cool Timeline (Horizontal & Vertical Timeline) vtrunk
3.4.0 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 2.2.3 2.3.3 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.6.1 2.7.1 2.8.3 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 All 79 releases
cool-timeline / admin / codestar-framework / fields / textarea / textarea.php

textarea.php in Cool Timeline (Horizontal & Vertical Timeline) trunk, at admin/codestar-framework/fields/textarea/textarea.php

50 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2 // phpcs:ignoreFile WordPress.Security.EscapeOutput.OutputNotEscaped
3 /**
4 *
5 * Field: textarea
6 *
7 * @since 1.0.0
8 * @version 1.0.0
9 *
10 */
11 if ( ! class_exists( 'CSF_Field_textarea' ) ) {
12 class CSF_Field_textarea extends CSF_Fields {
13
14 public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
15 parent::__construct( $field, $value, $unique, $where, $parent );
16 }
17
18 public function render() {
19
20 echo $this->field_before();
21 echo $this->shortcoder();
22 echo '<textarea name="'. esc_attr( $this->field_name() ) .'"'. $this->field_attributes() .'>'. $this->value .'</textarea>';
23 echo $this->field_after();
24
25 }
26
27 public function shortcoder() {
28
29 if ( ! empty( $this->field['shortcoder'] ) ) {
30
31 $instances = ( is_array( $this->field['shortcoder'] ) ) ? $this->field['shortcoder'] : array_filter( (array) $this->field['shortcoder'] );
32
33 foreach ( $instances as $instance_key ) {
34
35 if ( isset( CSF::$shortcode_instances[$instance_key] ) ) {
36
37 $button_title = CSF::$shortcode_instances[$instance_key]['button_title'];
38
39 echo '<a href="#" class="button button-primary csf-shortcode-button" data-modal-id="'. esc_attr( $instance_key ) .'">'. $button_title .'</a>';
40
41 }
42
43 }
44
45 }
46
47 }
48 }
49 }
50