_comment.php
4 months ago
_db.php
4 months ago
_hidden.php
4 months ago
_label.php
4 months ago
_row.php
4 months ago
attachment.php
4 months ago
checkbox.php
4 months ago
cleditor.php
4 months ago
codemirror.php
4 months ago
color.php
4 months ago
currency.php
4 months ago
date.php
4 months ago
datetime.php
4 months ago
email.php
4 months ago
link.php
4 months ago
number.php
4 months ago
oembed.php
4 months ago
password.php
4 months ago
phone.php
4 months ago
radio.php
4 months ago
select.php
4 months ago
slider.php
4 months ago
slug.php
4 months ago
text.php
4 months ago
textarea.php
4 months ago
time.php
4 months ago
tinymce.php
4 months ago
website.php
4 months ago
tinymce.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | // Don't load directly. |
| 4 | if ( ! defined( 'ABSPATH' ) ) { |
| 5 | die( '-1' ); |
| 6 | } |
| 7 | |
| 8 | // phpcs:ignoreFile WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound |
| 9 | |
| 10 | $settings = array(); |
| 11 | $settings['textarea_name'] = $name; |
| 12 | $settings['media_buttons'] = false; |
| 13 | if ( ! ( defined( 'PODS_DISABLE_FILE_UPLOAD' ) && true === PODS_DISABLE_FILE_UPLOAD ) && ! ( defined( 'PODS_UPLOAD_REQUIRE_LOGIN' ) && is_bool( PODS_UPLOAD_REQUIRE_LOGIN ) && true === PODS_UPLOAD_REQUIRE_LOGIN && ! is_user_logged_in() ) && ! ( defined( 'PODS_UPLOAD_REQUIRE_LOGIN' ) && ! is_bool( PODS_UPLOAD_REQUIRE_LOGIN ) && ( ! is_user_logged_in() || ! current_user_can( PODS_UPLOAD_REQUIRE_LOGIN ) ) ) ) { |
| 14 | $settings['media_buttons'] = (bool) pods_v( 'wysiwyg_media_buttons', $options, true ); |
| 15 | } |
| 16 | |
| 17 | $editor_height = pods_v( 'wysiwyg_editor_height', $options, false ); |
| 18 | if ( $editor_height ) { |
| 19 | $settings['editor_height'] = $editor_height; |
| 20 | } |
| 21 | |
| 22 | if ( isset( $options['settings'] ) ) { |
| 23 | $settings = array_merge( $settings, $options['settings'] ); |
| 24 | } |
| 25 | |
| 26 | $attributes = array(); |
| 27 | $attributes = PodsForm::merge_attributes( $attributes, $name, $form_field_type, $options, 'pods-ui-field-tinymce' ); |
| 28 | $class_attributes = array( 'class' => $attributes['class'] ); |
| 29 | ?> |
| 30 | <div<?php PodsForm::attributes( $class_attributes, $name, $form_field_type, $options ); ?>> |
| 31 | <?php wp_editor( (string) $value, $attributes['id'], $settings ); ?> |
| 32 | </div> |
| 33 |