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