Skip to content

Commit

Permalink
TinyMCE: update to 4.6.0. Has many new features and bug fixes, change…
Browse files Browse the repository at this point in the history
  • Loading branch information
azaozz committed May 8, 2017
1 parent 1b85aa4 commit dd0d110
Show file tree
Hide file tree
Showing 52 changed files with 13,224 additions and 14,886 deletions.
6 changes: 6 additions & 0 deletions wp-admin/includes/update-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,12 @@
'wp-includes/theme-compat/comments-popup.php',
// 4.6
'wp-admin/includes/class-wp-automatic-upgrader.php', // Wrong file name, see #37628.
// 4.8
'wp-includes/js/tinymce/plugins/media/moxieplayer.swf',
'wp-includes/js/tinymce/skins/lightgray/fonts/readme.md',
'wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.json',
'wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.json',
'wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css',
);

/**
Expand Down
64 changes: 53 additions & 11 deletions wp-includes/class-wp-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,7 @@ private static function default_settings() {
'cache_suffix' => 'wp-mce-' . $tinymce_version,
'resize' => 'vertical',
'menubar' => false,
'branding' => false,

// Limit the preview styles in the menu/toolbar
'preview_styles' => 'font-family font-size font-weight font-style text-decoration text-transform',
Expand Down Expand Up @@ -1039,6 +1040,9 @@ private static function get_translation() {
'Name' => _x( 'Name', 'Name of link anchor (TinyMCE)' ),
'Anchor' => _x( 'Anchor', 'Link anchor (TinyMCE)' ),
'Anchors' => _x( 'Anchors', 'Link anchors (TinyMCE)' ),
'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' =>
__( 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' ),
'Id' => _x( 'Id', 'Id for link anchor (TinyMCE)' ),

// Fullpage plugin
'Document properties' => __( 'Document properties' ),
Expand All @@ -1050,6 +1054,7 @@ private static function get_translation() {
'Author' => __( 'Author' ),

// Media, image plugins
'Image' => __( 'Image' ),
'Insert/edit image' => array( __( 'Insert/edit image' ), 'accessM' ),
'General' => __( 'General' ),
'Advanced' => __( 'Advanced' ),
Expand All @@ -1061,8 +1066,13 @@ private static function get_translation() {
'Style' => __( 'Style' ),
'Dimensions' => __( 'Dimensions' ),
'Insert image' => __( 'Insert image' ),
'Date/time' => __( 'Date/time' ),
'Insert date/time' => __( 'Insert date/time' ),
'Insert/edit video' => __( 'Insert/edit video' ),
'Table of Contents' => __( 'Table of Contents' ),
'Insert/Edit code sample' => __( 'Insert/edit code sample' ),
'Language' => __( 'Language' ),
'Media' => __( 'Media' ),
'Insert/edit media' => __( 'Insert/edit media' ),
'Poster' => __( 'Poster' ),
'Alternative source' => __( 'Alternative source' ),
'Paste your embed code below:' => __( 'Paste your embed code below:' ),
Expand All @@ -1087,10 +1097,26 @@ private static function get_translation() {
'Insert/edit link' => array( __( 'Insert/edit link' ), 'metaK' ),
'Remove link' => array( __( 'Remove link' ), 'accessS' ),

// Link plugin
'Link' => __( 'Link' ),
'Insert link' => __( 'Insert link' ),
'Insert/edit link' => __( 'Insert/edit link' ),
'Target' => __( 'Target' ),
'New window' => __( 'New window' ),
'Text to display' => __( 'Text to display' ),
'Url' => __( 'URL' ),
'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?' =>
__( 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?' ),
'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' =>
__( 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' ),

'Color' => __( 'Color' ),
'Custom color' => __( 'Custom color' ),
'Custom...' => _x( 'Custom...', 'label for custom color' ), // no ellipsis
'No color' => __( 'No color' ),
'R' => _x( 'R', 'Short for red in RGB' ),
'G' => _x( 'G', 'Short for green in RGB' ),
'B' => _x( 'B', 'Short for blue in RGB' ),

// Spelling, search/replace plugins
'Could not find the specified string.' => __( 'Could not find the specified string.' ),
Expand Down Expand Up @@ -1235,16 +1261,27 @@ private static function get_translation() {
);
}

/**
* Link plugin (not included):
* Insert link
* Target
* New window
* Text to display
* The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?
* The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?
* Url
*/
/*
Imagetools plugin (not included):
'Edit image' => __( 'Edit image' ),
'Image options' => __( 'Image options' ),
'Back' => __( 'Back' ),
'Invert' => __( 'Invert' ),
'Flip horizontally' => __( 'Flip horizontally' ),
'Flip vertically' => __( 'Flip vertically' ),
'Crop' => __( 'Crop' ),
'Orientation' => __( 'Orientation' ),
'Resize' => __( 'Resize' ),
'Rotate clockwise' => __( 'Rotate clockwise' ),
'Rotate counterclockwise' => __( 'Rotate counterclockwise' ),
'Sharpen' => __( 'Sharpen' ),
'Brightness' => __( 'Brightness' ),
'Color levels' => __( 'Color levels' ),
'Contrast' => __( 'Contrast' ),
'Gamma' => __( 'Gamma' ),
'Zoom in' => __( 'Zoom in' ),
'Zoom out' => __( 'Zoom out' ),
*/

return self::$translation;
}
Expand Down Expand Up @@ -1456,6 +1493,11 @@ public static function editor_js() {
var init, id, $wrap;

if ( typeof tinymce !== 'undefined' ) {
if ( tinymce.Env.ie && tinymce.Env.ie < 11 ) {
tinymce.$( '.wp-editor-wrap ' ).removeClass( 'tmce-active' ).addClass( 'html-active' );
return;
}

for ( id in tinyMCEPreInit.mceInit ) {
init = tinyMCEPreInit.mceInit[id];
$wrap = tinymce.$( '#wp-' + id + '-wrap' );
Expand Down
4 changes: 3 additions & 1 deletion wp-includes/general-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -2988,7 +2988,9 @@ function user_can_richedit() {
if ( get_user_option( 'rich_editing' ) == 'true' || ! is_user_logged_in() ) { // default to 'true' for logged out users
if ( $is_safari ) {
$wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
} elseif ( $is_gecko || $is_chrome || $is_IE || $is_edge || ( $is_opera && !wp_is_mobile() ) ) {
} elseif ( $is_IE ) {
$wp_rich_edit = ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE ' ) === false );
} elseif ( $is_gecko || $is_chrome || $is_edge || ( $is_opera && !wp_is_mobile() ) ) {
$wp_rich_edit = true;
}
}
Expand Down
12 changes: 6 additions & 6 deletions wp-includes/js/tinymce/license.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999

Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand All @@ -10,7 +10,7 @@
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]

Preamble
Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Expand Down Expand Up @@ -112,7 +112,7 @@ modification follow. Pay close attention to the difference between a
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.

GNU LESSER GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License Agreement applies to any software library or other
Expand Down Expand Up @@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

NO WARRANTY
NO WARRANTY

15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
Expand All @@ -455,7 +455,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Libraries

Expand Down
Loading

0 comments on commit dd0d110

Please sign in to comment.