PluginProbe
Modal Window – create popup modal window / 5.3
Modal Window – create popup modal window v5.3
6.3 trunk 2.5 3.1.1 3.1.2 3.2.2 4.0.1 4.0.3 5.0.6 5.1.1 5.2 5.2.1 5.2.2 5.2.3 5.3 5.3.1 5.3.10 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8 5.3.9 All 45 releases
modal-window / admin / fields / textarea.php

textarea.php in Modal Window – create popup modal window 5.3, at admin/fields/textarea.php

54 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template for field textarea
4 *
5 * @package Wow_Plugin
6 * @copyright Copyright (c) 2018, Dmytro Lobov
7 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8 * @since 1.0
9 */
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit;
13 }
14
15 $label = ! empty( $arg['label'] ) ? $arg['label'] : '';
16 $attr = ! empty( $arg['attr'] ) ? $arg['attr'] : '';
17 $help = ! empty( $arg['help'] ) ? $arg['help'] : '';
18 $tooltip = ! empty( $arg['tooltip'] ) ? $arg['tooltip'] : '';
19
20 $control_classes = 'control';
21
22 $add_field_class = ! empty( $arg['attr']['class'] ) ? ' ' . $arg['attr']['class'] : '';
23 $field_classes = 'textarea is-primary is-radiusless' . $add_field_class;
24
25 $attributes = '';
26 foreach ( $attr as $key => $val ) {
27 if ( $key == 'class' || $key == 'value' ) {
28 continue;
29 }
30 $attributes .= esc_attr( $key ) . '="' . esc_attr( $val ) . '"';
31 }
32 ?>
33
34 <?php if ( ! empty( $label ) ) : ?>
35 <label class="label">
36 <?php echo esc_attr( $label ); ?>
37 <?php if ( ! empty( $tooltip ) ) : ?>
38 <span class="is-primary has-tooltip-multiline has-tooltip-right"
39 data-tooltip="<?php echo esc_attr( $tooltip ); ?>">
40 <span class="wow-help dashicons dashicons-editor-help"></span>
41 </span>
42 <?php endif; ?>
43 </label>
44 <?php endif; ?>
45 <div class="field">
46 <div class="<?php echo esc_attr( $control_classes ); ?>">
47 <textarea
48 class="<?php echo esc_attr( $field_classes ); ?>" <?php echo $attributes; ?>><?php echo esc_attr( $attr['value'] ); ?></textarea>
49 </div>
50
51 </div>
52 <?php if ( ! empty( $help ) ) : ?>
53 <p class="help is-info"><?php echo esc_attr( $help ); ?></p>
54 <?php endif; ?>