<!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>[38640] trunk/src/wp-admin: Accessibility: Add Themes Feature Filter form improvements.</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/38640">38640</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/38640","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>afercia</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-09-21 17:53:29 +0000 (Wed, 21 Sep 2016)</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'>Accessibility: Add Themes Feature Filter form improvements.
- adds "Apply Filters" and "Clear" at the end of the form
- changes the "Feature Filter", "Apply Filters", "Clear", and "Edit" links in `<button>` elements
- removes a leftover from <a href="https://core.trac.wordpress.org/changeset/27963">[27963]</a>
- clarifies one button text and adds an `aria-label` attribute
- adds a `wp.a11y.speak()` message when clicking on "Apply Filters" and no features are selected
Fixes <a href="https://core.trac.wordpress.org/ticket/38086">#38086</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincsscommoncss">trunk/src/wp-admin/css/common.css</a></li>
<li><a href="#trunksrcwpadminjsthemejs">trunk/src/wp-admin/js/theme.js</a></li>
<li><a href="#trunksrcwpadminthemeinstallphp">trunk/src/wp-admin/theme-install.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincsscommoncss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/css/common.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/common.css 2016-09-21 17:37:02 UTC (rev 38639)
+++ trunk/src/wp-admin/css/common.css 2016-09-21 17:53:29 UTC (rev 38640)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1045,39 +1045,53 @@
</span><span class="cx" style="display: block; padding: 0 10px"> display: inline-block;
</span><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">-.wp-filter .drawer-toggle {
- display: inline-block;
- margin: 0 10px;
- padding: 4px 6px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.wp-filter .button.drawer-toggle {
+ margin: 10px 9px 0;
+ padding: 0 10px 0 6px;
+ border-color: transparent;
+ background-color: transparent;
</ins><span class="cx" style="display: block; padding: 0 10px"> color: #666;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- cursor: pointer;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ vertical-align: baseline;
+ -webkit-box-shadow: none;
+ box-shadow: none;
</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"> .wp-filter .drawer-toggle:before {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- display: inline-block;
- vertical-align: top;
</del><span class="cx" style="display: block; padding: 0 10px"> content: "\f111";
</span><span class="cx" style="display: block; padding: 0 10px"> margin: 0 5px 0 0;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- width: 16px;
- height: 16px;
</del><span class="cx" style="display: block; padding: 0 10px"> color: #72777c;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- -webkit-transition: color .1s ease-in 0;
- transition: color .1s ease-in 0;
- font-family: dashicons;
- font-size: 16px;
- line-height: 1;
- text-align: center;
- text-decoration: inherit;
- font-weight: 400;
- font-style: normal;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ font: normal 16px/1 dashicons;
+ vertical-align: text-bottom;
</ins><span class="cx" style="display: block; padding: 0 10px"> -webkit-font-smoothing: antialiased;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ -moz-osx-font-smoothing: grayscale;
</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">-.wp-filter .drawer-toggle:hover,
-.wp-filter .drawer-toggle:hover:before {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.wp-filter .button.drawer-toggle:hover,
+.wp-filter .drawer-toggle:hover:before,
+.wp-filter .button.drawer-toggle:focus,
+.wp-filter .drawer-toggle:focus:before {
+ background-color: transparent;
</ins><span class="cx" style="display: block; padding: 0 10px"> color: #00a0d2;
</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">+.wp-filter .button.drawer-toggle:hover,
+.wp-filter .button.drawer-toggle:focus:active {
+ border-color: transparent;
+}
+
+.wp-filter .button.drawer-toggle:focus {
+ border-color: #5b9dd9;
+}
+
+.wp-filter .button.drawer-toggle:active {
+ background: transparent;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ -webkit-transform: none;
+ -ms-transform: none;
+ transform: none;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .wp-filter .drawer-toggle.current:before {
</span><span class="cx" style="display: block; padding: 0 10px"> color: #fff;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1092,7 +1106,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> width: 100%;
</span><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">-.show-favorites-form .wp-filter .favorites-form {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.show-favorites-form .favorites-form {
</ins><span class="cx" style="display: block; padding: 0 10px"> display: block;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1110,23 +1124,22 @@
</span><span class="cx" style="display: block; padding: 0 10px"> width: 100%;
</span><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">-.show-filters .wp-filter .drawer-toggle:hover,
-.show-filters .wp-filter .drawer-toggle:focus {
- background: rgb(46, 162, 204);
-}
-
</del><span class="cx" style="display: block; padding: 0 10px"> .show-filters .filter-links a.current {
</span><span class="cx" style="display: block; padding: 0 10px"> border-bottom: none;
</span><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">-.show-filters .wp-filter .drawer-toggle {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.show-filters .wp-filter .button.drawer-toggle {
</ins><span class="cx" style="display: block; padding: 0 10px"> -webkit-border-radius: 2px;
</span><span class="cx" style="display: block; padding: 0 10px"> border-radius: 2px;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- border: none;
</del><span class="cx" style="display: block; padding: 0 10px"> background: #72777c;
</span><span class="cx" style="display: block; padding: 0 10px"> color: #fff;
</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">+.show-filters .wp-filter .drawer-toggle:hover,
+.show-filters .wp-filter .drawer-toggle:focus {
+ background: rgb(46, 162, 204);
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .show-filters .wp-filter .drawer-toggle:before {
</span><span class="cx" style="display: block; padding: 0 10px"> color: #fff;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1170,9 +1183,15 @@
</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"> .filter-drawer .buttons {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ clear: both;
</ins><span class="cx" style="display: block; padding: 0 10px"> margin-bottom: 20px;
</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">+.filter-drawer .filter-group + .buttons {
+ margin-bottom: 0;
+ padding-top: 20px;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .filter-drawer .buttons .button span {
</span><span class="cx" style="display: block; padding: 0 10px"> display: inline-block;
</span><span class="cx" style="display: block; padding: 0 10px"> opacity: 0.8;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1185,6 +1204,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> margin-left: 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">+.wp-filter .button-link.edit-filters {
+ color: #0073aa;
+ text-decoration: underline;
+ padding: 0 5px;
+ line-height: 28px;
+}
+
+.wp-filter .button-link.edit-filters:hover {
+ color: #00a0d2;
+}
+
+.wp-filter .button-link.edit-filters:focus {
+ color: #124964;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .filtered-by {
</span><span class="cx" style="display: block; padding: 0 10px"> display: none;
</span><span class="cx" style="display: block; padding: 0 10px"> margin: 0;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1226,6 +1260,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> padding: 20px;
</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">+.show-filters .favorites-form,
</ins><span class="cx" style="display: block; padding: 0 10px"> .show-filters .content-filterable,
</span><span class="cx" style="display: block; padding: 0 10px"> .show-filters.filters-applied.loading-content .content-filterable,
</span><span class="cx" style="display: block; padding: 0 10px"> .loading-content .content-filterable,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3721,6 +3756,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .filter-drawer .filter-group-feature label {
</span><span class="cx" style="display: block; padding: 0 10px"> line-height: 25px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ .wp-filter .button.drawer-toggle {
+ font-size: 13px;
+ line-height: 26px;
+ height: 28px;
+ }
</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"> /* Smartphone */
</span></span></pre></div>
<a id="trunksrcwpadminjsthemejs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/js/theme.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/theme.js 2016-09-21 17:37:02 UTC (rev 38639)
+++ trunk/src/wp-admin/js/theme.js 2016-09-21 17:53:29 UTC (rev 38640)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1523,6 +1523,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $( '.filter-links li > a.current' ).removeClass( 'current' );
</span><span class="cx" style="display: block; padding: 0 10px"> $( 'body' ).removeClass( 'show-filters filters-applied show-favorites-form' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $( '.drawer-toggle' ).attr( 'aria-expanded', 'false' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Get the themes by sending Ajax POST request to api.wordpress.org/themes
</span><span class="cx" style="display: block; padding: 0 10px"> // or searching the local cache
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1545,7 +1546,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'click .filter-drawer .apply-filters': 'applyFilters',
</span><span class="cx" style="display: block; padding: 0 10px"> 'click .filter-group [type="checkbox"]': 'addFilter',
</span><span class="cx" style="display: block; padding: 0 10px"> 'click .filter-drawer .clear-filters': 'clearFilters',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'click .filtered-by': 'backToFilters',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'click .edit-filters': 'backToFilters',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'click .favorites-form-submit' : 'saveUsername',
</span><span class="cx" style="display: block; padding: 0 10px"> 'keyup #wporg-username-input': 'saveUsername'
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1621,6 +1622,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> event.preventDefault();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $( 'body' ).removeClass( 'filters-applied show-filters' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $( '.drawer-toggle' ).attr( 'aria-expanded', 'false' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Bail if this is already active
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $el.hasClass( this.activeClass ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1640,9 +1642,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $( '[data-sort="' + sort + '"]' ).addClass( this.activeClass );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'favorites' === sort ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $ ( 'body' ).addClass( 'show-favorites-form' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $( 'body' ).addClass( 'show-favorites-form' );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $ ( 'body' ).removeClass( 'show-favorites-form' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $( 'body' ).removeClass( 'show-favorites-form' );
</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"> this.browse( sort );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1692,6 +1694,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> event.preventDefault();
</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">+ if ( ! tags ) {
+ wp.a11y.speak( l10n.selectFeatureFilter );
+ return;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $( 'body' ).addClass( 'filters-applied' );
</span><span class="cx" style="display: block; padding: 0 10px"> $( '.filter-links li > a.current' ).removeClass( 'current' );
</span><span class="cx" style="display: block; padding: 0 10px"> filteringBy.empty();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1782,22 +1789,22 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Toggle the full filters navigation
</span><span class="cx" style="display: block; padding: 0 10px"> moreFilters: function( event ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var $body = $( 'body' ),
+ $toggleButton = $( '.drawer-toggle' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> event.preventDefault();
</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 ( $( 'body' ).hasClass( 'filters-applied' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $body.hasClass( 'filters-applied' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return this.backToFilters();
</span><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">- // If the filters section is opened and filters are checked
- // run the relevant query collapsing to filtered-by state
- if ( $( 'body' ).hasClass( 'show-filters' ) && this.filtersChecked() ) {
- return this.addFilter();
- }
-
</del><span class="cx" style="display: block; padding: 0 10px"> this.clearSearch();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> themes.router.navigate( themes.router.baseUrl( '' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $( 'body' ).toggleClass( 'show-filters' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Toggle the feature filters view.
+ $body.toggleClass( 'show-filters' );
+ // Toggle the `aria-expanded` button attribute.
+ $toggleButton.attr( 'aria-expanded', $body.hasClass( 'show-filters' ) );
</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"> // Clears all the checked filters
</span></span></pre></div>
<a id="trunksrcwpadminthemeinstallphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/theme-install.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/theme-install.php 2016-09-21 17:37:02 UTC (rev 38639)
+++ trunk/src/wp-admin/theme-install.php 2016-09-21 17:53:29 UTC (rev 38640)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,22 +37,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_localize_script( 'theme', '_wpThemeSettings', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'themes' => false,
</span><span class="cx" style="display: block; padding: 0 10px"> 'settings' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'isInstall' => true,
- 'canInstall' => current_user_can( 'install_themes' ),
- 'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null,
- 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'isInstall' => true,
+ 'canInstall' => current_user_can( 'install_themes' ),
+ 'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null,
+ 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH )
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'l10n' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'addNew' => __( 'Add New Theme' ),
- 'search' => __( 'Search Themes' ),
- 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis)
- 'upload' => __( 'Upload Theme' ),
- 'back' => __( 'Back' ),
- 'error' => __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ),
- 'themesFound' => __( 'Number of Themes found: %d' ),
- 'noThemesFound' => __( 'No themes found. Try a different search.' ),
- 'collapseSidebar' => __( 'Collapse Sidebar' ),
- 'expandSidebar' => __( 'Expand Sidebar' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'addNew' => __( 'Add New Theme' ),
+ 'search' => __( 'Search Themes' ),
+ 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis)
+ 'upload' => __( 'Upload Theme' ),
+ 'back' => __( 'Back' ),
+ 'error' => __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ),
+ 'themesFound' => __( 'Number of Themes found: %d' ),
+ 'noThemesFound' => __( 'No themes found. Try a different search.' ),
+ 'collapseSidebar' => __( 'Collapse Sidebar' ),
+ 'expandSidebar' => __( 'Expand Sidebar' ),
+ /* translators: hidden accessibility text */
+ 'selectFeatureFilter' => __( 'Select one or more Theme features to filter by' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'installedThemes' => array_keys( $installed_themes ),
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -152,7 +154,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <li><a href="#" data-sort="favorites"><?php _ex( 'Favorites', 'themes' ); ?></a></li>
</span><span class="cx" style="display: block; padding: 0 10px"> </ul>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a class="drawer-toggle" href="#"><?php _e( 'Feature Filter' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <button type="button" class="button drawer-toggle" aria-expanded="false"><?php _e( 'Feature Filter' ); ?></button>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="search-form"></div>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -178,8 +180,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="filter-drawer">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="buttons">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a class="apply-filters button button-secondary" href="#"><?php _e( 'Apply Filters' ); ?><span></span></a>
- <a class="clear-filters button button-secondary" href="#"><?php _e( 'Clear' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <button type="button" class="apply-filters button"><?php _e( 'Apply Filters' ); ?><span></span></button>
+ <button type="button" class="clear-filters button" aria-label="<?php esc_attr_e( 'Clear current filters' ); ?>"><?php _e( 'Clear' ); ?></button>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> $feature_list = get_theme_feature_list();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -197,10 +199,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> echo '</fieldset>';
</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">+ <div class="buttons">
+ <button type="button" class="apply-filters button"><?php _e( 'Apply Filters' ); ?><span></span></button>
+ <button type="button" class="clear-filters button" aria-label="<?php esc_attr_e( 'Clear current filters' ); ?>"><?php _e( 'Clear' ); ?></button>
+ </div>
</ins><span class="cx" style="display: block; padding: 0 10px"> <div class="filtered-by">
</span><span class="cx" style="display: block; padding: 0 10px"> <span><?php _e( 'Filtering by:' ); ?></span>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="tags"></div>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a href="#"><?php _e( 'Edit' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <button type="button" class="button-link edit-filters"><?php _e( 'Edit Filters' ); ?></button>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span></span></pre>
</div>
</div>
</body>
</html>