Opened 17 months ago
Closed 15 months ago
#19648 closed defect (bug) (fixed)
mce_external_languages/plugins prints twice
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | TinyMCE | Version: | 3.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
When adding a language using the 'mce_external_languages' filter the contents get printed for each external plugin loaded.
to fix wp-includes/class.wp-editor.php line 210 add
self::$ext_plugins .= $ext_plugins;
same file line 212 add
$ext_plugins = '';
(first one goes before the foreach loop and the second goes at the beginning of the loop)
Attachments (2)
Change History (6)
SergeyBiryukov — 17 months ago
comment:1
SergeyBiryukov — 17 months ago
- Keywords has-patch added
comment:2
SergeyBiryukov — 17 months ago
- Milestone changed from Awaiting Review to 3.4
- Summary changed from mce_external_languages prints twice to mce_external_languages/plugins prints twice
Almost the same as 20030.diff and 19648.patch but keep self::$ext_plugins .= $ext_plugins; in the code block that runs only once per load.
Note: See
TracTickets for help on using
tickets.

Also: #20030 and 20030.diff
Bug can be replicated for external plugins with:
function trac20030_mce_external_plugins( $plugins ) { $plugins['myplugin1'] = WP_PLUGIN_URL . '/myplugin1.js'; $plugins['myplugin2'] = WP_PLUGIN_URL . '/myplugin2.js'; return $plugins; } add_filter( 'mce_external_plugins', 'trac20030_mce_external_plugins' );