Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#28259 closed enhancement (duplicate)

Add filter to enable users to alter the WP Editor settings

Reported by: Kau-Boy Owned by:
Priority: normal Milestone:
Component: Editor Version: 4.0
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

A user wanted to have the WYSIWYG (HTML) view available in the media editing. But as far as I can see, it is currently impossible to do so without hacking the core and setting the flag "tinymce" to true.

Adding a filter would enable users (or plugin developers) to alter the settings passed to the parse_settings() function.

I have a patch attached to this ticket and already wrote a little plugin to test it:

<?php
/*
Plugin Name: WP Editor Settings
Description: Change the settings for the WP Editor
*/

add_action( 'wp_editor_settings', 'activate_tinymce_on_media', 10, 2 );

function activate_tinymce_on_media( $settings, $editor_id ) {
	if ( 'attachment_content' == $editor_id ) {
		$settings['tinymce'] = true;
	}
	
	return $settings;
}

P.S. If you decide to add such a fitler, feel free to use another name for it.

Attachments (1)

28259.diff​ (695 bytes ) - added by Kau-Boy 12 years ago.

Download all attachments as: .zip

Change History (5)

@Kau-Boy
12 years ago

#1 @zodiac1978
12 years ago

  • Keywords has-patch dev-feedback added

#2 follow-up: @helen
12 years ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed

Duplicate of #24472.

#3 in reply to: ↑ 2 ; follow-up: @ocean90
12 years ago

  • Keywords dev-feedback removed
  • Type feature request → enhancement

Replying to helen:

Duplicate of #24472.

This is more an exact duplicate of #19103. I also prefer a global filter like this which seems to be the latest idea in #24472.

#4 in reply to: ↑ 3 @Kau-Boy
12 years ago

Replying to ocean90:

You are right, looks pretty much the same. I haven't found this closed ticket before creating my one. Sorry.

But now matter how you solve it, some filter should be added somewhere.

Note: See TracTickets for help on using tickets.