WordPress.org

Make WordPress Core

Ticket #27880: 27880.diff

File 27880.diff, 1.1 KB (added by kraftbj, 8 years ago)

Add a filter for the default args

  • src/wp-admin/edit-form-advanced.php

     
    485485?>
    486486<div id="postdivrich" class="postarea edit-form-section">
    487487
    488 <?php wp_editor( $post->post_content, 'content', array(
     488<?php $wp_editor_args = array(
    489489        'dfw' => true,
    490490        'drag_drop_upload' => true,
    491491        'tabfocus_elements' => 'insert-media-button,save-post',
     
    493493        'tinymce' => array(
    494494                'resize' => false,
    495495                'add_unload_trigger' => false,
    496         ),
    497 ) ); ?>
     496                ),
     497        );
     498/**
     499* Filter the default args that setup the TinyMCE Editor on the Edit Posts page.
     500*
     501* @since 3.9.1
     502*
     503* @param array  $wp_editor_args Array of configuration arguments for TinyMCE.
     504*/
     505
     506$wp_editor_args = apply_filters( 'edit_form_editor_args', $wp_editor_args );
     507
     508wp_editor( $post->post_content, 'content', $wp_editor_args ); ?>
    498509<table id="post-status-info"><tbody><tr>
    499510        <td id="wp-word-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></td>
    500511        <td class="autosave-info">