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 / editor.php

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

48 lines 1.4 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 Editor
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 $icon = ! empty( $arg['icon'] ) ? $arg['icon'] : '';
19 $tooltip = ! empty( $arg['tooltip'] ) ? $arg['tooltip'] : '';
20
21 $settings = array(
22 'wpautop' => 0,
23 'media_buttons' => 1,
24 'textarea_name' => '' . $attr['name'] . '',
25 'textarea_rows' => 15,
26 );
27
28 ?>
29 <?php if ( ! empty( $label ) ) : ?>
30 <label class="label">
31 <?php echo esc_attr( $label ); ?>
32 <?php if ( ! empty( $tooltip ) ) : ?>
33 <span class="is-primary has-tooltip-multiline has-tooltip-right"
34 data-tooltip="<?php echo esc_attr( $tooltip ); ?>">
35 <span class="wow-help dashicons dashicons-editor-help"></span>
36 </span>
37 <?php endif; ?>
38 </label>
39 <?php endif; ?>
40 <div class="field">
41
42 <div class="control">
43 <?php wp_editor( $attr['value'], $attr['id'], $settings ); ?>
44 </div>
45 </div>
46 <?php if ( ! empty( $help ) ) : ?>
47 <p class="help is-info"><?php echo esc_attr( $help ); ?></p>
48 <?php endif; ?>