<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[32883] trunk/src/wp-includes: Editor: add ARIA labels to the Quicktags buttons to improve accessibility.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/32883">32883</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/32883","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>azaozz</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-06-20 02:15:04 +0000 (Sat, 20 Jun 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Editor: add ARIA labels to the Quicktags buttons to improve accessibility.
Props afercia, azaozz. Fixes <a href="https://core.trac.wordpress.org/ticket/31522">#31522</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesjsquicktagsjs">trunk/src/wp-includes/js/quicktags.js</a></li>
<li><a href="#trunksrcwpincludesscriptloaderphp">trunk/src/wp-includes/script-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesjsquicktagsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/quicktags.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/quicktags.js 2015-06-19 23:00:21 UTC (rev 32882)
+++ trunk/src/wp-includes/js/quicktags.js 2015-06-20 02:15:04 UTC (rev 32883)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -236,6 +236,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function _escape( text ) {
+ text = text || '';
+ text = text.replace( /&([^#])(?![a-z1-4]{1,8};)/gi, '&$1' );
+ return text.replace( /</g, '<' ).replace( />/g, '>' ).replace( /"/g, '"' ).replace( /'/g, ''' );
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> qt.instances = {};
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> qt.getInstance = function(id) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -327,9 +333,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string title Optional. Button's title="..."
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int priority Optional. Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string instance Optional. Limit the button to a specific instance of Quicktags, add to all instances if not present.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param attr object Optional. Used to pass additional attributes. Currently supports `ariaLabel` and `ariaLabelClose` (for "close tag" state)
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return mixed null or the button object that is needed for back-compat.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- qt.addButton = function( id, display, arg1, arg2, access_key, title, priority, instance ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ qt.addButton = function( id, display, arg1, arg2, access_key, title, priority, instance, attr ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> var btn;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !id || !display ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -338,12 +345,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> priority = priority || 0;
</span><span class="cx" style="display: block; padding: 0 10px"> arg2 = arg2 || '';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ attr = attr || {};
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( typeof(arg1) === 'function' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- btn = new qt.Button(id, display, access_key, title, instance);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ btn = new qt.Button( id, display, access_key, title, instance, attr );
</ins><span class="cx" style="display: block; padding: 0 10px"> btn.callback = arg1;
</span><span class="cx" style="display: block; padding: 0 10px"> } else if ( typeof(arg1) === 'string' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- btn = new qt.TagButton(id, display, arg1, arg2, access_key, title, instance);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ btn = new qt.TagButton( id, display, arg1, arg2, access_key, title, instance, attr );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -399,59 +407,69 @@
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // a plain, dumb button
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- qt.Button = function(id, display, access, title, instance) {
- var t = this;
- t.id = id;
- t.display = display;
- t.access = '';
- t.title = title || '';
- t.instance = instance || '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ qt.Button = function( id, display, access, title, instance, attr ) {
+ this.id = id;
+ this.display = display;
+ this.access = '';
+ this.title = title || '';
+ this.instance = instance || '';
+ this.attr = attr || {};
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> qt.Button.prototype.html = function(idPrefix) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var title = this.title ? ' title="' + this.title + '"' : '',
- active, on, wp,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var active, on, wp,
+ title = this.title ? ' title="' + _escape( this.title ) + '"' : '',
+ ariaLabel = this.attr && this.attr.ariaLabel ? ' aria-label="' + _escape( this.attr.ariaLabel ) + '"' : '',
+ val = this.display ? ' value="' + _escape( this.display ) + '"' : '',
+ id = this.id ? ' id="' + _escape( idPrefix + this.id ) + '"' : '',
</ins><span class="cx" style="display: block; padding: 0 10px"> dfw = ( wp = window.wp ) && wp.editor && wp.editor.dfw;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( this.id === 'fullscreen' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return '<button type="button" id="' + idPrefix + this.id + '" class="ed_button qt-dfw qt-fullscreen"' + title + '></button>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return '<button type="button"' + id + ' class="ed_button qt-dfw qt-fullscreen"' + title + ariaLabel + '></button>';
</ins><span class="cx" style="display: block; padding: 0 10px"> } else if ( this.id === 'dfw' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> active = dfw && dfw.isActive() ? '' : ' disabled="disabled"';
</span><span class="cx" style="display: block; padding: 0 10px"> on = dfw && dfw.isOn() ? ' active' : '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return '<button type="button" id="' + idPrefix + this.id + '" class="ed_button qt-dfw' + on + '"' + title + active + '></button>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return '<button type="button"' + id + ' class="ed_button qt-dfw' + on + '"' + title + ariaLabel + active + '></button>';
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return '<input type="button" id="' + idPrefix + this.id + '" class="ed_button button button-small"' + title + ' value="' + this.display + '" />';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return '<input type="button"' + id + ' class="ed_button button button-small"' + title + ariaLabel + val + ' />';
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> qt.Button.prototype.callback = function(){};
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // a button that inserts HTML tag
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- qt.TagButton = function(id, display, tagStart, tagEnd, access, title, instance) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ qt.TagButton = function( id, display, tagStart, tagEnd, access, title, instance, attr ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> var t = this;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- qt.Button.call(t, id, display, access, title, instance);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ qt.Button.call( t, id, display, access, title, instance, attr );
</ins><span class="cx" style="display: block; padding: 0 10px"> t.tagStart = tagStart;
</span><span class="cx" style="display: block; padding: 0 10px"> t.tagEnd = tagEnd;
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> qt.TagButton.prototype = new qt.Button();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- qt.TagButton.prototype.openTag = function(e, ed) {
- var t = this;
-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ qt.TagButton.prototype.openTag = function( element, ed ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! ed.openTags ) {
</span><span class="cx" style="display: block; padding: 0 10px"> ed.openTags = [];
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( t.tagEnd ) {
- ed.openTags.push(t.id);
- e.value = '/' + e.value;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ if ( this.tagEnd ) {
+ ed.openTags.push( this.id );
+ element.value = '/' + element.value;
+
+ if ( this.attr.ariaLabelClose ) {
+ element.setAttribute( 'aria-label', this.attr.ariaLabelClose );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- qt.TagButton.prototype.closeTag = function(e, ed) {
- var t = this, i = t.isOpen(ed);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ qt.TagButton.prototype.closeTag = function( element, ed ) {
+ var i = this.isOpen(ed);
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( i !== false ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ed.openTags.splice(i, 1);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ed.openTags.splice( i, 1 );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- e.value = t.display;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ element.value = this.display;
+
+ if ( this.attr.ariaLabel ) {
+ element.setAttribute( 'aria-label', this.attr.ariaLabel );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> // whether a tag is open or not. Returns false if not open, or current open depth of the tag
</span><span class="cx" style="display: block; padding: 0 10px"> qt.TagButton.prototype.isOpen = function (ed) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -544,7 +562,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // the close tags button
</span><span class="cx" style="display: block; padding: 0 10px"> qt.CloseButton = function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- qt.Button.call(this, 'close', quicktagsL10n.closeTags, '', quicktagsL10n.closeAllOpenTags);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ qt.Button.call( this, 'close', quicktagsL10n.closeTags, '', quicktagsL10n.closeAllOpenTags );
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> qt.CloseButton.prototype = new qt.Button();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -575,7 +593,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // the link button
</span><span class="cx" style="display: block; padding: 0 10px"> qt.LinkButton = function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- qt.TagButton.call(this, 'link', 'link', '', '</a>');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var attr = {
+ ariaLabel: quicktagsL10n.link
+ };
+
+ qt.TagButton.call( this, 'link', 'link', '', '</a>', '', '', '', attr );
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> qt.LinkButton.prototype = new qt.TagButton();
</span><span class="cx" style="display: block; padding: 0 10px"> qt.LinkButton.prototype.callback = function(e, c, ed, defaultValue) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -591,7 +613,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( t.isOpen(ed) === false ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- URL = prompt(quicktagsL10n.enterURL, defaultValue);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ URL = prompt( quicktagsL10n.enterURL, defaultValue );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( URL ) {
</span><span class="cx" style="display: block; padding: 0 10px"> t.tagStart = '<a href="' + URL + '">';
</span><span class="cx" style="display: block; padding: 0 10px"> qt.TagButton.prototype.callback.call(t, e, c, ed);
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -603,7 +625,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // the img button
</span><span class="cx" style="display: block; padding: 0 10px"> qt.ImgButton = function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- qt.TagButton.call(this, 'img', 'img', '', '');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var attr = {
+ ariaLabel: quicktagsL10n.image
+ };
+
+ qt.TagButton.call( this, 'img', 'img', '', '', '', '', '', attr );
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> qt.ImgButton.prototype = new qt.TagButton();
</span><span class="cx" style="display: block; padding: 0 10px"> qt.ImgButton.prototype.callback = function(e, c, ed, defaultValue) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -633,7 +659,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> qt.TextDirectionButton = function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- qt.Button.call(this, 'textdirection', quicktagsL10n.textdirection, '', quicktagsL10n.toggleTextdirection);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ qt.Button.call( this, 'textdirection', quicktagsL10n.textdirection, '', quicktagsL10n.toggleTextdirection );
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> qt.TextDirectionButton.prototype = new qt.Button();
</span><span class="cx" style="display: block; padding: 0 10px"> qt.TextDirectionButton.prototype.callback = function(e, c) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -649,18 +675,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // ensure backward compatibility
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- edButtons[10] = new qt.TagButton('strong','b','<strong>','</strong>');
- edButtons[20] = new qt.TagButton('em','i','<em>','</em>'),
- edButtons[30] = new qt.LinkButton(), // special case
- edButtons[40] = new qt.TagButton('block','b-quote','\n\n<blockquote>','</blockquote>\n\n'),
- edButtons[50] = new qt.TagButton('del','del','<del datetime="' + _datetime + '">','</del>'),
- edButtons[60] = new qt.TagButton('ins','ins','<ins datetime="' + _datetime + '">','</ins>'),
- edButtons[70] = new qt.ImgButton(), // special case
- edButtons[80] = new qt.TagButton('ul','ul','<ul>\n','</ul>\n\n'),
- edButtons[90] = new qt.TagButton('ol','ol','<ol>\n','</ol>\n\n'),
- edButtons[100] = new qt.TagButton('li','li','\t<li>','</li>\n'),
- edButtons[110] = new qt.TagButton('code','code','<code>','</code>'),
- edButtons[120] = new qt.TagButton('more','more','<!--more-->\n\n',''),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ edButtons[10] = new qt.TagButton( 'strong', 'b', '<strong>', '</strong>', '', '', '', { ariaLabel: quicktagsL10n.strong, ariaLabelClose: quicktagsL10n.strongClose } );
+ edButtons[20] = new qt.TagButton( 'em', 'i', '<em>', '</em>', '', '', '', { ariaLabel: quicktagsL10n.em, ariaLabelClose: quicktagsL10n.emClose } );
+ edButtons[30] = new qt.LinkButton(); // special case
+ edButtons[40] = new qt.TagButton( 'block', 'b-quote', '\n\n<blockquote>', '</blockquote>\n\n', '', '', '', { ariaLabel: quicktagsL10n.blockquote, ariaLabelClose: quicktagsL10n.blockquoteClose } );
+ edButtons[50] = new qt.TagButton( 'del', 'del', '<del datetime="' + _datetime + '">', '</del>', '', '', '', { ariaLabel: quicktagsL10n.del, ariaLabelClose: quicktagsL10n.delClose } );
+ edButtons[60] = new qt.TagButton( 'ins', 'ins', '<ins datetime="' + _datetime + '">', '</ins>', '', '', '', { ariaLabel: quicktagsL10n.ins, ariaLabelClose: quicktagsL10n.insClose } );
+ edButtons[70] = new qt.ImgButton(); // special case
+ edButtons[80] = new qt.TagButton( 'ul', 'ul', '<ul>\n', '</ul>\n\n', '', '', '', { ariaLabel: quicktagsL10n.ul, ariaLabelClose: quicktagsL10n.ulClose } );
+ edButtons[90] = new qt.TagButton( 'ol', 'ol', '<ol>\n', '</ol>\n\n', '', '', '', { ariaLabel: quicktagsL10n.ol, ariaLabelClose: quicktagsL10n.olClose } );
+ edButtons[100] = new qt.TagButton( 'li', 'li', '\t<li>', '</li>\n', '', '', '', { ariaLabel: quicktagsL10n.li, ariaLabelClose: quicktagsL10n.liClose } );
+ edButtons[110] = new qt.TagButton( 'code', 'code', '<code>', '</code>', '', '', '', { ariaLabel: quicktagsL10n.code, ariaLabelClose: quicktagsL10n.codeClose } );
+ edButtons[120] = new qt.TagButton( 'more', 'more', '<!--more-->\n\n', '', '', '', '', { ariaLabel: quicktagsL10n.more } );
</ins><span class="cx" style="display: block; padding: 0 10px"> edButtons[140] = new qt.CloseButton();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> })();
</span></span></pre></div>
<a id="trunksrcwpincludesscriptloaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/script-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/script-loader.php 2015-06-19 23:00:21 UTC (rev 32882)
+++ trunk/src/wp-includes/script-loader.php 2015-06-20 02:15:04 UTC (rev 32883)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -89,14 +89,35 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", array(), false, 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> did_action( 'init' ) && $scripts->localize( 'quicktags', 'quicktagsL10n', array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'closeAllOpenTags' => esc_attr__( 'Close all open tags' ),
- 'closeTags' => esc_attr__( 'close tags' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'closeAllOpenTags' => __( 'Close all open tags' ),
+ 'closeTags' => __( 'close tags' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'enterURL' => __( 'Enter the URL' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'enterImageURL' => __( 'Enter the URL of the image' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'enterImageDescription' => __( 'Enter a description of the image' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'textdirection' => esc_attr__( 'text direction' ),
- 'toggleTextdirection' => esc_attr__( 'Toggle Editor Text Direction' ),
- 'dfw' => esc_attr__( 'Distraction-free writing mode' )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'textdirection' => __( 'text direction' ),
+ 'toggleTextdirection' => __( 'Toggle Editor Text Direction' ),
+ 'dfw' => __( 'Distraction-free writing mode' ),
+ 'strong' => __( 'Bold' ),
+ 'strongClose' => __( 'Close bold tag' ),
+ 'em' => __( 'Italic' ),
+ 'emClose' => __( 'Close italic tag' ),
+ 'link' => __( 'Insert link' ),
+ 'blockquote' => __( 'Blockquote' ),
+ 'blockquoteClose' => __( 'Close blockquote tag' ),
+ 'del' => __( 'Deleted text (strikethrough)' ),
+ 'delClose' => __( 'Close deleted text tag' ),
+ 'ins' => __( 'Inserted text' ),
+ 'insClose' => __( 'Close inserted text tag' ),
+ 'image' => __( 'Insert image' ),
+ 'ul' => __( 'Bulleted list' ),
+ 'ulClose' => __( 'Close bulleted list tag' ),
+ 'ol' => __( 'Numbered list' ),
+ 'olClose' => __( 'Close numbered list tag' ),
+ 'li' => __( 'List item' ),
+ 'liClose' => __( 'Close list item tag' ),
+ 'code' => __( 'Code' ),
+ 'codeClose' => __( 'Close code tag' ),
+ 'more' => __( 'Insert Read More tag' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' );
</span></span></pre>
</div>
</div>
</body>
</html>