1

I'm using the Sunrise open-source OOP framework to develop my plugin. I am building out a new settings page and I'm having trouble adding in a WYSIWYG/tiny MCE textarea to the settings page. I've tried following multiple tutorials on the internet and I've tried using wp_editor() but everytime I do, it spits out a warning:

Call to undefined function is_rtl()

The code I'm using is:

wp_editor( $content, 'sunrise-field-promotion_terms', $settings = array());

and the options in my sunrise plugin are:

$options = array(

    // Open tab: Regular fields
    array(
        'type' => 'opentab',
        'name' => __( 'Settings', 'promotion-plugin' )
    ),
array(
        'id'      => 'promotion_name',
        'type'    => 'text',
        'name'    => __( 'Promotion Title', 'promotion-plugin' ),
        'desc'    => __( 'Enter in the name of the Promotion', 'promotion-plugin' )
    ),
array(
        'id'      => 'promotion_startdate',
        'type'    => 'text',
        'name'    => __( 'Promotion Start Date', 'promotion-plugin' ),
        'desc'    => __( 'Enter in the Start Date of the Promotion (DD/MM/YYY)', 'promotion-plugin' )
    ),
array(
        'id'      => 'promotion_enddate',
        'type'    => 'text',
        'name'    => __( 'Promotion End Date', 'promotion-plugin' ),
        'desc'    => __( 'Enter in the End Date of the Promotion (DD/MM/YYY)', 'promotion-plugin' )
    ),
array(
        'id'      => 'application_form',
        'type'    => 'select',
        'default' => 'application-1',
        'name'    => __( 'Select an Application Form', 'promotion-plugin' ),
        'desc'    => __( 'Select one of the existing application forms for customers to submit their applications to obtain their promotion.', 'promotion-plugin' ),
        'options' => array(
            array(
                'value' => 'application-1',
                'label'  => __( 'Cash Back Application Form', 'promotion-plugin' )
            )
        )
    ),
array(
        'id'      => 'promotion_terms',
        'type'    => 'textarea',
  'class'   => 'test',
        'name'    => __( 'Promotion Terms & Conditions', 'promotion-plugin' ),
        'desc'    => __( 'Enter the terms & conditions to the promotion', 'promotion-plugin' )
    ),
array(
        'type' => 'closetab',
    )
);

Any help or direction would be appreciated!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.