Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
294c6ebe24 | ||
|
|
31d8e7d909 | ||
|
|
998a0152f4 | ||
|
|
20d537e973 | ||
|
|
59123b5b24 | ||
|
|
c84cda9fd0 | ||
|
|
44e684419b | ||
|
|
9bfc7ded12 | ||
|
|
3ea969bb66 | ||
|
|
ca63f2f7bc | ||
|
|
02f7ebf6bd | ||
|
|
9f63726656 | ||
|
|
58ef0cfe87 | ||
|
|
8a1f083851 | ||
|
|
62ba7f4052 | ||
|
|
b363cf3170 | ||
|
|
9141a73031 | ||
|
|
f0152dc74c | ||
|
|
a367bb8b59 | ||
|
|
4851ef111c | ||
|
|
d82e5908da |
@@ -9,7 +9,7 @@
|
||||
<body>
|
||||
<h1 id="logo">
|
||||
<a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
|
||||
<br /> Version 4.5
|
||||
<br /> Version 4.5.1
|
||||
</h1>
|
||||
<p style="text-align: center">Semantic Personal Publishing Platform</p>
|
||||
|
||||
|
||||
@@ -38,6 +38,14 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
|
||||
</h2>
|
||||
|
||||
<div class="changelog point-releases">
|
||||
<h3><?php _e( 'Maintenance Release' ) ?></h3>
|
||||
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed %2$s bugs.', 12 ), '4.5.1', number_format_i18n( 12 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.5.1' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="headline-feature feature-video" style="background-color:#191E23;">
|
||||
<iframe width="1050" height="591" src="<?php echo esc_url( $video_url ); ?>" frameborder="0" allowfullscreen></iframe>
|
||||
<script src="https://videopress.com/videopress-iframe.js"></script>
|
||||
|
||||
@@ -1586,9 +1586,9 @@ body.full-overlay-active {
|
||||
}
|
||||
|
||||
.preview-tablet .wp-full-overlay-main {
|
||||
margin: auto -3in auto 0;
|
||||
width: 6in; /* Size is loosely based on a typical "tablet" device size. Intentionally ambiguous - this does not represent any particular device precisely. */
|
||||
height: 9in;
|
||||
margin: auto -360px auto 0;
|
||||
width: 720px; /* Size is loosely based on a typical "tablet" device size. Intentionally ambiguous - this does not represent any particular device precisely. */
|
||||
height: 1080px;
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
right: 50%;
|
||||
|
||||
2
wp-admin/css/themes-rtl.min.css
vendored
2
wp-admin/css/themes-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1586,9 +1586,9 @@ body.full-overlay-active {
|
||||
}
|
||||
|
||||
.preview-tablet .wp-full-overlay-main {
|
||||
margin: auto 0 auto -3in;
|
||||
width: 6in; /* Size is loosely based on a typical "tablet" device size. Intentionally ambiguous - this does not represent any particular device precisely. */
|
||||
height: 9in;
|
||||
margin: auto 0 auto -360px;
|
||||
width: 720px; /* Size is loosely based on a typical "tablet" device size. Intentionally ambiguous - this does not represent any particular device precisely. */
|
||||
height: 1080px;
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
left: 50%;
|
||||
|
||||
2
wp-admin/css/themes.min.css
vendored
2
wp-admin/css/themes.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -2602,7 +2602,7 @@ function wp_ajax_send_attachment_to_editor() {
|
||||
$rel = $rel ? ' rel="attachment wp-att-' . $id . '"' : ''; // Hard-coded string, $id is already sanitized
|
||||
|
||||
if ( ! empty( $url ) ) {
|
||||
$html = '<a href="' . esc_url( $url ) . '"' . $rel . '">' . $html . '</a>';
|
||||
$html = '<a href="' . esc_url( $url ) . '"' . $rel . '>' . $html . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -491,7 +491,7 @@ function iis7_rewrite_rule_exists($filename) {
|
||||
if ( $doc->load($filename) === false )
|
||||
return false;
|
||||
$xpath = new DOMXPath($doc);
|
||||
$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
|
||||
$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]');
|
||||
if ( $rules->length == 0 )
|
||||
return false;
|
||||
else
|
||||
@@ -521,7 +521,7 @@ function iis7_delete_rewrite_rule($filename) {
|
||||
if ( $doc -> load($filename) === false )
|
||||
return false;
|
||||
$xpath = new DOMXPath($doc);
|
||||
$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
|
||||
$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]');
|
||||
if ( $rules->length > 0 ) {
|
||||
$child = $rules->item(0);
|
||||
$parent = $child->parentNode;
|
||||
@@ -562,7 +562,7 @@ function iis7_add_rewrite_rule($filename, $rewrite_rule) {
|
||||
$xpath = new DOMXPath($doc);
|
||||
|
||||
// First check if the rule already exists as in that case there is no need to re-add it
|
||||
$wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
|
||||
$wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]');
|
||||
if ( $wordpress_rules->length > 0 )
|
||||
return true;
|
||||
|
||||
|
||||
@@ -376,8 +376,8 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||
*/
|
||||
if ( is_callable( array( $this->image, 'getImageAlphaChannel' ) )
|
||||
&& is_callable( array( $this->image, 'setImageAlphaChannel' ) )
|
||||
&& defined( Imagick::ALPHACHANNEL_UNDEFINED )
|
||||
&& defined( Imagick::ALPHACHANNEL_OPAQUE )
|
||||
&& defined( 'Imagick::ALPHACHANNEL_UNDEFINED' )
|
||||
&& defined( 'Imagick::ALPHACHANNEL_OPAQUE' )
|
||||
) {
|
||||
if ( $this->image->getImageAlphaChannel() === Imagick::ALPHACHANNEL_UNDEFINED ) {
|
||||
$this->image->setImageAlphaChannel( Imagick::ALPHACHANNEL_OPAQUE );
|
||||
|
||||
@@ -630,10 +630,11 @@ function feed_content_type( $type = '' ) {
|
||||
$type = get_default_feed();
|
||||
|
||||
$types = array(
|
||||
'rss' => 'application/rss+xml',
|
||||
'rss2' => 'application/rss+xml',
|
||||
'atom' => 'application/atom+xml',
|
||||
'rdf' => 'application/rdf+xml'
|
||||
'rss' => 'application/rss+xml',
|
||||
'rss2' => 'application/rss+xml',
|
||||
'rss-http' => 'text/xml',
|
||||
'atom' => 'application/atom+xml',
|
||||
'rdf' => 'application/rdf+xml'
|
||||
);
|
||||
|
||||
$content_type = ( !empty($types[$type]) ) ? $types[$type] : 'application/octet-stream';
|
||||
|
||||
@@ -4582,7 +4582,7 @@ function print_emoji_detection_script() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>;
|
||||
!function(a,b,c){function d(a){var c,d,e,f=b.createElement("canvas"),g=f.getContext&&f.getContext("2d"),h=String.fromCharCode;if(!g||!g.fillText)return!1;switch(g.textBaseline="top",g.font="600 32px Arial",a){case"flag":return g.fillText(h(55356,56806,55356,56826),0,0),f.toDataURL().length>3e3;case"diversity":return g.fillText(h(55356,57221),0,0),c=g.getImageData(16,16,1,1).data,g.fillText(h(55356,57221,55356,57343),0,0),c=g.getImageData(16,16,1,1).data,e=c[0]+","+c[1]+","+c[2]+","+c[3],d!==e;case"simple":return g.fillText(h(55357,56835),0,0),0!==g.getImageData(16,16,1,1).data[0];case"unicode8":return g.fillText(h(55356,57135),0,0),0!==g.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
|
||||
!function(a,b,c){function d(a){var c,d,e,f=b.createElement("canvas"),g=f.getContext&&f.getContext("2d"),h=String.fromCharCode;if(!g||!g.fillText)return!1;switch(g.textBaseline="top",g.font="600 32px Arial",a){case"flag":return g.fillText(h(55356,56806,55356,56826),0,0),f.toDataURL().length>3e3;case"diversity":return g.fillText(h(55356,57221),0,0),c=g.getImageData(16,16,1,1).data,d=c[0]+","+c[1]+","+c[2]+","+c[3],g.fillText(h(55356,57221,55356,57343),0,0),c=g.getImageData(16,16,1,1).data,e=c[0]+","+c[1]+","+c[2]+","+c[3],d!==e;case"simple":return g.fillText(h(55357,56835),0,0),0!==g.getImageData(16,16,1,1).data[0];case"unicode8":return g.fillText(h(55356,57135),0,0),0!==g.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -1854,7 +1854,7 @@ function wp_get_upload_dir() {
|
||||
* @return array See above for description.
|
||||
*/
|
||||
function wp_upload_dir( $time = null, $create_dir = true, $refresh_cache = false ) {
|
||||
static $cache = array();
|
||||
static $cache = array(), $tested_paths = array();
|
||||
|
||||
$key = sprintf( '%d-%s', get_current_blog_id(), (string) $time );
|
||||
|
||||
@@ -1874,13 +1874,10 @@ function wp_upload_dir( $time = null, $create_dir = true, $refresh_cache = false
|
||||
|
||||
if ( $create_dir ) {
|
||||
$path = $uploads['path'];
|
||||
$tested_paths = wp_cache_get( 'upload_dir_tested_paths' );
|
||||
|
||||
if ( ! is_array( $tested_paths ) ) {
|
||||
$tested_paths = array();
|
||||
}
|
||||
|
||||
if ( ! in_array( $path, $tested_paths, true ) ) {
|
||||
if ( array_key_exists( $path, $tested_paths ) ) {
|
||||
$uploads['error'] = $tested_paths[ $path ];
|
||||
} else {
|
||||
if ( ! wp_mkdir_p( $path ) ) {
|
||||
if ( 0 === strpos( $uploads['basedir'], ABSPATH ) ) {
|
||||
$error_path = str_replace( ABSPATH, '', $uploads['basedir'] ) . $uploads['subdir'];
|
||||
@@ -1889,10 +1886,9 @@ function wp_upload_dir( $time = null, $create_dir = true, $refresh_cache = false
|
||||
}
|
||||
|
||||
$uploads['error'] = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), esc_html( $error_path ) );
|
||||
} else {
|
||||
$tested_paths[] = $path;
|
||||
wp_cache_set( 'upload_dir_tested_paths', $tested_paths );
|
||||
}
|
||||
|
||||
$tested_paths[ $path ] = $uploads['error'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ tinymce.PluginManager.add('fullscreen', function(editor) {
|
||||
}
|
||||
|
||||
editor.on('init', function() {
|
||||
editor.addShortcut('Meta+Alt+F', '', toggleFullscreen);
|
||||
editor.addShortcut('Ctrl+Shift+F', '', toggleFullscreen);
|
||||
});
|
||||
|
||||
editor.on('remove', function() {
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){var a=tinymce.DOM.getViewPort();return{x:a.x,y:a.y}}function d(a){scrollTo(a.x,a.y)}function e(){function e(){m.setStyle(p,"height",b().h-(o.clientHeight-p.clientHeight))}var n,o,p,q,r=document.body,s=document.documentElement;l=!l,o=a.getContainer(),n=o.style,p=a.getContentAreaContainer().firstChild,q=p.style,l?(k=c(),f=q.width,g=q.height,q.width=q.height="100%",i=n.width,j=n.height,n.width=n.height="",m.addClass(r,"mce-fullscreen"),m.addClass(s,"mce-fullscreen"),m.addClass(o,"mce-fullscreen"),m.bind(window,"resize",e),e(),h=e):(q.width=f,q.height=g,i&&(n.width=i),j&&(n.height=j),m.removeClass(r,"mce-fullscreen"),m.removeClass(s,"mce-fullscreen"),m.removeClass(o,"mce-fullscreen"),m.unbind(window,"resize",h),d(k)),a.fire("FullscreenStateChanged",{state:l})}var f,g,h,i,j,k,l=!1,m=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Meta+Alt+F","",e)}),a.on("remove",function(){h&&m.unbind(window,"resize",h)}),a.addCommand("mceFullScreen",e),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Alt+F",selectable:!0,onClick:function(){e(),a.focus()},onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Meta+Alt+F",onClick:e,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return l}})});
|
||||
tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){var a=tinymce.DOM.getViewPort();return{x:a.x,y:a.y}}function d(a){scrollTo(a.x,a.y)}function e(){function e(){m.setStyle(p,"height",b().h-(o.clientHeight-p.clientHeight))}var n,o,p,q,r=document.body,s=document.documentElement;l=!l,o=a.getContainer(),n=o.style,p=a.getContentAreaContainer().firstChild,q=p.style,l?(k=c(),f=q.width,g=q.height,q.width=q.height="100%",i=n.width,j=n.height,n.width=n.height="",m.addClass(r,"mce-fullscreen"),m.addClass(s,"mce-fullscreen"),m.addClass(o,"mce-fullscreen"),m.bind(window,"resize",e),e(),h=e):(q.width=f,q.height=g,i&&(n.width=i),j&&(n.height=j),m.removeClass(r,"mce-fullscreen"),m.removeClass(s,"mce-fullscreen"),m.removeClass(o,"mce-fullscreen"),m.unbind(window,"resize",h),d(k)),a.fire("FullscreenStateChanged",{state:l})}var f,g,h,i,j,k,l=!1,m=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Ctrl+Shift+F","",e)}),a.on("remove",function(){h&&m.unbind(window,"resize",h)}),a.addCommand("mceFullScreen",e),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Alt+F",selectable:!0,onClick:function(){e(),a.focus()},onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Meta+Alt+F",onClick:e,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return l}})});
|
||||
@@ -19,7 +19,8 @@ tinymce.PluginManager.add('media', function(editor, url) {
|
||||
{regex: /youtube.com\/embed\/([a-z0-9\-_]+)/i, type: 'iframe', w: 560, h: 314, url: '//www.youtube.com/embed/$1', allowFullscreen: true},
|
||||
{regex: /vimeo\.com\/([0-9]+)/, type: 'iframe', w: 425, h: 350, url: '//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc', allowfullscreen: true},
|
||||
{regex: /vimeo\.com\/(.*)\/([0-9]+)/, type: "iframe", w: 425, h: 350, url: "//player.vimeo.com/video/$2?title=0&byline=0", allowfullscreen: true},
|
||||
{regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: '//maps.google.com/maps/ms?msid=$2&output=embed"', allowFullscreen: false}
|
||||
{regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: '//maps.google.com/maps/ms?msid=$2&output=embed"', allowFullscreen: false},
|
||||
{regex: /dailymotion\.com\/video\/([^_]+)/, type: 'iframe', w: 480, h: 270, url: '//www.dailymotion.com/embed/video/$1', allowFullscreen: true}
|
||||
];
|
||||
|
||||
var embedChange = (tinymce.Env.ie && tinymce.Env.ie <= 8) ? 'onChange' : 'onInput';
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -818,6 +818,10 @@ define("tinymce/pasteplugin/Clipboard", [
|
||||
draggingInternally = e.type == 'dragstart';
|
||||
});
|
||||
|
||||
function isPlainTextFileUrl(content) {
|
||||
return content['text/plain'].indexOf('file://') === 0;
|
||||
}
|
||||
|
||||
editor.on('drop', function(e) {
|
||||
var dropContent, rng;
|
||||
|
||||
@@ -829,7 +833,7 @@ define("tinymce/pasteplugin/Clipboard", [
|
||||
|
||||
dropContent = getDataTransferItems(e.dataTransfer);
|
||||
|
||||
if (!hasHtmlOrText(dropContent) && pasteImageData(e, rng)) {
|
||||
if ((!hasHtmlOrText(dropContent) || isPlainTextFileUrl(dropContent)) && pasteImageData(e, rng)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -839,20 +843,23 @@ define("tinymce/pasteplugin/Clipboard", [
|
||||
if (content) {
|
||||
e.preventDefault();
|
||||
|
||||
editor.undoManager.transact(function() {
|
||||
if (dropContent['mce-internal']) {
|
||||
editor.execCommand('Delete');
|
||||
}
|
||||
// FF 45 doesn't paint a caret when dragging in text in due to focus call by execCommand
|
||||
Delay.setEditorTimeout(editor, function() {
|
||||
editor.undoManager.transact(function() {
|
||||
if (dropContent['mce-internal']) {
|
||||
editor.execCommand('Delete');
|
||||
}
|
||||
|
||||
editor.selection.setRng(rng);
|
||||
editor.selection.setRng(rng);
|
||||
|
||||
content = Utils.trimHtml(content);
|
||||
content = Utils.trimHtml(content);
|
||||
|
||||
if (!dropContent['text/html']) {
|
||||
pasteText(content);
|
||||
} else {
|
||||
pasteHtml(content);
|
||||
}
|
||||
if (!dropContent['text/html']) {
|
||||
pasteText(content);
|
||||
} else {
|
||||
pasteHtml(content);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1670,7 +1677,7 @@ define("tinymce/pasteplugin/Plugin", [
|
||||
});
|
||||
|
||||
// Block all drag/drop events
|
||||
if (editor.paste_block_drop) {
|
||||
if (editor.settings.paste_block_drop) {
|
||||
editor.on('dragend dragover draggesture dragdrop drop drag', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -14,8 +14,14 @@
|
||||
tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
var cols, rows;
|
||||
|
||||
rows = editor.settings.textcolor_rows || 5;
|
||||
cols = editor.settings.textcolor_cols || 8;
|
||||
rows = {
|
||||
forecolor: editor.settings.forecolor_rows || editor.settings.textcolor_rows || 5,
|
||||
backcolor: editor.settings.backcolor_rows || editor.settings.textcolor_rows || 5
|
||||
};
|
||||
cols = {
|
||||
forecolor: editor.settings.forecolor_cols || editor.settings.textcolor_cols || 8,
|
||||
backcolor: editor.settings.backcolor_cols || editor.settings.textcolor_cols || 8
|
||||
};
|
||||
|
||||
function getCurrentColor(format) {
|
||||
var color;
|
||||
@@ -31,10 +37,10 @@ tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
return color;
|
||||
}
|
||||
|
||||
function mapColors() {
|
||||
function mapColors(type) {
|
||||
var i, colors = [], colorMap;
|
||||
|
||||
colorMap = editor.settings.textcolor_map || [
|
||||
colorMap = [
|
||||
"000000", "Black",
|
||||
"993300", "Burnt orange",
|
||||
"333300", "Dark olive",
|
||||
@@ -76,6 +82,9 @@ tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
"CC99FF", "Plum"
|
||||
];
|
||||
|
||||
colorMap = editor.settings.textcolor_map || colorMap;
|
||||
colorMap = editor.settings[type + '_map'] || colorMap;
|
||||
|
||||
for (i = 0; i < colorMap.length; i += 2) {
|
||||
colors.push({
|
||||
text: colorMap[i + 1],
|
||||
@@ -87,7 +96,9 @@ tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
}
|
||||
|
||||
function renderColorPicker() {
|
||||
var ctrl = this, colors, color, html, last, x, y, i, id = ctrl._id, count = 0;
|
||||
var ctrl = this, colors, color, html, last, x, y, i, id = ctrl._id, count = 0, type;
|
||||
|
||||
type = ctrl.settings.origin;
|
||||
|
||||
function getColorCellHtml(color, title) {
|
||||
var isNoColor = color == 'transparent';
|
||||
@@ -106,7 +117,7 @@ tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
);
|
||||
}
|
||||
|
||||
colors = mapColors();
|
||||
colors = mapColors(type);
|
||||
colors.push({
|
||||
text: tinymce.translate("No color"),
|
||||
color: "transparent"
|
||||
@@ -115,11 +126,11 @@ tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
html = '<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>';
|
||||
last = colors.length - 1;
|
||||
|
||||
for (y = 0; y < rows; y++) {
|
||||
for (y = 0; y < rows[type]; y++) {
|
||||
html += '<tr>';
|
||||
|
||||
for (x = 0; x < cols; x++) {
|
||||
i = y * cols + x;
|
||||
for (x = 0; x < cols[type]; x++) {
|
||||
i = y * cols[type] + x;
|
||||
|
||||
if (i > last) {
|
||||
html += '<td></td>';
|
||||
@@ -135,7 +146,7 @@ tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
if (editor.settings.color_picker_callback) {
|
||||
html += (
|
||||
'<tr>' +
|
||||
'<td colspan="' + cols + '" class="mce-custom-color-btn">' +
|
||||
'<td colspan="' + cols[type] + '" class="mce-custom-color-btn">' +
|
||||
'<div id="' + id + '-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" ' +
|
||||
'role="button" tabindex="-1" aria-labelledby="' + id + '-c" style="width: 100%">' +
|
||||
'<button type="button" role="presentation" tabindex="-1">' + tinymce.translate('Custom...') + '</button>' +
|
||||
@@ -146,7 +157,7 @@ tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
|
||||
html += '<tr>';
|
||||
|
||||
for (x = 0; x < cols; x++) {
|
||||
for (x = 0; x < cols[type]; x++) {
|
||||
html += getColorCellHtml('', 'Custom color');
|
||||
}
|
||||
|
||||
@@ -175,7 +186,9 @@ tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
}
|
||||
|
||||
function onPanelClick(e) {
|
||||
var buttonCtrl = this.parent(), value;
|
||||
var buttonCtrl = this.parent(), value, type;
|
||||
|
||||
type = buttonCtrl.settings.origin;
|
||||
|
||||
function selectColor(value) {
|
||||
buttonCtrl.hidePanel();
|
||||
@@ -214,8 +227,8 @@ tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
|
||||
// Shift colors to the right
|
||||
// TODO: Might need to be the left on RTL
|
||||
if (i == cols) {
|
||||
for (i = 0; i < cols - 1; i++) {
|
||||
if (i == cols[type]) {
|
||||
for (i = 0; i < cols[type] - 1; i++) {
|
||||
setDivColor(customColorCells[i], customColorCells[i + 1].getAttribute('data-mce-color'));
|
||||
}
|
||||
}
|
||||
@@ -259,6 +272,7 @@ tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
tooltip: 'Text color',
|
||||
format: 'forecolor',
|
||||
panel: {
|
||||
origin: 'forecolor',
|
||||
role: 'application',
|
||||
ariaRemember: true,
|
||||
html: renderColorPicker,
|
||||
@@ -272,6 +286,7 @@ tinymce.PluginManager.add('textcolor', function(editor) {
|
||||
tooltip: 'Background color',
|
||||
format: 'hilitecolor',
|
||||
panel: {
|
||||
origin: 'backcolor',
|
||||
role: 'application',
|
||||
ariaRemember: true,
|
||||
html: renderColorPicker,
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("textcolor",function(a){function b(b){var c;return a.dom.getParents(a.selection.getStart(),function(a){var d;(d=a.style["forecolor"==b?"color":"background-color"])&&(c=d)}),c}function c(){var b,c,d=[];for(c=a.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],b=0;b<c.length;b+=2)d.push({text:c[b+1],color:"#"+c[b]});return d}function d(){function b(a,b){var c="transparent"==a;return'<td class="mce-grid-cell'+(c?" mce-colorbtn-trans":"")+'"><div id="'+n+"-"+o++ +'" data-mce-color="'+(a?a:"")+'" role="option" tabIndex="-1" style="'+(a?"background-color: "+a:"")+'" title="'+tinymce.translate(b)+'">'+(c?"×":"")+"</div></td>"}var d,e,f,g,h,k,l,m=this,n=m._id,o=0;for(d=c(),d.push({text:tinymce.translate("No color"),color:"transparent"}),f='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',g=d.length-1,k=0;j>k;k++){for(f+="<tr>",h=0;i>h;h++)l=k*i+h,l>g?f+="<td></td>":(e=d[l],f+=b(e.color,e.text));f+="</tr>"}if(a.settings.color_picker_callback){for(f+='<tr><td colspan="'+i+'" class="mce-custom-color-btn"><div id="'+n+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+n+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+tinymce.translate("Custom...")+"</button></div></td></tr>",f+="<tr>",h=0;i>h;h++)f+=b("","Custom color");f+="</tr>"}return f+="</tbody></table>"}function e(b,c){a.undoManager.transact(function(){a.focus(),a.formatter.apply(b,{value:c}),a.nodeChanged()})}function f(b){a.undoManager.transact(function(){a.focus(),a.formatter.remove(b,{value:null},null,!0),a.nodeChanged()})}function g(c){function d(a){k.hidePanel(),k.color(a),e(k.settings.format,a)}function g(){k.hidePanel(),k.resetColor(),f(k.settings.format)}function h(a,b){a.style.background=b,a.setAttribute("data-mce-color",b)}var j,k=this.parent();tinymce.DOM.getParent(c.target,".mce-custom-color-btn")&&(k.hidePanel(),a.settings.color_picker_callback.call(a,function(a){var b,c,e,f=k.panel.getEl().getElementsByTagName("table")[0];for(b=tinymce.map(f.rows[f.rows.length-1].childNodes,function(a){return a.firstChild}),e=0;e<b.length&&(c=b[e],c.getAttribute("data-mce-color"));e++);if(e==i)for(e=0;i-1>e;e++)h(b[e],b[e+1].getAttribute("data-mce-color"));h(c,a),d(a)},b(k.settings.format))),j=c.target.getAttribute("data-mce-color"),j?(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),c.target.setAttribute("aria-selected",!0),this.lastId=c.target.id,"transparent"==j?g():d(j)):null!==j&&k.hidePanel()}function h(){var a=this;a._color?e(a.settings.format,a._color):f(a.settings.format)}var i,j;j=a.settings.textcolor_rows||5,i=a.settings.textcolor_cols||8,a.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h}),a.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h})});
|
||||
tinymce.PluginManager.add("textcolor",function(a){function b(b){var c;return a.dom.getParents(a.selection.getStart(),function(a){var d;(d=a.style["forecolor"==b?"color":"background-color"])&&(c=d)}),c}function c(b){var c,d,e=[];for(d=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],d=a.settings.textcolor_map||d,d=a.settings[b+"_map"]||d,c=0;c<d.length;c+=2)e.push({text:d[c+1],color:"#"+d[c]});return e}function d(){function b(a,b){var c="transparent"==a;return'<td class="mce-grid-cell'+(c?" mce-colorbtn-trans":"")+'"><div id="'+o+"-"+p++ +'" data-mce-color="'+(a?a:"")+'" role="option" tabIndex="-1" style="'+(a?"background-color: "+a:"")+'" title="'+tinymce.translate(b)+'">'+(c?"×":"")+"</div></td>"}var d,e,f,g,h,k,l,m,n=this,o=n._id,p=0;for(m=n.settings.origin,d=c(m),d.push({text:tinymce.translate("No color"),color:"transparent"}),f='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',g=d.length-1,k=0;k<j[m];k++){for(f+="<tr>",h=0;h<i[m];h++)l=k*i[m]+h,l>g?f+="<td></td>":(e=d[l],f+=b(e.color,e.text));f+="</tr>"}if(a.settings.color_picker_callback){for(f+='<tr><td colspan="'+i[m]+'" class="mce-custom-color-btn"><div id="'+o+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+o+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+tinymce.translate("Custom...")+"</button></div></td></tr>",f+="<tr>",h=0;h<i[m];h++)f+=b("","Custom color");f+="</tr>"}return f+="</tbody></table>"}function e(b,c){a.undoManager.transact(function(){a.focus(),a.formatter.apply(b,{value:c}),a.nodeChanged()})}function f(b){a.undoManager.transact(function(){a.focus(),a.formatter.remove(b,{value:null},null,!0),a.nodeChanged()})}function g(c){function d(a){l.hidePanel(),l.color(a),e(l.settings.format,a)}function g(){l.hidePanel(),l.resetColor(),f(l.settings.format)}function h(a,b){a.style.background=b,a.setAttribute("data-mce-color",b)}var j,k,l=this.parent();k=l.settings.origin,tinymce.DOM.getParent(c.target,".mce-custom-color-btn")&&(l.hidePanel(),a.settings.color_picker_callback.call(a,function(a){var b,c,e,f=l.panel.getEl().getElementsByTagName("table")[0];for(b=tinymce.map(f.rows[f.rows.length-1].childNodes,function(a){return a.firstChild}),e=0;e<b.length&&(c=b[e],c.getAttribute("data-mce-color"));e++);if(e==i[k])for(e=0;e<i[k]-1;e++)h(b[e],b[e+1].getAttribute("data-mce-color"));h(c,a),d(a)},b(l.settings.format))),j=c.target.getAttribute("data-mce-color"),j?(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),c.target.setAttribute("aria-selected",!0),this.lastId=c.target.id,"transparent"==j?g():d(j)):null!==j&&l.hidePanel()}function h(){var a=this;a._color?e(a.settings.format,a._color):f(a.settings.format)}var i,j;j={forecolor:a.settings.forecolor_rows||a.settings.textcolor_rows||5,backcolor:a.settings.backcolor_rows||a.settings.textcolor_rows||5},i={forecolor:a.settings.forecolor_cols||a.settings.textcolor_cols||8,backcolor:a.settings.backcolor_cols||a.settings.textcolor_cols||8},a.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{origin:"forecolor",role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h}),a.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{origin:"backcolor",role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h})});
|
||||
@@ -440,10 +440,26 @@
|
||||
$input.autocomplete( 'search' );
|
||||
}
|
||||
} )
|
||||
// Returns a jQuery object containing the menu element.
|
||||
.autocomplete( 'widget' )
|
||||
.addClass( 'wplink-autocomplete' )
|
||||
.attr( 'role', 'listbox' )
|
||||
.removeAttr( 'tabindex' ); // Remove the `tabindex=0` attribute added by jQuery UI.
|
||||
.removeAttr( 'tabindex' ) // Remove the `tabindex=0` attribute added by jQuery UI.
|
||||
/*
|
||||
* Looks like Safari and VoiceOver need an `aria-selected` attribute. See ticket #33301.
|
||||
* The `menufocus` and `menublur` events are the same events used to add and remove
|
||||
* the `ui-state-focus` CSS class on the menu items. See jQuery UI Menu Widget.
|
||||
*/
|
||||
.on( 'menufocus', function( event, ui ) {
|
||||
ui.item.attr( 'aria-selected', 'true' );
|
||||
})
|
||||
.on( 'menublur', function() {
|
||||
/*
|
||||
* The `menublur` event returns an object where the item is `null`
|
||||
* so we need to find the active item with other means.
|
||||
*/
|
||||
$( this ).find( '[aria-selected="true"]' ).removeAttr( 'aria-selected' );
|
||||
});
|
||||
}
|
||||
|
||||
tinymce.$( input ).on( 'keydown', function( event ) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -391,6 +391,53 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
||||
});
|
||||
}
|
||||
|
||||
function togglePositionClass(panel, relPos, predicate) {
|
||||
relPos = relPos ? relPos.substr(0, 2) : '';
|
||||
|
||||
each({
|
||||
t: 'down',
|
||||
b: 'up'
|
||||
}, function(cls, pos) {
|
||||
panel.classes.toggle('arrow-' + cls, predicate(pos, relPos.substr(0, 1)));
|
||||
});
|
||||
|
||||
each({
|
||||
l: 'left',
|
||||
r: 'right'
|
||||
}, function(cls, pos) {
|
||||
panel.classes.toggle('arrow-' + cls, predicate(pos, relPos.substr(1, 1)));
|
||||
});
|
||||
}
|
||||
|
||||
function toClientRect(geomRect) {
|
||||
return {
|
||||
left: geomRect.x,
|
||||
top: geomRect.y,
|
||||
width: geomRect.w,
|
||||
height: geomRect.h,
|
||||
right: geomRect.x + geomRect.w,
|
||||
bottom: geomRect.y + geomRect.h
|
||||
};
|
||||
}
|
||||
|
||||
function userConstrain(x, y, elementRect, contentAreaRect, panelRect) {
|
||||
panelRect = toClientRect({x: x, y: y, w: panelRect.w, h: panelRect.h});
|
||||
|
||||
if (settings.inline_toolbar_position_handler) {
|
||||
panelRect = settings.inline_toolbar_position_handler({
|
||||
elementRect: toClientRect(elementRect),
|
||||
contentAreaRect: toClientRect(contentAreaRect),
|
||||
panelRect: panelRect
|
||||
});
|
||||
}
|
||||
|
||||
return panelRect;
|
||||
}
|
||||
|
||||
function movePanelTo(panel, pos) {
|
||||
panel.moveTo(pos.left, pos.top);
|
||||
}
|
||||
|
||||
function reposition(match) {
|
||||
var relPos, panelRect, elementRect, contentAreaRect, panel, relRect, testPositions;
|
||||
|
||||
@@ -404,7 +451,7 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
||||
}
|
||||
|
||||
testPositions = [
|
||||
'tc-bc', 'bc-tc',
|
||||
'bc-tc', 'tc-bc',
|
||||
'tl-bl', 'bl-tl',
|
||||
'tr-br', 'br-tr'
|
||||
];
|
||||
@@ -431,39 +478,36 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
||||
}
|
||||
|
||||
relPos = Rect.findBestRelativePosition(panelRect, elementRect, contentAreaRect, testPositions);
|
||||
elementRect = Rect.clamp(elementRect, contentAreaRect);
|
||||
|
||||
if (relPos) {
|
||||
each(testPositions.concat('inside'), function(pos) {
|
||||
panel.classes.toggle('tinymce-inline-' + pos, pos == relPos);
|
||||
});
|
||||
|
||||
relRect = Rect.relativePosition(panelRect, elementRect, relPos);
|
||||
panel.moveTo(relRect.x, relRect.y);
|
||||
movePanelTo(panel, userConstrain(relRect.x, relRect.y, elementRect, contentAreaRect, panelRect));
|
||||
} else {
|
||||
each(testPositions, function(pos) {
|
||||
panel.classes.toggle('tinymce-inline-' + pos, false);
|
||||
});
|
||||
|
||||
panel.classes.toggle('tinymce-inline-inside', true);
|
||||
// Allow overflow below the editor to avoid placing toolbars ontop of tables
|
||||
contentAreaRect.h += 40;
|
||||
|
||||
elementRect = Rect.intersect(contentAreaRect, elementRect);
|
||||
|
||||
if (elementRect) {
|
||||
relPos = Rect.findBestRelativePosition(panelRect, elementRect, contentAreaRect, [
|
||||
'tc-tc', 'tl-tl', 'tr-tr'
|
||||
'bc-tc', 'bl-tl', 'br-tr'
|
||||
]);
|
||||
|
||||
if (relPos) {
|
||||
relRect = Rect.relativePosition(panelRect, elementRect, relPos);
|
||||
panel.moveTo(relRect.x, relRect.y);
|
||||
movePanelTo(panel, userConstrain(relRect.x, relRect.y, elementRect, contentAreaRect, panelRect));
|
||||
} else {
|
||||
panel.moveTo(elementRect.x, elementRect.y);
|
||||
movePanelTo(panel, userConstrain(elementRect.x, elementRect.y, elementRect, contentAreaRect, panelRect));
|
||||
}
|
||||
} else {
|
||||
panel.hide();
|
||||
}
|
||||
}
|
||||
|
||||
togglePositionClass(panel, relPos, function(pos1, pos2) {
|
||||
return (!elementRect || elementRect.w > 40) && pos1 === pos2;
|
||||
});
|
||||
|
||||
//drawRect(contentAreaRect, 'blue');
|
||||
//drawRect(elementRect, 'red');
|
||||
//drawRect(panelRect, 'green');
|
||||
@@ -503,8 +547,9 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
||||
|
||||
panel = Factory.create({
|
||||
type: 'floatpanel',
|
||||
role: 'application',
|
||||
classes: 'tinymce tinymce-inline',
|
||||
role: 'dialog',
|
||||
classes: 'tinymce tinymce-inline arrow',
|
||||
ariaLabel: 'Inline toolbar',
|
||||
layout: 'flex',
|
||||
direction: 'column',
|
||||
align: 'stretch',
|
||||
@@ -512,7 +557,10 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
||||
autofix: true,
|
||||
fixed: true,
|
||||
border: 1,
|
||||
items: createToolbar(match.toolbar.items)
|
||||
items: createToolbar(match.toolbar.items),
|
||||
oncancel: function() {
|
||||
editor.focus();
|
||||
}
|
||||
});
|
||||
|
||||
match.toolbar.panel = panel;
|
||||
@@ -587,6 +635,13 @@ tinymce.ThemeManager.add('modern', function(editor) {
|
||||
|
||||
editor.contextToolbars = {};
|
||||
});
|
||||
|
||||
editor.shortcuts.add('ctrl+shift+e > ctrl+shift+p', '', function() {
|
||||
var match = findFrontMostMatch(editor.selection.getNode());
|
||||
if (match && match.toolbar.panel) {
|
||||
match.toolbar.panel.items()[0].focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function fireSkinLoaded(editor) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
4
wp-includes/js/tinymce/tiny_mce_popup.js
vendored
4
wp-includes/js/tinymce/tiny_mce_popup.js
vendored
@@ -107,7 +107,7 @@ var tinyMCEPopup = {
|
||||
* Returns a window argument/parameter by name.
|
||||
*
|
||||
* @method getWindowArg
|
||||
* @param {String} name Name of the window argument to retrive.
|
||||
* @param {String} name Name of the window argument to retrieve.
|
||||
* @param {String} defaultValue Optional default value to return.
|
||||
* @return {String} Argument value or default value if it wasn't found.
|
||||
*/
|
||||
@@ -121,7 +121,7 @@ var tinyMCEPopup = {
|
||||
* Returns a editor parameter/config option value.
|
||||
*
|
||||
* @method getParam
|
||||
* @param {String} name Name of the editor config option to retrive.
|
||||
* @param {String} name Name of the editor config option to retrieve.
|
||||
* @param {String} defaultValue Optional default value to return.
|
||||
* @return {String} Parameter value or default value if it wasn't found.
|
||||
*/
|
||||
|
||||
26
wp-includes/js/tinymce/tinymce.min.js
vendored
26
wp-includes/js/tinymce/tinymce.min.js
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -49,6 +49,7 @@
|
||||
*/
|
||||
context.fillText( stringFromCharCode( 55356, 57221 ), 0, 0 );
|
||||
tonedata = context.getImageData( 16, 16, 1, 1 ).data;
|
||||
tone = tonedata[0] + ',' + tonedata[1] + ',' + tonedata[2] + ',' + tonedata[3];
|
||||
|
||||
context.fillText( stringFromCharCode( 55356, 57221, 55356, 57343 ), 0, 0 );
|
||||
// Chrome has issues comparing arrays, and Safari has issues converting arrays to strings.
|
||||
|
||||
2
wp-includes/js/wp-emoji-loader.min.js
vendored
2
wp-includes/js/wp-emoji-loader.min.js
vendored
@@ -1 +1 @@
|
||||
!function(a,b,c){function d(a){var c,d,e,f=b.createElement("canvas"),g=f.getContext&&f.getContext("2d"),h=String.fromCharCode;if(!g||!g.fillText)return!1;switch(g.textBaseline="top",g.font="600 32px Arial",a){case"flag":return g.fillText(h(55356,56806,55356,56826),0,0),f.toDataURL().length>3e3;case"diversity":return g.fillText(h(55356,57221),0,0),c=g.getImageData(16,16,1,1).data,g.fillText(h(55356,57221,55356,57343),0,0),c=g.getImageData(16,16,1,1).data,e=c[0]+","+c[1]+","+c[2]+","+c[3],d!==e;case"simple":return g.fillText(h(55357,56835),0,0),0!==g.getImageData(16,16,1,1).data[0];case"unicode8":return g.fillText(h(55356,57135),0,0),0!==g.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
|
||||
!function(a,b,c){function d(a){var c,d,e,f=b.createElement("canvas"),g=f.getContext&&f.getContext("2d"),h=String.fromCharCode;if(!g||!g.fillText)return!1;switch(g.textBaseline="top",g.font="600 32px Arial",a){case"flag":return g.fillText(h(55356,56806,55356,56826),0,0),f.toDataURL().length>3e3;case"diversity":return g.fillText(h(55356,57221),0,0),c=g.getImageData(16,16,1,1).data,d=c[0]+","+c[1]+","+c[2]+","+c[3],g.fillText(h(55356,57221,55356,57343),0,0),c=g.getImageData(16,16,1,1).data,e=c[0]+","+c[1]+","+c[2]+","+c[3],d!==e;case"simple":return g.fillText(h(55357,56835),0,0),0!==g.getImageData(16,16,1,1).data[0];case"unicode8":return g.fillText(h(55356,57135),0,0),0!==g.getImageData(16,16,1,1).data[0]}return!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i;for(i=Array("simple","flag","unicode8","diversity"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
|
||||
@@ -582,9 +582,6 @@ function get_body_class( $class = '' ) {
|
||||
$classes[] = 'attachment';
|
||||
if ( is_404() )
|
||||
$classes[] = 'error404';
|
||||
if ( is_singular() ) {
|
||||
$classes[] = 'singular';
|
||||
}
|
||||
|
||||
if ( is_single() ) {
|
||||
$post_id = $wp_query->get_queried_object_id();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5';
|
||||
$wp_version = '4.5.1';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
@@ -18,7 +18,7 @@ $wp_db_version = 36686;
|
||||
*
|
||||
* @global string $tinymce_version
|
||||
*/
|
||||
$tinymce_version = '4308-20160323';
|
||||
$tinymce_version = '4310-20160418';
|
||||
|
||||
/**
|
||||
* Holds the required PHP version
|
||||
|
||||
@@ -1486,7 +1486,11 @@ class wpdb {
|
||||
}
|
||||
}
|
||||
|
||||
mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
|
||||
if ( WP_DEBUG ) {
|
||||
mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
|
||||
} else {
|
||||
@mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
|
||||
}
|
||||
|
||||
if ( $this->dbh->connect_errno ) {
|
||||
$this->dbh = null;
|
||||
@@ -1512,7 +1516,11 @@ class wpdb {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
|
||||
if ( WP_DEBUG ) {
|
||||
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
|
||||
} else {
|
||||
$this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $this->dbh && $allow_bail ) {
|
||||
|
||||
Reference in New Issue
Block a user