PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.6.7
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.6.7
1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 1.7.0.9 1.8.0 All 210 releases
charitable / templates / form-fields / editor.php

editor.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.6.7, at templates/form-fields/editor.php

56 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template used to display the WP Editor in a form.
4 *
5 * @author Studio 164a
6 * @package Charitable/Templates/Form Fields
7 * @since 1.0.0
8 * @version 1.0.0
9 */
10
11 if ( ! isset( $view_args['form'] ) || ! isset( $view_args['field'] ) ) {
12 return;
13 }
14
15 $form = $view_args['form'];
16 $field = $view_args['field'];
17 $classes = $view_args['classes'];
18 $is_required = isset( $field['required'] ) ? $field['required'] : false;
19 $value = isset( $field['value'] ) ? $field['value'] : '';
20 $editor_args = isset( $field['editor'] ) ? wpautop( $field['editor'] ) : array();
21
22 /**
23 * Change the editor settings.
24 *
25 * @see https://developer.wordpress.org/reference/classes/_wp_editors/parse_settings/
26 *
27 * @since 1.5.0
28 *
29 * @param array $settings The default settings.
30 */
31 $default_editor_args = array(
32 'media_buttons' => true,
33 'teeny' => true,
34 'quicktags' => false,
35 'tinymce' => array(
36 'theme_advanced_path' => false,
37 'theme_advanced_buttons1' => 'bold,italic,bullist,numlist,blockquote,justifyleft,justifycenter,justifyright,link,unlink',
38 ),
39 );
40
41 $editor_args = wp_parse_args( $editor_args, $default_editor_args );
42 ?>
43 <div id="charitable_field_<?php echo $field['key'] ?>" class="<?php echo $classes ?>">
44 <?php if ( isset( $field['label'] ) ) : ?>
45 <label for="<?php echo esc_attr( $field['key'] ) ?>">
46 <?php echo $field['label'] ?>
47 <?php if ( $is_required ) : ?>
48 <abbr class="required" title="required">*</abbr>
49 <?php endif ?>
50 </label>
51 <?php endif ?>
52 <?php
53 wp_editor( $value, $field['key'], $editor_args );
54 ?>
55 </div>
56