<!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>[51320] branches/5.8/src/wp-content/themes/twentytwentyone: Twenty Twenty-One: Add missing documentation for some filters.</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 { white-space: pre-line; 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/51320">51320</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/51320","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>desrosj</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-07-02 19:07:01 +0000 (Fri, 02 Jul 2021)</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'>Twenty Twenty-One: Add missing documentation for some filters.
Add missing `@since` tags for some functions.
Follow-up to <a href="https://core.trac.wordpress.org/changeset/49216">[49216]</a>, <a href="https://core.trac.wordpress.org/changeset/49220">[49220]</a>, <a href="https://core.trac.wordpress.org/changeset/49854">[49854]</a>, <a href="https://core.trac.wordpress.org/changeset/51294">[51294]</a>.
Props SergeyBiryukov.
Merges <a href="https://core.trac.wordpress.org/changeset/51304">[51304]</a> to the 5.8 branch.
See <a href="https://core.trac.wordpress.org/ticket/52628">#52628</a>, <a href="https://core.trac.wordpress.org/ticket/53461">#53461</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branches58srcwpcontentthemestwentytwentyoneassetsjscustomizehelpersjs">branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/customize-helpers.js</a></li>
<li><a href="#branches58srcwpcontentthemestwentytwentyoneassetsjspalettecolorpickerjs">branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/palette-colorpicker.js</a></li>
<li><a href="#branches58srcwpcontentthemestwentytwentyoneassetsjspolyfillsjs">branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/polyfills.js</a></li>
<li><a href="#branches58srcwpcontentthemestwentytwentyoneassetsjsprimarynavigationjs">branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js</a></li>
<li><a href="#branches58srcwpcontentthemestwentytwentyoneassetsjsskiplinkfocusfixjs">branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/skip-link-focus-fix.js</a></li>
<li><a href="#branches58srcwpcontentthemestwentytwentyonefunctionsphp">branches/5.8/src/wp-content/themes/twentytwentyone/functions.php</a></li>
<li><a href="#branches58srcwpcontentthemestwentytwentyoneimagephp">branches/5.8/src/wp-content/themes/twentytwentyone/image.php</a></li>
<li><a href="#branches58srcwpcontentthemestwentytwentyoneincmenufunctionsphp">branches/5.8/src/wp-content/themes/twentytwentyone/inc/menu-functions.php</a></li>
<li><a href="#branches58srcwpcontentthemestwentytwentyoneinctemplatefunctionsphp">branches/5.8/src/wp-content/themes/twentytwentyone/inc/template-functions.php</a></li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#branches58">branches/5.8/</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<span class="cx" style="display: block; padding: 0 10px">Index: branches/5.8
</span><span class="cx" style="display: block; padding: 0 10px">===================================================================
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">--- branches/5.8 2021-07-02 19:05:46 UTC (rev 51319)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ branches/5.8 2021-07-02 19:07:01 UTC (rev 51320)
</ins><a id="branches58"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: branches/5.8</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: svn:mergeinfo</h4></div>
<span class="cx" style="display: block; padding: 0 10px"> /branches/4.9:43557,43622
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/5.0:43681-43682,43684-43688,43719-43720,43723,43726-43727,43729-43731,43734-43744,43747,43751-43754,43758,43760-43765,43767-43770,43772,43774-43781,43783,43785,43790-43806,43808-43821,43825,43828,43830-43834,43836-43843,43846-43863,43867-43889,43891-43894,43897-43905,43908-43909,43911-43929,43931-43942,43946-43947,43949-43956,43959-43964,43967-43969,43988,43994,44014,44017,44047,44183,44185,44187-44206,44208-44213,44231-44232,44235,44248,44284,44287-44288
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/5.5:49373-49379,49381
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/trunk:51274,51277,51279-51284,51286-51289,51292-51294,51307
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/trunk:51274,51277,51279-51284,51286-51289,51292-51294,51304,51307
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="branches58srcwpcontentthemestwentytwentyoneassetsjscustomizehelpersjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/customize-helpers.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/customize-helpers.js 2021-07-02 19:05:46 UTC (rev 51319)
+++ branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/customize-helpers.js 2021-07-02 19:07:01 UTC (rev 51320)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,6 +1,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Get luminance from a HEX color.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param {string} hex - The hex color.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return {number} - Returns the luminance, number between 0 and 255.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,6 +15,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Get RGB from HEX.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param {string} hex - The hex color.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return {Object} - Returns an object {r, g, b}
</span></span></pre></div>
<a id="branches58srcwpcontentthemestwentytwentyoneassetsjspalettecolorpickerjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/palette-colorpicker.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/palette-colorpicker.js 2021-07-02 19:05:46 UTC (rev 51319)
+++ branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/palette-colorpicker.js 2021-07-02 19:07:01 UTC (rev 51320)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5,6 +5,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * with a few tweaks:
</span><span class="cx" style="display: block; padding: 0 10px"> * Removed the hue picker script because we don't use it here
</span><span class="cx" style="display: block; padding: 0 10px"> * Added the "palettes" argument in wpColorPicker().
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @since Twenty Twenty-One 1.0
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> wp.customize.controlConstructor['twenty-twenty-one-color'] = wp.customize.Control.extend( {
</span><span class="cx" style="display: block; padding: 0 10px"> ready: function() {
</span></span></pre></div>
<a id="branches58srcwpcontentthemestwentytwentyoneassetsjspolyfillsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/polyfills.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/polyfills.js 2021-07-02 19:05:46 UTC (rev 51319)
+++ branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/polyfills.js 2021-07-02 19:07:01 UTC (rev 51320)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7,6 +7,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Polyfill for Element.closest() because we need to support IE11.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! Element.prototype.matches ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,6 +31,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Polyfill for NodeList.foreach() because we need to support IE11.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> if ( window.NodeList && ! NodeList.prototype.forEach ) {
</span></span></pre></div>
<a id="branches58srcwpcontentthemestwentytwentyoneassetsjsprimarynavigationjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js 2021-07-02 19:05:46 UTC (rev 51319)
+++ branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js 2021-07-02 19:07:01 UTC (rev 51320)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7,9 +7,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Toggle an attribute's value
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param {Element} el - The element.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {boolean} withListeners - Whether we want to add/remove listeners or not.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since Twenty Twenty-One 1.0
</del><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function twentytwentyoneToggleAriaExpanded( el, withListeners ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'true' !== el.getAttribute( 'aria-expanded' ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,6 +38,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Changes the position of submenus so they always fit the screen horizontally.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param {Element} li - The li element.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function twentytwentyoneSubmenuPosition( li ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -65,6 +68,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Handle clicks on submenu toggles.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param {Element} el - The element.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -92,6 +97,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Menu Toggle Behaviors
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param {string} id - The ID.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> var navMenu = function( id ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -112,9 +119,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> mobileButton.focus();
</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">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Trap keyboard navigation in the menu modal.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Adapted from TwentyTwenty
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Adapted from Twenty Twenty.
+ *
+ * @since Twenty Twenty-One 1.0
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> document.addEventListener( 'keydown', function( event ) {
</span><span class="cx" style="display: block; padding: 0 10px"> var modal, elements, selectors, lastEl, firstEl, activeEl, tabKey, shiftKey, escKey;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -158,7 +168,9 @@
</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"> * Close menu and scroll to anchor when an anchor link is clicked.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Adapted from TwentyTwenty.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Adapted from Twenty Twenty.
+ *
+ * @since Twenty Twenty-One 1.1
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> document.addEventListener( 'click', function( event ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // If target onclick is <a> with # within the href attribute
</span></span></pre></div>
<a id="branches58srcwpcontentthemestwentytwentyoneassetsjsskiplinkfocusfixjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/skip-link-focus-fix.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/skip-link-focus-fix.js 2021-07-02 19:05:46 UTC (rev 51319)
+++ branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/skip-link-focus-fix.js 2021-07-02 19:07:01 UTC (rev 51320)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6,6 +6,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * This is the source file for what is minified in the twenty_twenty_one_skip_link_focus_fix() PHP function.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Learn more: https://git.io/vWdr2
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @since Twenty Twenty-One 1.0
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> ( function() {
</span><span class="cx" style="display: block; padding: 0 10px"> var isIe = /(trident|msie)/i.test( navigator.userAgent );
</span></span></pre></div>
<a id="branches58srcwpcontentthemestwentytwentyonefunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/src/wp-content/themes/twentytwentyone/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/src/wp-content/themes/twentytwentyone/functions.php 2021-07-02 19:05:46 UTC (rev 51319)
+++ branches/5.8/src/wp-content/themes/twentytwentyone/functions.php 2021-07-02 19:07:01 UTC (rev 51320)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -95,7 +95,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">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /**
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
</ins><span class="cx" style="display: block; padding: 0 10px"> * Add support for core custom logo.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @link https://codex.wordpress.org/Theme_Logo
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -485,6 +485,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * This does not enqueue the script because it is tiny and because it is only for IE11,
</span><span class="cx" style="display: block; padding: 0 10px"> * thus it does not warrant having an entire dedicated blocking script being loaded.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @link https://git.io/vWdr2
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function twenty_twenty_one_skip_link_focus_fix() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -603,6 +605,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return void
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function twentytwentyone_the_html_classes() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the classes for the main <html> element.
+ *
+ * @since Twenty Twenty-One 1.0
+ *
+ * @param string The list of classes. Default empty string.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $classes = apply_filters( 'twentytwentyone_html_classes', '' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $classes ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span></span></pre></div>
<a id="branches58srcwpcontentthemestwentytwentyoneimagephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/src/wp-content/themes/twentytwentyone/image.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/src/wp-content/themes/twentytwentyone/image.php 2021-07-02 19:05:46 UTC (rev 51319)
+++ branches/5.8/src/wp-content/themes/twentytwentyone/image.php 2021-07-02 19:07:01 UTC (rev 51320)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -24,7 +24,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filter the default image attachment size.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $image_size Image size. Default 'large'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
+ * @param string $image_size Image size. Default 'full'.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $image_size = apply_filters( 'twenty_twenty_one_attachment_size', 'full' );
</span><span class="cx" style="display: block; padding: 0 10px"> echo wp_get_attachment_image( get_the_ID(), $image_size );
</span></span></pre></div>
<a id="branches58srcwpcontentthemestwentytwentyoneincmenufunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/src/wp-content/themes/twentytwentyone/inc/menu-functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/src/wp-content/themes/twentytwentyone/inc/menu-functions.php 2021-07-02 19:05:46 UTC (rev 51319)
+++ branches/5.8/src/wp-content/themes/twentytwentyone/inc/menu-functions.php 2021-07-02 19:07:01 UTC (rev 51320)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -54,6 +54,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays SVG icons in the footer navigation.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $item_output The menu item's starting HTML output.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Post $item Menu item data object.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $depth Depth of the menu. Used for padding.
</span></span></pre></div>
<a id="branches58srcwpcontentthemestwentytwentyoneinctemplatefunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.8/src/wp-content/themes/twentytwentyone/inc/template-functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.8/src/wp-content/themes/twentytwentyone/inc/template-functions.php 2021-07-02 19:05:46 UTC (rev 51319)
+++ branches/5.8/src/wp-content/themes/twentytwentyone/inc/template-functions.php 2021-07-02 19:07:01 UTC (rev 51320)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,6 +103,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function twenty_twenty_one_can_show_post_thumbnail() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters whether post thumbnail can be displayed.
+ *
+ * @since Twenty Twenty-One 1.0
+ *
+ * @param bool $show_post_thumbnail Whether to show post thumbnail.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> return apply_filters(
</span><span class="cx" style="display: block; padding: 0 10px"> 'twenty_twenty_one_can_show_post_thumbnail',
</span><span class="cx" style="display: block; padding: 0 10px"> ! post_password_required() && ! is_attachment() && has_post_thumbnail()
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -121,7 +128,9 @@
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Creates continue reading text
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Creates continue reading text.
+ *
+ * @since Twenty Twenty-One 1.0
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function twenty_twenty_one_continue_reading_text() {
</span><span class="cx" style="display: block; padding: 0 10px"> $continue_reading = sprintf(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -134,7 +143,9 @@
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Create the continue reading link for excerpt.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Creates the continue reading link for excerpt.
+ *
+ * @since Twenty Twenty-One 1.0
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function twenty_twenty_one_continue_reading_link_excerpt() {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_admin() ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -146,7 +157,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'excerpt_more', 'twenty_twenty_one_continue_reading_link_excerpt' );
</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">- * Create the continue reading link.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Creates the continue reading link.
+ *
+ * @since Twenty Twenty-One 1.0
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function twenty_twenty_one_continue_reading_link() {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_admin() ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -159,7 +172,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! function_exists( 'twenty_twenty_one_post_title' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Add a title to posts and pages that are missing titles.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Adds a title to posts and pages that are missing titles.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since Twenty Twenty-One 1.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -189,6 +202,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Changes the default navigation arrows to svg icons
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $calendar_output The generated HTML of the calendar.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -204,7 +219,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Return CSS for non-latin language, if available, or null
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor".
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since Twenty Twenty-One 1.0
+ *
+ * @param string $type Whether to return CSS for the "front-end", "block-editor", or "classic-editor".
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function twenty_twenty_one_get_non_latin_css( $type = 'front-end' ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -212,7 +229,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Fetch site locale.
</span><span class="cx" style="display: block; padding: 0 10px"> $locale = get_bloginfo( 'language' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Define fallback fonts for non-latin languages.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the fallback fonts for non-latin languages.
+ *
+ * @since Twenty Twenty-One 1.0
+ *
+ * @param array $font_family An array of locales and font families.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $font_family = apply_filters(
</span><span class="cx" style="display: block; padding: 0 10px"> 'twenty_twenty_one_get_localized_font_family_types',
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -282,7 +305,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return '';
</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">- // Define elements to apply fallback fonts to.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the elements to apply fallback fonts to.
+ *
+ * @since Twenty Twenty-One 1.0
+ *
+ * @param array $elements An array of elements for "front-end", "block-editor", or "classic-editor".
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $elements = apply_filters(
</span><span class="cx" style="display: block; padding: 0 10px"> 'twenty_twenty_one_get_localized_font_family_elements',
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -368,6 +397,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 ( $blocks_content ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /** This filter is documented in wp-includes/post-template.php */
</ins><span class="cx" style="display: block; padding: 0 10px"> echo apply_filters( 'the_content', $blocks_content ); // phpcs:ignore WordPress.Security.EscapeOutput
</span><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre>
</div>
</div>
</body>
</html>