20 var
$icon =
'dashicons-editor-alignleft';
23 $this->label = esc_html__(
'Post Content',
'gk-gravityview' );
24 parent::__construct();
29 unset( $field_options[
'show_as_link'] );
31 if(
'edit' === $context ) {
32 return $field_options;
37 return $field_options;
53 $input_name =
"input_{$id}";
55 $tabindex =
$field->get_tabindex();
57 $editor_settings = array(
58 'editor_class' =>
"textarea {$class}",
59 'textarea_name' => $input_name,
60 'textarea_rows' => 15,
61 'tabindex' => $tabindex,
62 'media_buttons' =>
false,
64 'logic_event' =>
$field->get_conditional_logic_event(
'keyup' ),
65 'placeholder' =>
$field->get_field_placeholder_attribute(),
74 $editor_settings = apply_filters(
'gravityview/edit_entry/post_content/wp_editor_settings', $editor_settings );
77 wp_editor(
$value, $input_name, $editor_settings );
78 $editor = ob_get_clean();
84 $editor = str_replace(
'<textarea ',
"<textarea {$logic_event} {$placeholder}", $editor );
86 return sprintf(
"<div class='ginput_container ginput_container_post_content'>%s</div>", trim( $editor ) );
Modify field settings by extending this class.
add_field_support( $key, &$field_options)
get_field_input( $form, $value='', $entry=null, GF_Field_Post_Content $field=null)
Returns the field inner markup.
if(gravityview() ->plugin->is_GF_25()) $form
new GravityView_Field_Post_Content
field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id)
if(empty( $created_by)) $form_id
static get( $array, $key, $default=null)
Grab a value from an array or an object or default.
if(false !==strpos( $value, '00:00')) $field_id
string $field_id ID of the field being displayed