summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/_enqueues/admin/user-profile.js4
-rw-r--r--src/js/_enqueues/vendor/README.md2
-rw-r--r--src/js/_enqueues/vendor/swfobject.js4
-rw-r--r--src/js/_enqueues/vendor/swfupload/handlers.js54
-rw-r--r--src/js/_enqueues/vendor/swfupload/handlers.min.js1
-rw-r--r--src/js/_enqueues/vendor/swfupload/license.txt32
-rw-r--r--src/js/_enqueues/vendor/swfupload/swfupload.js140
-rw-r--r--src/js/media/views/uploader/status.js6
-rw-r--r--src/wp-admin/async-upload.php19
-rw-r--r--src/wp-admin/css/common.css4
-rw-r--r--src/wp-admin/css/list-tables.css8
-rw-r--r--src/wp-admin/css/revisions.css30
-rw-r--r--src/wp-admin/includes/ajax-actions.php8
-rw-r--r--src/wp-admin/includes/class-language-pack-upgrader.php2
-rw-r--r--src/wp-admin/includes/class-wp-automatic-updater.php2
-rw-r--r--src/wp-admin/includes/class-wp-community-events.php8
-rw-r--r--src/wp-admin/includes/class-wp-debug-data.php23
-rw-r--r--src/wp-admin/includes/class-wp-filesystem-ftpext.php9
-rw-r--r--src/wp-admin/includes/class-wp-filesystem-ftpsockets.php4
-rw-r--r--src/wp-admin/includes/media.php2
-rw-r--r--src/wp-admin/includes/misc.php4
-rw-r--r--src/wp-admin/includes/post.php2
-rw-r--r--src/wp-admin/includes/revision.php72
-rw-r--r--src/wp-admin/includes/taxonomy.php2
-rw-r--r--src/wp-admin/includes/template.php3
-rw-r--r--src/wp-admin/includes/update-core.php1
-rw-r--r--src/wp-admin/nav-menus.php2
-rw-r--r--src/wp-admin/options-discussion.php2
-rw-r--r--src/wp-admin/user-edit.php30
-rw-r--r--src/wp-content/themes/twentyeleven/inc/block-patterns.php4
-rw-r--r--src/wp-content/themes/twentyfourteen/inc/block-patterns.php2
-rw-r--r--src/wp-content/themes/twentynineteen/inc/block-patterns.php16
-rw-r--r--src/wp-content/themes/twentyseventeen/inc/block-patterns.php60
-rw-r--r--src/wp-content/themes/twentytwenty/assets/js/index.js5
-rw-r--r--src/wp-includes/block-template.php2
-rw-r--r--src/wp-includes/category-template.php26
-rw-r--r--src/wp-includes/class-wp-block-pattern-categories-registry.php2
-rw-r--r--src/wp-includes/class-wp-block-patterns-registry.php2
-rw-r--r--src/wp-includes/class-wp-block-styles-registry.php2
-rw-r--r--src/wp-includes/class-wp-customize-widgets.php8
-rw-r--r--src/wp-includes/class-wp-image-editor-imagick.php51
-rw-r--r--src/wp-includes/class-wpdb.php8
-rw-r--r--src/wp-includes/comment-template.php4
-rw-r--r--src/wp-includes/comment.php6
-rw-r--r--src/wp-includes/css/wp-embed-template.css17
-rw-r--r--src/wp-includes/formatting.php9
-rw-r--r--src/wp-includes/link-template.php31
-rw-r--r--src/wp-includes/media-template.php4
-rw-r--r--src/wp-includes/media.php21
-rw-r--r--src/wp-includes/meta.php188
-rw-r--r--src/wp-includes/ms-load.php8
-rw-r--r--src/wp-includes/ms-site.php8
-rw-r--r--src/wp-includes/pluggable.php6
-rw-r--r--src/wp-includes/plugin.php4
-rw-r--r--src/wp-includes/post.php6
-rw-r--r--src/wp-includes/rest-api/class-wp-rest-response.php4
-rw-r--r--src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php8
-rw-r--r--src/wp-includes/script-loader.php10
-rw-r--r--src/wp-includes/taxonomy.php18
-rw-r--r--src/wp-includes/theme.php2
-rw-r--r--src/wp-includes/user.php6
61 files changed, 474 insertions, 554 deletions
diff --git a/src/js/_enqueues/admin/user-profile.js b/src/js/_enqueues/admin/user-profile.js
index 2aebe62a91..ad808d3131 100644
--- a/src/js/_enqueues/admin/user-profile.js
+++ b/src/js/_enqueues/admin/user-profile.js
@@ -56,8 +56,8 @@
// Once zxcvbn loads, passwords strength is known.
$( '#pw-weak-text-label' ).text( __( 'Confirm use of weak password' ) );
- // Focus the password field.
- if ( 'mailserver_pass' !== $pass1.prop('id' ) ) {
+ // Focus the password field if not the install screen.
+ if ( 'mailserver_pass' !== $pass1.prop('id' ) && ! $('#weblog_title').length ) {
$( $pass1 ).trigger( 'focus' );
}
}
diff --git a/src/js/_enqueues/vendor/README.md b/src/js/_enqueues/vendor/README.md
index 4764f0b808..fef43e3ec2 100644
--- a/src/js/_enqueues/vendor/README.md
+++ b/src/js/_enqueues/vendor/README.md
@@ -10,7 +10,6 @@ In this directory you'll find vendor JavaScript packages that cannot be installe
- jcrop: https://github.com/tapmodo/Jcrop
- mediaelement: https://github.com/mediaelement/mediaelement
- plupload: https://github.com/moxiecode/plupload
-- swfupload: https://github.com/WordPress/secure-swfupload
- thickbox: https://codylindley.com/thickbox/
- tinymce: https://www.tiny.cloud/get-tiny/self-hosted/
- Download "TinyMCE Dev Package". This package is needed because it includes
@@ -70,6 +69,5 @@ In this directory you'll find vendor JavaScript packages that cannot be installe
- jquery/jquery.serializeobject: https://github.com/cowboy/jquery-misc/blob/master/jquery.ba-serializeobject.js
- jquery/jquery.table-hotkeys: WP version can be downloaded at https://code.google.com/archive/p/js-hotkeys/downloads?page=2. A newer version is available at https://github.com/jeresig/jquery.hotkeys.
- jquery/jquery.ui.touch-punch.js https://github.com/furf/jquery-ui-touch-punch/blob/master/jquery.ui.touch-punch.js
-- swfobject: https://github.com/swfobject/swfobject
- tw-sack: https://github.com/abritinthebay/simpleajaxcodekit
- zxcvbn: https://github.com/dropbox/zxcvbn cannot automatically be installed as the frequency lists need to be manually ROT13 transformed.
diff --git a/src/js/_enqueues/vendor/swfobject.js b/src/js/_enqueues/vendor/swfobject.js
index 87e61553b3..e69de29bb2 100644
--- a/src/js/_enqueues/vendor/swfobject.js
+++ b/src/js/_enqueues/vendor/swfobject.js
@@ -1,4 +0,0 @@
-/* SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+encodeURI(O.location).toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}(); \ No newline at end of file
diff --git a/src/js/_enqueues/vendor/swfupload/handlers.js b/src/js/_enqueues/vendor/swfupload/handlers.js
index 2de11ab6d9..e69de29bb2 100644
--- a/src/js/_enqueues/vendor/swfupload/handlers.js
+++ b/src/js/_enqueues/vendor/swfupload/handlers.js
@@ -1,54 +0,0 @@
-var topWin = window.dialogArguments || opener || parent || top;
-
-function fileDialogStart() {}
-function fileQueued() {}
-function uploadStart() {}
-function uploadProgress() {}
-function prepareMediaItem() {}
-function prepareMediaItemInit() {}
-function itemAjaxError() {}
-function deleteSuccess() {}
-function deleteError() {}
-function updateMediaForm() {}
-function uploadSuccess() {}
-function uploadComplete() {}
-function wpQueueError() {}
-function wpFileError() {}
-function fileQueueError() {}
-function fileDialogComplete() {}
-function uploadError() {}
-function cancelUpload() {}
-
-function switchUploader() {
- jQuery( '#' + swfu.customSettings.swfupload_element_id ).hide();
- jQuery( '#' + swfu.customSettings.degraded_element_id ).show();
- jQuery( '.upload-html-bypass' ).hide();
-}
-
-function swfuploadPreLoad() {
- switchUploader();
-}
-
-function swfuploadLoadFailed() {
- switchUploader();
-}
-
-jQuery(document).ready(function($){
- $( 'input[type="radio"]', '#media-items' ).on( 'click', function(){
- var tr = $(this).closest('tr');
-
- if ( $(tr).hasClass('align') )
- setUserSetting('align', $(this).val());
- else if ( $(tr).hasClass('image-size') )
- setUserSetting('imgsize', $(this).val());
- });
-
- $( 'button.button', '#media-items' ).on( 'click', function(){
- var c = this.className || '';
- c = c.match(/url([^ '"]+)/);
- if ( c && c[1] ) {
- setUserSetting('urlbutton', c[1]);
- $(this).siblings('.urlfield').val( $(this).attr('title') );
- }
- });
-});
diff --git a/src/js/_enqueues/vendor/swfupload/handlers.min.js b/src/js/_enqueues/vendor/swfupload/handlers.min.js
index 09bbaf9c3d..e69de29bb2 100644
--- a/src/js/_enqueues/vendor/swfupload/handlers.min.js
+++ b/src/js/_enqueues/vendor/swfupload/handlers.min.js
@@ -1 +0,0 @@
-function fileDialogStart(){}function fileQueued(){}function uploadStart(){}function uploadProgress(){}function prepareMediaItem(){}function prepareMediaItemInit(){}function itemAjaxError(){}function deleteSuccess(){}function deleteError(){}function updateMediaForm(){}function uploadSuccess(){}function uploadComplete(){}function wpQueueError(){}function wpFileError(){}function fileQueueError(){}function fileDialogComplete(){}function uploadError(){}function cancelUpload(){}function switchUploader(){jQuery("#"+swfu.customSettings.swfupload_element_id).hide(),jQuery("#"+swfu.customSettings.degraded_element_id).show(),jQuery(".upload-html-bypass").hide()}function swfuploadPreLoad(){switchUploader()}function swfuploadLoadFailed(){switchUploader()}var topWin=window.dialogArguments||opener||parent||top;jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").on("click",function(){var b=a(this).closest("tr");a(b).hasClass("align")?setUserSetting("align",a(this).val()):a(b).hasClass("image-size")&&setUserSetting("imgsize",a(this).val())}),a("button.button","#media-items").on("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/),b&&b[1]&&(setUserSetting("urlbutton",b[1]),a(this).siblings(".urlfield").val(a(this).attr("title")))})}); \ No newline at end of file
diff --git a/src/js/_enqueues/vendor/swfupload/license.txt b/src/js/_enqueues/vendor/swfupload/license.txt
index 8252ca9e24..e69de29bb2 100644
--- a/src/js/_enqueues/vendor/swfupload/license.txt
+++ b/src/js/_enqueues/vendor/swfupload/license.txt
@@ -1,32 +0,0 @@
-/**
- * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
- *
- * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
- *
- * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- */
-
-The MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. \ No newline at end of file
diff --git a/src/js/_enqueues/vendor/swfupload/swfupload.js b/src/js/_enqueues/vendor/swfupload/swfupload.js
index 14d58dcaf5..e69de29bb2 100644
--- a/src/js/_enqueues/vendor/swfupload/swfupload.js
+++ b/src/js/_enqueues/vendor/swfupload/swfupload.js
@@ -1,140 +0,0 @@
-/**
- * SWFUpload fallback
- *
- * @since 4.9.0
- */
-
-var SWFUpload;
-
-( function () {
- function noop() {}
-
- if (SWFUpload == undefined) {
- SWFUpload = function (settings) {
- this.initSWFUpload(settings);
- };
- }
-
- SWFUpload.prototype.initSWFUpload = function ( settings ) {
- function fallback() {
- var $ = window.jQuery;
- var $placeholder = settings.button_placeholder_id ? $( '#' + settings.button_placeholder_id ) : $( settings.button_placeholder );
-
- if ( ! $placeholder.length ) {
- return;
- }
-
- var $form = $placeholder.closest( 'form' );
-
- if ( ! $form.length ) {
- $form = $( '<form enctype="multipart/form-data" method="post">' );
- $form.attr( 'action', settings.upload_url );
- $form.insertAfter( $placeholder ).append( $placeholder );
- }
-
- $placeholder.replaceWith(
- $( '<div>' )
- .append(
- $( '<input type="file" multiple />' ).attr({
- name: settings.file_post_name || 'async-upload',
- accepts: settings.file_types || '*.*'
- })
- ).append(
- $( '<input type="submit" name="html-upload" class="button" value="Upload" />' )
- )
- );
- }
-
- try {
- // Try the built-in fallback.
- if ( typeof settings.swfupload_load_failed_handler === 'function' && settings.custom_settings ) {
-
- window.swfu = {
- customSettings: settings.custom_settings
- };
-
- settings.swfupload_load_failed_handler();
- } else {
- fallback();
- }
- } catch ( ex ) {
- fallback();
- }
- };
-
- SWFUpload.instances = {};
- SWFUpload.movieCount = 0;
- SWFUpload.version = "0";
- SWFUpload.QUEUE_ERROR = {};
- SWFUpload.UPLOAD_ERROR = {};
- SWFUpload.FILE_STATUS = {};
- SWFUpload.BUTTON_ACTION = {};
- SWFUpload.CURSOR = {};
- SWFUpload.WINDOW_MODE = {};
-
- SWFUpload.completeURL = noop;
- SWFUpload.prototype.initSettings = noop;
- SWFUpload.prototype.loadFlash = noop;
- SWFUpload.prototype.getFlashHTML = noop;
- SWFUpload.prototype.getFlashVars = noop;
- SWFUpload.prototype.getMovieElement = noop;
- SWFUpload.prototype.buildParamString = noop;
- SWFUpload.prototype.destroy = noop;
- SWFUpload.prototype.displayDebugInfo = noop;
- SWFUpload.prototype.addSetting = noop;
- SWFUpload.prototype.getSetting = noop;
- SWFUpload.prototype.callFlash = noop;
- SWFUpload.prototype.selectFile = noop;
- SWFUpload.prototype.selectFiles = noop;
- SWFUpload.prototype.startUpload = noop;
- SWFUpload.prototype.cancelUpload = noop;
- SWFUpload.prototype.stopUpload = noop;
- SWFUpload.prototype.getStats = noop;
- SWFUpload.prototype.setStats = noop;
- SWFUpload.prototype.getFile = noop;
- SWFUpload.prototype.addFileParam = noop;
- SWFUpload.prototype.removeFileParam = noop;
- SWFUpload.prototype.setUploadURL = noop;
- SWFUpload.prototype.setPostParams = noop;
- SWFUpload.prototype.addPostParam = noop;
- SWFUpload.prototype.removePostParam = noop;
- SWFUpload.prototype.setFileTypes = noop;
- SWFUpload.prototype.setFileSizeLimit = noop;
- SWFUpload.prototype.setFileUploadLimit = noop;
- SWFUpload.prototype.setFileQueueLimit = noop;
- SWFUpload.prototype.setFilePostName = noop;
- SWFUpload.prototype.setUseQueryString = noop;
- SWFUpload.prototype.setRequeueOnError = noop;
- SWFUpload.prototype.setHTTPSuccess = noop;
- SWFUpload.prototype.setAssumeSuccessTimeout = noop;
- SWFUpload.prototype.setDebugEnabled = noop;
- SWFUpload.prototype.setButtonImageURL = noop;
- SWFUpload.prototype.setButtonDimensions = noop;
- SWFUpload.prototype.setButtonText = noop;
- SWFUpload.prototype.setButtonTextPadding = noop;
- SWFUpload.prototype.setButtonTextStyle = noop;
- SWFUpload.prototype.setButtonDisabled = noop;
- SWFUpload.prototype.setButtonAction = noop;
- SWFUpload.prototype.setButtonCursor = noop;
- SWFUpload.prototype.queueEvent = noop;
- SWFUpload.prototype.executeNextEvent = noop;
- SWFUpload.prototype.unescapeFilePostParams = noop;
- SWFUpload.prototype.testExternalInterface = noop;
- SWFUpload.prototype.flashReady = noop;
- SWFUpload.prototype.cleanUp = noop;
- SWFUpload.prototype.fileDialogStart = noop;
- SWFUpload.prototype.fileQueued = noop;
- SWFUpload.prototype.fileQueueError = noop;
- SWFUpload.prototype.fileDialogComplete = noop;
- SWFUpload.prototype.uploadStart = noop;
- SWFUpload.prototype.returnUploadStart = noop;
- SWFUpload.prototype.uploadProgress = noop;
- SWFUpload.prototype.uploadError = noop;
- SWFUpload.prototype.uploadSuccess = noop;
- SWFUpload.prototype.uploadComplete = noop;
- SWFUpload.prototype.debug = noop;
- SWFUpload.prototype.debugMessage = noop;
- SWFUpload.Console = {
- writeLine: noop
- };
-}() );
diff --git a/src/js/media/views/uploader/status.js b/src/js/media/views/uploader/status.js
index 86c538b833..f629e0a343 100644
--- a/src/js/media/views/uploader/status.js
+++ b/src/js/media/views/uploader/status.js
@@ -124,8 +124,11 @@ UploaderStatus = View.extend(/** @lends wp.media.view.UploaderStatus.prototype *
this.views.add( '.upload-errors', statusError, { at: 0 } );
_.delay( function() {
buttonClose.trigger( 'focus' );
- wp.a11y.speak( error.get( 'message' ), 'assertive' );
}, 1000 );
+
+ _.delay( function() {
+ wp.a11y.speak( error.get( 'message' ) );
+ }, 1500 );
},
dismiss: function() {
@@ -135,6 +138,7 @@ UploaderStatus = View.extend(/** @lends wp.media.view.UploaderStatus.prototype *
_.invoke( errors, 'remove' );
}
wp.Uploader.errors.reset();
+ wp.a11y.speak( wp.i18n.__( 'Error dismissed.' ) );
// Move focus to the modal after the dismiss button gets removed from the DOM.
if ( this.controller.modal ) {
this.controller.modal.focusManager.focus();
diff --git a/src/wp-admin/async-upload.php b/src/wp-admin/async-upload.php
index 2ac2f20e76..135568507c 100644
--- a/src/wp-admin/async-upload.php
+++ b/src/wp-admin/async-upload.php
@@ -112,12 +112,14 @@ if ( isset( $_REQUEST['post_id'] ) ) {
$id = media_handle_upload( 'async-upload', $post_id );
if ( is_wp_error( $id ) ) {
- $button_unique_id = uniqid( 'dismiss-' );
- $message = sprintf(
+ $button_unique_id = uniqid( 'dismiss-' );
+ $error_description_id = uniqid( 'error-description-' );
+ $message = sprintf(
'%s <strong>%s</strong><br />%s',
sprintf(
- '<button type="button" id="%s" class="dismiss button-link">%s</button>',
+ '<button type="button" id="%1$s" class="dismiss button-link" aria-describedby="%2$s">%3$s</button>',
esc_attr( $button_unique_id ),
+ esc_attr( $error_description_id ),
__( 'Dismiss' )
),
sprintf(
@@ -127,14 +129,23 @@ if ( is_wp_error( $id ) ) {
),
esc_html( $id->get_error_message() )
);
+
wp_admin_notice(
$message,
array(
+ 'id' => $error_description_id,
'additional_classes' => array( 'error-div', 'error' ),
'paragraph_wrap' => false,
)
);
- echo "<script>jQuery( 'button#{$button_unique_id}' ).on( 'click', function() {jQuery(this).parents('div.media-item').slideUp(200, function(){jQuery(this).remove();})});</script>\n";
+
+ $speak_message = sprintf(
+ /* translators: %s: Name of the file that failed to upload. */
+ __( '%s has failed to upload.' ),
+ esc_js( $_FILES['async-upload']['name'] )
+ );
+
+ echo "<script>_.delay(function() {wp.a11y.speak('" . esc_js( $speak_message ) . "');}, 1500);jQuery( 'button#{$button_unique_id}' ).on( 'click', function() {jQuery(this).parents('div.media-item').slideUp(200, function(){jQuery(this).remove();wp.a11y.speak( wp.i18n.__( 'Error dismissed.' ) );jQuery( '#plupload-browse-button' ).trigger( 'focus' );})});</script>\n";
exit;
}
diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css
index c008d784ce..f8764e2b2d 100644
--- a/src/wp-admin/css/common.css
+++ b/src/wp-admin/css/common.css
@@ -3912,6 +3912,10 @@ img {
top: 7px;
}
+ .screen-reader-shortcut[href="#wp-toolbar"] {
+ display: none;
+ }
+
body {
min-width: 240px;
overflow-x: hidden;
diff --git a/src/wp-admin/css/list-tables.css b/src/wp-admin/css/list-tables.css
index da4bb599be..bc38d64b38 100644
--- a/src/wp-admin/css/list-tables.css
+++ b/src/wp-admin/css/list-tables.css
@@ -2064,7 +2064,6 @@ div.action-links,
}
.row-actions {
- margin-left: -8px;
margin-right: -8px;
padding-top: 4px;
}
@@ -2077,10 +2076,15 @@ div.action-links,
color: transparent;
}
+ .row-actions span {
+ font-size: 0;
+ }
+
.row-actions span a,
.row-actions span .button-link {
display: inline-block;
- padding: 4px 8px;
+ padding: 4px 16px 4px 0;
+ font-size: 13px;
line-height: 1.5;
}
diff --git a/src/wp-admin/css/revisions.css b/src/wp-admin/css/revisions.css
index 9d3a0b3a91..e16143cf48 100644
--- a/src/wp-admin/css/revisions.css
+++ b/src/wp-admin/css/revisions.css
@@ -572,6 +572,28 @@ div.revisions-controls > .wp-slider > .ui-slider-handle {
}
}
+@media screen and (max-width: 600px) {
+ .revisions-meta .author-card:not(.comparing-two-revisions .author-card) {
+ display: flex;
+ flex-direction: column;
+ width: fit-content;
+ gap: 16px;
+ }
+
+ .comparing-two-revisions .revisions-meta .restore-revision {
+ margin-top: 16px;
+ }
+
+ .revisions-controls {
+ padding-top: 0;
+ }
+
+ .revision-toggle-compare-mode {
+ position: relative;
+ padding: 1rem 0;
+ }
+}
+
@media screen and (max-width: 782px) {
#diff-next-revision,
#diff-previous-revision {
@@ -585,14 +607,18 @@ div.revisions-controls > .wp-slider > .ui-slider-handle {
.revisions-controls,
.comparing-two-revisions .revisions-controls {
- height: 170px;
+ height: fit-content;
}
.revisions-tooltip {
- bottom: 130px;
+ bottom: 155px;
z-index: 2;
}
+ .comparing-two-revisions .revisions-tooltip {
+ bottom: 200px;
+ }
+
.diff-meta {
overflow: hidden;
}
diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
index 83b682634b..53635479e0 100644
--- a/src/wp-admin/includes/ajax-actions.php
+++ b/src/wp-admin/includes/ajax-actions.php
@@ -5354,7 +5354,7 @@ function wp_ajax_health_check_dotorg_communication() {
_doing_it_wrong(
'wp_ajax_health_check_dotorg_communication',
sprintf(
- // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it.
+ /* translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. */
__( 'The Site Health check for %1$s has been replaced with %2$s.' ),
'wp_ajax_health_check_dotorg_communication',
'WP_REST_Site_Health_Controller::test_dotorg_communication'
@@ -5387,7 +5387,7 @@ function wp_ajax_health_check_background_updates() {
_doing_it_wrong(
'wp_ajax_health_check_background_updates',
sprintf(
- // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it.
+ /* translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. */
__( 'The Site Health check for %1$s has been replaced with %2$s.' ),
'wp_ajax_health_check_background_updates',
'WP_REST_Site_Health_Controller::test_background_updates'
@@ -5420,7 +5420,7 @@ function wp_ajax_health_check_loopback_requests() {
_doing_it_wrong(
'wp_ajax_health_check_loopback_requests',
sprintf(
- // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it.
+ /* translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. */
__( 'The Site Health check for %1$s has been replaced with %2$s.' ),
'wp_ajax_health_check_loopback_requests',
'WP_REST_Site_Health_Controller::test_loopback_requests'
@@ -5470,7 +5470,7 @@ function wp_ajax_health_check_get_sizes() {
_doing_it_wrong(
'wp_ajax_health_check_get_sizes',
sprintf(
- // translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it.
+ /* translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it. */
__( 'The Site Health check for %1$s has been replaced with %2$s.' ),
'wp_ajax_health_check_get_sizes',
'WP_REST_Site_Health_Controller::get_directory_sizes'
diff --git a/src/wp-admin/includes/class-language-pack-upgrader.php b/src/wp-admin/includes/class-language-pack-upgrader.php
index 6f7cf742bd..89b9f9ac87 100644
--- a/src/wp-admin/includes/class-language-pack-upgrader.php
+++ b/src/wp-admin/includes/class-language-pack-upgrader.php
@@ -383,7 +383,7 @@ class Language_Pack_Upgrader extends WP_Upgrader {
case 'theme':
$theme = wp_get_theme( $update->slug );
if ( $theme->exists() ) {
- return $theme->Get( 'Name' );
+ return $theme->get( 'Name' );
}
break;
case 'plugin':
diff --git a/src/wp-admin/includes/class-wp-automatic-updater.php b/src/wp-admin/includes/class-wp-automatic-updater.php
index 4dccd94ccd..2facbeb1d5 100644
--- a/src/wp-admin/includes/class-wp-automatic-updater.php
+++ b/src/wp-admin/includes/class-wp-automatic-updater.php
@@ -411,7 +411,7 @@ class WP_Automatic_Updater {
case 'theme':
$upgrader_item = $item->theme;
$theme = wp_get_theme( $upgrader_item );
- $item_name = $theme->Get( 'Name' );
+ $item_name = $theme->get( 'Name' );
// Add the current version so that it can be reported in the notification email.
$item->current_version = $theme->get( 'Version' );
if ( empty( $item->current_version ) ) {
diff --git a/src/wp-admin/includes/class-wp-community-events.php b/src/wp-admin/includes/class-wp-community-events.php
index 008611af21..b5a65e298d 100644
--- a/src/wp-admin/includes/class-wp-community-events.php
+++ b/src/wp-admin/includes/class-wp-community-events.php
@@ -375,17 +375,13 @@ class WP_Community_Events {
* of the user who triggered the cache refresh, rather than their own.
*
* @since 4.8.0
- * @deprecated 5.6.0 No longer used in core.
+ * @deprecated 5.5.2 No longer used in core.
*
* @param array $response_body The response which contains the events.
* @return array The response with dates and times formatted.
*/
protected function format_event_data_time( $response_body ) {
- _deprecated_function(
- __METHOD__,
- '5.5.2',
- 'This is no longer used by core, and only kept for backward compatibility.'
- );
+ _deprecated_function( __METHOD__, '5.5.2' );
if ( isset( $response_body['events'] ) ) {
foreach ( $response_body['events'] as $key => $event ) {
diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php
index cbb57a4b8c..cd04297684 100644
--- a/src/wp-admin/includes/class-wp-debug-data.php
+++ b/src/wp-admin/includes/class-wp-debug-data.php
@@ -682,6 +682,25 @@ class WP_Debug_Data {
);
}
+ // Get the image format transforms.
+ $mappings = wp_get_image_editor_output_format( '', '' );
+ $formatted_mappings = array();
+
+ if ( ! empty( $mappings ) ) {
+ foreach ( $mappings as $format => $mime_type ) {
+ $formatted_mappings[] = sprintf( '%s &rarr; %s', $format, $mime_type );
+ }
+ $mappings_display = implode( ', ', $formatted_mappings );
+ } else {
+ $mappings_display = __( 'No format transforms defined' );
+ }
+
+ $fields['image_format_transforms'] = array(
+ 'label' => __( 'Image format transforms' ),
+ 'value' => $mappings_display,
+ 'debug' => ( empty( $mappings ) ) ? 'No format transforms defined' : $mappings_display,
+ );
+
// Get GD information, if available.
if ( function_exists( 'gd_info' ) ) {
$gd = gd_info();
@@ -1860,10 +1879,14 @@ class WP_Debug_Data {
* Intended to supplement the array returned by `WP_Debug_Data::debug_data()`.
*
* @since 5.2.0
+ * @deprecated 5.6.0 Use WP_REST_Site_Health_Controller::get_directory_sizes()
+ * @see WP_REST_Site_Health_Controller::get_directory_sizes()
*
* @return array The sizes of the directories, also the database size and total installation size.
*/
public static function get_sizes() {
+ _deprecated_function( __METHOD__, '5.6.0', 'WP_REST_Site_Health_Controller::get_directory_sizes()' );
+
$size_db = self::get_database_size();
$upload_dir = wp_get_upload_dir();
diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpext.php b/src/wp-admin/includes/class-wp-filesystem-ftpext.php
index 0294720ccd..7c721734c3 100644
--- a/src/wp-admin/includes/class-wp-filesystem-ftpext.php
+++ b/src/wp-admin/includes/class-wp-filesystem-ftpext.php
@@ -601,9 +601,11 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
}
/**
- * @param string $line
- * @return array {
- * Array of file information.
+ * Parses an individual entry from the FTP LIST command output.
+ *
+ * @param string $line A line from the directory listing.
+ * @return array|string {
+ * Array of file information. Empty string if the line could not be parsed.
*
* @type string $name Name of the file or directory.
* @type string $perms *nix representation of permissions.
@@ -658,7 +660,6 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
$lucifer = preg_split( '/[ ]/', $line, 9, PREG_SPLIT_NO_EMPTY );
if ( $lucifer ) {
- // echo $line."\n";
$lcount = count( $lucifer );
if ( $lcount < 8 ) {
diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
index 9a37d88c11..986fccf2cf 100644
--- a/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
+++ b/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
@@ -77,7 +77,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
return false;
}
- $this->ftp->setTimeout( FS_CONNECT_TIMEOUT );
+ $this->ftp->SetTimeout( FS_CONNECT_TIMEOUT );
if ( ! $this->ftp->SetServer( $this->options['hostname'], $this->options['port'] ) ) {
$this->errors->add(
@@ -120,7 +120,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
$this->ftp->SetType( FTP_BINARY );
$this->ftp->Passive( true );
- $this->ftp->setTimeout( FS_TIMEOUT );
+ $this->ftp->SetTimeout( FS_TIMEOUT );
return true;
}
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index 5c0b5d0b38..7d9fd638fb 100644
--- a/src/wp-admin/includes/media.php
+++ b/src/wp-admin/includes/media.php
@@ -3337,7 +3337,7 @@ function attachment_submitbox_metadata() {
$uploaded_by_link = get_edit_user_link( $author->ID );
}
?>
- <div class="misc-pub-section misc-pub-uploadedby">
+ <div class="misc-pub-section misc-pub-uploadedby word-wrap-break-word">
<?php if ( $uploaded_by_link ) { ?>
<?php _e( 'Uploaded by:' ); ?> <a href="<?php echo $uploaded_by_link; ?>"><strong><?php echo $uploaded_by_name; ?></strong></a>
<?php } else { ?>
diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php
index 979d237448..ff073b0fd3 100644
--- a/src/wp-admin/includes/misc.php
+++ b/src/wp-admin/includes/misc.php
@@ -988,7 +988,7 @@ function saveDomDocument( $doc, $filename ) { // phpcs:ignore WordPress.NamingCo
}
/**
- * Displays the default admin color scheme picker (Used in user-edit.php).
+ * Displays the default administration color scheme picker (Used in user-edit.php).
*
* @since 3.0.0
*
@@ -1025,7 +1025,7 @@ function admin_color_scheme_picker( $user_id ) {
<legend class="screen-reader-text"><span>
<?php
/* translators: Hidden accessibility text. */
- _e( 'Admin Color Scheme' );
+ _e( 'Administration Color Scheme' );
?>
</span></legend>
<?php
diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php
index 40fac43d6e..ebdd61df34 100644
--- a/src/wp-admin/includes/post.php
+++ b/src/wp-admin/includes/post.php
@@ -2186,7 +2186,7 @@ function wp_autosave( $post_data ) {
*
* @param int $post_id Optional. Post ID.
*/
-function redirect_post( $post_id = '' ) {
+function redirect_post( $post_id = 0 ) {
if ( isset( $_POST['save'] ) || isset( $_POST['publish'] ) ) {
$status = get_post_status( $post_id );
diff --git a/src/wp-admin/includes/revision.php b/src/wp-admin/includes/revision.php
index df7201e958..ec2460c0ca 100644
--- a/src/wp-admin/includes/revision.php
+++ b/src/wp-admin/includes/revision.php
@@ -407,41 +407,43 @@ function wp_print_revision_templates() {
<strong id="diff-title-to"><?php _ex( 'To:', 'Followed by post revision info' ); ?></strong>
<# } #>
<div class="author-card<# if ( data.attributes.autosave ) { #> autosave<# } #>">
- {{{ data.attributes.author.avatar }}}
- <div class="author-info" id="diff-title-author">
- <# if ( data.attributes.autosave ) { #>
- <span class="byline">
- <?php
- printf(
- /* translators: %s: User's display name. */
- __( 'Autosave by %s' ),
- '<span class="author-name">{{ data.attributes.author.name }}</span>'
- );
- ?>
- </span>
- <# } else if ( data.attributes.current ) { #>
- <span class="byline">
- <?php
- printf(
- /* translators: %s: User's display name. */
- __( 'Current Revision by %s' ),
- '<span class="author-name">{{ data.attributes.author.name }}</span>'
- );
- ?>
- </span>
- <# } else { #>
- <span class="byline">
- <?php
- printf(
- /* translators: %s: User's display name. */
- __( 'Revision by %s' ),
- '<span class="author-name">{{ data.attributes.author.name }}</span>'
- );
- ?>
- </span>
- <# } #>
- <span class="time-ago">{{ data.attributes.timeAgo }}</span>
- <span class="date">({{ data.attributes.dateShort }})</span>
+ <div>
+ {{{ data.attributes.author.avatar }}}
+ <div class="author-info" id="diff-title-author">
+ <# if ( data.attributes.autosave ) { #>
+ <span class="byline">
+ <?php
+ printf(
+ /* translators: %s: User's display name. */
+ __( 'Autosave by %s' ),
+ '<span class="author-name">{{ data.attributes.author.name }}</span>'
+ );
+ ?>
+ </span>
+ <# } else if ( data.attributes.current ) { #>
+ <span class="byline">
+ <?php
+ printf(
+ /* translators: %s: User's display name. */
+ __( 'Current Revision by %s' ),
+ '<span class="author-name">{{ data.attributes.author.name }}</span>'
+ );
+ ?>
+ </span>
+ <# } else { #>
+ <span class="byline">
+ <?php
+ printf(
+ /* translators: %s: User's display name. */
+ __( 'Revision by %s' ),
+ '<span class="author-name">{{ data.attributes.author.name }}</span>'
+ );
+ ?>
+ </span>
+ <# } #>
+ <span class="time-ago">{{ data.attributes.timeAgo }}</span>
+ <span class="date">({{ data.attributes.dateShort }})</span>
+ </div>
</div>
<# if ( 'to' === data.type && data.attributes.restoreUrl ) { #>
<input <?php if ( wp_check_post_lock( $post->ID ) ) { ?>
diff --git a/src/wp-admin/includes/taxonomy.php b/src/wp-admin/includes/taxonomy.php
index 7765084fa7..359cfafe2f 100644
--- a/src/wp-admin/includes/taxonomy.php
+++ b/src/wp-admin/includes/taxonomy.php
@@ -75,7 +75,7 @@ function wp_create_category( $cat_name, $category_parent = 0 ) {
* @param int $post_id Optional. The post ID. Default empty.
* @return int[] Array of IDs of categories assigned to the given post.
*/
-function wp_create_categories( $categories, $post_id = '' ) {
+function wp_create_categories( $categories, $post_id = 0 ) {
$cat_ids = array();
foreach ( $categories as $category ) {
$id = category_exists( $category );
diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php
index 127027d8f5..16da3388ae 100644
--- a/src/wp-admin/includes/template.php
+++ b/src/wp-admin/includes/template.php
@@ -817,9 +817,6 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
$tab_index_attribute = " tabindex=\"$tab_index\"";
}
- // @todo Remove this?
- // echo '<label for="timestamp" style="display: block;"><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> '.__( 'Edit timestamp' ).'</label><br />';
-
$post_date = ( $for_post ) ? $post->post_date : get_comment()->comment_date;
$jj = ( $edit ) ? mysql2date( 'd', $post_date, false ) : current_time( 'd' );
$mm = ( $edit ) ? mysql2date( 'm', $post_date, false ) : current_time( 'm' );
diff --git a/src/wp-admin/includes/update-core.php b/src/wp-admin/includes/update-core.php
index f1731f9c8f..2d925afa63 100644
--- a/src/wp-admin/includes/update-core.php
+++ b/src/wp-admin/includes/update-core.php
@@ -1023,6 +1023,7 @@ $_new_bundled_files = array(
* @global string[] $_old_requests_files
* @global string[] $_new_bundled_files
* @global wpdb $wpdb WordPress database abstraction object.
+ * @global string $wp_version The WordPress version string.
*
* @param string $from New release unzipped path.
* @param string $to Path to old WordPress installation.
diff --git a/src/wp-admin/nav-menus.php b/src/wp-admin/nav-menus.php
index 36905bab63..82c8e264ad 100644
--- a/src/wp-admin/nav-menus.php
+++ b/src/wp-admin/nav-menus.php
@@ -1083,7 +1083,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
$menu_name_aria_desc = $add_new_screen ? ' aria-describedby="menu-name-desc"' : '';
if ( $one_theme_location_no_menus ) {
- $menu_name_val = 'value="' . esc_attr( 'Menu 1' ) . '"';
+ $menu_name_val = 'value="' . esc_attr__( 'Menu 1' ) . '"';
?>
<input type="hidden" name="zero-menu-state" value="true" />
<?php
diff --git a/src/wp-admin/options-discussion.php b/src/wp-admin/options-discussion.php
index 6bb8ce2f54..e0e12dc21f 100644
--- a/src/wp-admin/options-discussion.php
+++ b/src/wp-admin/options-discussion.php
@@ -309,6 +309,8 @@ $avatar_defaults = array(
'monsterid' => __( 'MonsterID (Generated)' ),
'retro' => __( 'Retro (Generated)' ),
'robohash' => __( 'RoboHash (Generated)' ),
+ 'initials' => __( 'Initials (Generated)' ),
+ 'color' => __( 'Color (Generated)' ),
);
/**
* Filters the default avatars.
diff --git a/src/wp-admin/user-edit.php b/src/wp-admin/user-edit.php
index c476a294ad..6810425c77 100644
--- a/src/wp-admin/user-edit.php
+++ b/src/wp-admin/user-edit.php
@@ -333,11 +333,11 @@ switch ( $action ) {
<?php if ( count( $_wp_admin_css_colors ) > 1 && has_action( 'admin_color_scheme_picker' ) ) : ?>
<tr class="user-admin-color-wrap">
- <th scope="row"><?php _e( 'Admin Color Scheme' ); ?></th>
+ <th scope="row"><?php _e( 'Administration Color Scheme' ); ?></th>
<td>
<?php
/**
- * Fires in the 'Admin Color Scheme' section of the user editing screen.
+ * Fires in the 'Administration Color Scheme' section of the user editing screen.
*
* The section is only enabled if a callback is hooked to the action,
* and if there is more than one defined color scheme for the admin.
@@ -486,17 +486,35 @@ switch ( $action ) {
<tr class="user-first-name-wrap">
<th><label for="first_name"><?php _e( 'First Name' ); ?></label></th>
- <td><input type="text" name="first_name" id="first_name" value="<?php echo esc_attr( $profile_user->first_name ); ?>" class="regular-text" /></td>
+ <td>
+ <?php if ( IS_PROFILE_PAGE ) : ?>
+ <input type="text" name="first_name" id="first_name" value="<?php echo esc_attr( $profile_user->first_name ); ?>" autocomplete="given-name" class="regular-text" />
+ <?php else : ?>
+ <input type="text" name="first_name" id="first_name" value="<?php echo esc_attr( $profile_user->first_name ); ?>" class="regular-text" />
+ <?php endif; ?>
+ </td>
</tr>
<tr class="user-last-name-wrap">
<th><label for="last_name"><?php _e( 'Last Name' ); ?></label></th>
- <td><input type="text" name="last_name" id="last_name" value="<?php echo esc_attr( $profile_user->last_name ); ?>" class="regular-text" /></td>
+ <td>
+ <?php if ( IS_PROFILE_PAGE ) : ?>
+ <input type="text" name="last_name" id="last_name" value="<?php echo esc_attr( $profile_user->last_name ); ?>" autocomplete="family-name" class="regular-text" />
+ <?php else : ?>
+ <input type="text" name="last_name" id="last_name" value="<?php echo esc_attr( $profile_user->last_name ); ?>" class="regular-text" />
+ <?php endif; ?>
+ </td>
</tr>
<tr class="user-nickname-wrap">
<th><label for="nickname"><?php _e( 'Nickname' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
- <td><input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( $profile_user->nickname ); ?>" class="regular-text" /></td>
+ <td>
+ <?php if ( IS_PROFILE_PAGE ) : ?>
+ <input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( $profile_user->nickname ); ?>" autocomplete="nickname" class="regular-text" />
+ <?php else : ?>
+ <input type="text" name="nickname" id="nickname" value="<?php echo esc_attr( $profile_user->nickname ); ?>" class="regular-text" />
+ <?php endif; ?>
+ </td>
</tr>
<tr class="user-display-name-wrap">
@@ -546,7 +564,7 @@ switch ( $action ) {
<th><label for="email"><?php _e( 'Email' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
<td>
<?php if ( $profile_user->ID === $current_user->ID ) : ?>
- <input type="email" name="email" id="email" aria-describedby="email-description" value="<?php echo esc_attr( $profile_user->user_email ); ?>" class="regular-text ltr" />
+ <input type="email" name="email" id="email" aria-describedby="email-description" value="<?php echo esc_attr( $profile_user->user_email ); ?>" autocomplete="email" class="regular-text ltr" />
<p class="description" id="email-description">
<?php _e( 'If you change this, an email will be sent at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?>
</p>
diff --git a/src/wp-content/themes/twentyeleven/inc/block-patterns.php b/src/wp-content/themes/twentyeleven/inc/block-patterns.php
index bdb2619422..27b37be500 100644
--- a/src/wp-content/themes/twentyeleven/inc/block-patterns.php
+++ b/src/wp-content/themes/twentyeleven/inc/block-patterns.php
@@ -39,7 +39,7 @@ if ( function_exists( 'register_block_pattern' ) ) {
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} -->
- <figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/patterns/pattern-flower.jpg" alt="' . esc_attr( 'A yellow flower against a dark background.', 'twentyeleven' ) . '" /></figure>
+ <figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/patterns/pattern-flower.jpg" alt="' . esc_attr__( 'A yellow flower against a dark background.', 'twentyeleven' ) . '" /></figure>
<!-- /wp:image -->
<!-- wp:paragraph {"dropCap":true} -->
<p class="has-drop-cap">' . esc_html__( 'This is just an example post to showcase the featured post section on the showcase page. Who doesn&#8217;t like flowers? I like flowers. Nullam hendrerit enim nunc. Vestibulum eget nulla magna! Fusce lobortis neque eu neque egestas tincidunt. Duis elementum consequat lorem, in eleifend justo mollis at. Nam quis adipiscing magna. Duis adipiscing est ac nibh feugiat rhoncus. Donec non lorem felis, eget commodo purus.', 'twentyeleven' ) . '</p>
@@ -117,7 +117,7 @@ if ( function_exists( 'register_block_pattern' ) ) {
<!-- /wp:heading --><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} -->
- <figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/patterns/pattern-woman.jpg" alt="' . esc_attr( 'Photo of a woman.', 'twentyeleven' ) . '" /></figure>
+ <figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/patterns/pattern-woman.jpg" alt="' . esc_attr__( 'Photo of a woman.', 'twentyeleven' ) . '" /></figure>
<!-- /wp:image --></div>
<!-- /wp:column -->
<!-- wp:column -->
diff --git a/src/wp-content/themes/twentyfourteen/inc/block-patterns.php b/src/wp-content/themes/twentyfourteen/inc/block-patterns.php
index ac40532cfb..b3bc376192 100644
--- a/src/wp-content/themes/twentyfourteen/inc/block-patterns.php
+++ b/src/wp-content/themes/twentyfourteen/inc/block-patterns.php
@@ -55,7 +55,7 @@ if ( function_exists( 'register_block_pattern' ) ) {
'title' => esc_html__( 'Summary', 'twentyfourteen' ),
'categories' => array( 'twentyfourteen' ),
'viewportWidth' => 1000,
- 'content' => '<!-- wp:group {"backgroundColor":"light-gray"} --><div class="wp-block-group has-light-gray-background-color has-background"><div class="wp-block-group__inner-container"><!-- wp:spacer {"height":50} --><div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div><!-- /wp:spacer --><!-- wp:heading {"level":3,"style":{"typography":{"lineHeight":"1.5"}}} --><h3 style="line-height:1.5">' . esc_html__( 'Traveling Nostalgia', 'twentyfourteen' ) . '</h3><!-- /wp:heading --><!-- wp:paragraph --><p><em>' . esc_html__( 'Here are some photos from my all-time favorite destinations.', 'twentyfourteen' ) . '</em></p><!-- /wp:paragraph --><!-- wp:columns --><div class="wp-block-columns"><!-- wp:column --><div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/sunset.jpg" alt="' . esc_html__( 'Photo of a sunset', 'twentyfourteen' ) . '"/><figcaption><span class="has-inline-color has-dark-gray-color">' . esc_html__( 'Sunset', 'twentyfourteen' ) . '</span></figcaption></figure><!-- /wp:image --><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/bridge.jpg" alt="' . esc_attr__( 'Photo of a bridge', 'twentyfourteen' ) . '"/><figcaption><span class="has-inline-color has-dark-gray-color">' . esc_html__( 'Bridge', 'twentyfourteen' ) . '</span></figcaption></figure><!-- /wp:image --></div><!-- /wp:column --><!-- wp:column --><div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/street.jpg" alt="' . esc_attr__( 'Photo of a streetscape', 'twentyfourteen' ) . '"/><figcaption><span class="has-inline-color has-dark-gray-color">' . esc_html__( 'Streetscape', 'twentyfourteen' ) . '</span></figcaption></figure><!-- /wp:image --><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/clouds.jpg" alt="' . esc_attr__( 'Photo of a cloudy mountain', 'twentyfourteen' ) . '"/><figcaption><span class="has-inline-color has-dark-gray-color">' . esc_html__( 'Clouds', 'twentyfourteen' ) . '</span></figcaption></figure><!-- /wp:image --></div><!-- /wp:column --></div><!-- /wp:columns --><!-- wp:buttons --><div class="wp-block-buttons"><!-- wp:button {"borderRadius":0,"backgroundColor":"dark-gray"} --><div class="wp-block-button"><a class="wp-block-button__link has-dark-gray-background-color has-background no-border-radius">' . esc_html__( 'Read More', 'twentyfourteen' ) . '</a></div><!-- /wp:button --></div><!-- /wp:buttons --><!-- wp:spacer {"height":50} --><div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div><!-- /wp:spacer --></div></div><!-- /wp:group -->',
+ 'content' => '<!-- wp:group {"backgroundColor":"light-gray"} --><div class="wp-block-group has-light-gray-background-color has-background"><div class="wp-block-group__inner-container"><!-- wp:spacer {"height":50} --><div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div><!-- /wp:spacer --><!-- wp:heading {"level":3,"style":{"typography":{"lineHeight":"1.5"}}} --><h3 style="line-height:1.5">' . esc_html__( 'Traveling Nostalgia', 'twentyfourteen' ) . '</h3><!-- /wp:heading --><!-- wp:paragraph --><p><em>' . esc_html__( 'Here are some photos from my all-time favorite destinations.', 'twentyfourteen' ) . '</em></p><!-- /wp:paragraph --><!-- wp:columns --><div class="wp-block-columns"><!-- wp:column --><div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/sunset.jpg" alt="' . esc_attr__( 'Photo of a sunset', 'twentyfourteen' ) . '"/><figcaption><span class="has-inline-color has-dark-gray-color">' . esc_html__( 'Sunset', 'twentyfourteen' ) . '</span></figcaption></figure><!-- /wp:image --><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/bridge.jpg" alt="' . esc_attr__( 'Photo of a bridge', 'twentyfourteen' ) . '"/><figcaption><span class="has-inline-color has-dark-gray-color">' . esc_html__( 'Bridge', 'twentyfourteen' ) . '</span></figcaption></figure><!-- /wp:image --></div><!-- /wp:column --><!-- wp:column --><div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/street.jpg" alt="' . esc_attr__( 'Photo of a streetscape', 'twentyfourteen' ) . '"/><figcaption><span class="has-inline-color has-dark-gray-color">' . esc_html__( 'Streetscape', 'twentyfourteen' ) . '</span></figcaption></figure><!-- /wp:image --><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/images/clouds.jpg" alt="' . esc_attr__( 'Photo of a cloudy mountain', 'twentyfourteen' ) . '"/><figcaption><span class="has-inline-color has-dark-gray-color">' . esc_html__( 'Clouds', 'twentyfourteen' ) . '</span></figcaption></figure><!-- /wp:image --></div><!-- /wp:column --></div><!-- /wp:columns --><!-- wp:buttons --><div class="wp-block-buttons"><!-- wp:button {"borderRadius":0,"backgroundColor":"dark-gray"} --><div class="wp-block-button"><a class="wp-block-button__link has-dark-gray-background-color has-background no-border-radius">' . esc_html__( 'Read More', 'twentyfourteen' ) . '</a></div><!-- /wp:button --></div><!-- /wp:buttons --><!-- wp:spacer {"height":50} --><div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div><!-- /wp:spacer --></div></div><!-- /wp:group -->',
)
);
diff --git a/src/wp-content/themes/twentynineteen/inc/block-patterns.php b/src/wp-content/themes/twentynineteen/inc/block-patterns.php
index 1615495a6f..63154c6d0a 100644
--- a/src/wp-content/themes/twentynineteen/inc/block-patterns.php
+++ b/src/wp-content/themes/twentynineteen/inc/block-patterns.php
@@ -100,34 +100,34 @@ if ( function_exists( 'register_block_pattern' ) ) {
'<!-- wp:columns {"className":"has-2-columns"} -->',
'<div class="wp-block-columns has-2-columns"><!-- wp:column -->',
'<div class="wp-block-column"><!-- wp:media-text {"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/images/pattern_01.jpg","mediaType":"image","mediaWidth":10,"isStackedOnMobile":false} -->',
- '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_01.jpg" alt="' . esc_html__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
+ '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_01.jpg" alt="' . esc_attr__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
'<p>' . esc_html__( 'Website Design', 'twentynineteen' ) . '</p>',
'<!-- /wp:paragraph --></div></div>',
'<!-- /wp:media-text -->',
'<!-- wp:media-text {"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/images/pattern_02.jpg","mediaType":"image","mediaWidth":10,"isStackedOnMobile":false} -->',
- '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_02.jpg" alt="' . esc_html__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
+ '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_02.jpg" alt="' . esc_attr__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
'<p>' . esc_html__( 'Mobile', 'twentynineteen' ) . '</p>',
'<!-- /wp:paragraph --></div></div>',
'<!-- /wp:media-text -->',
'<!-- wp:media-text {"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/images/pattern_03.jpg","mediaType":"image","mediaWidth":10,"isStackedOnMobile":false} -->',
- '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_03.jpg" alt="' . esc_html__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
+ '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_03.jpg" alt="' . esc_attr__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
'<p>' . esc_html__( 'Social Media', 'twentynineteen' ) . '</p>',
'<!-- /wp:paragraph --></div></div>',
'<!-- /wp:media-text --></div>',
'<!-- /wp:column -->',
'<!-- wp:column -->',
'<div class="wp-block-column"><!-- wp:media-text {"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/images/pattern_03.jpg","mediaType":"image","mediaWidth":10,"isStackedOnMobile":false} -->',
- '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_03.jpg" alt="' . esc_html__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
+ '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_03.jpg" alt="' . esc_attr__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
'<p>' . esc_html__( 'Marketing', 'twentynineteen' ) . '</p>',
'<!-- /wp:paragraph --></div></div>',
'<!-- /wp:media-text -->',
'<!-- wp:media-text {"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/images/pattern_04.jpg","mediaType":"image","mediaWidth":10,"isStackedOnMobile":false} -->',
- '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_04.jpg" alt="' . esc_html__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
+ '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_04.jpg" alt="' . esc_attr__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
'<p>' . esc_html__( 'Copywriting', 'twentynineteen' ) . '</p>',
'<!-- /wp:paragraph --></div></div>',
'<!-- /wp:media-text -->',
'<!-- wp:media-text {"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/images/pattern_01.jpg","mediaType":"image","mediaWidth":10,"isStackedOnMobile":false} -->',
- '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_01.jpg" alt="' . esc_html__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
+ '<div class="wp-block-media-text alignwide" style="grid-template-columns:10% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_01.jpg" alt="' . esc_attr__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->',
'<p>' . esc_html__( 'Content Strategy', 'twentynineteen' ) . '</p>',
'<!-- /wp:paragraph --></div></div>',
'<!-- /wp:media-text --></div>',
@@ -152,7 +152,7 @@ if ( function_exists( 'register_block_pattern' ) ) {
'<h2>' . esc_html__( 'Team', 'twentynineteen' ) . '</h2>',
'<!-- /wp:heading -->',
'<!-- wp:media-text {"mediaType":"image","mediaWidth":28,"imageFill":true} -->',
- '<div class="wp-block-media-text alignwide is-stacked-on-mobile is-image-fill" style="grid-template-columns:28% auto"><figure class="wp-block-media-text__media" style="background-image:url(' . esc_url( get_template_directory_uri() ) . '/images/pattern_01.jpg);background-position:50% 50%"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_01.jpg" alt="' . esc_html__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:heading {"level":3} -->',
+ '<div class="wp-block-media-text alignwide is-stacked-on-mobile is-image-fill" style="grid-template-columns:28% auto"><figure class="wp-block-media-text__media" style="background-image:url(' . esc_url( get_template_directory_uri() ) . '/images/pattern_01.jpg);background-position:50% 50%"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_01.jpg" alt="' . esc_attr__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:heading {"level":3} -->',
'<h3>' . esc_html__( 'Eva Young', 'twentynineteen' ) . '</h3>',
'<!-- /wp:heading -->',
'<!-- wp:paragraph -->',
@@ -160,7 +160,7 @@ if ( function_exists( 'register_block_pattern' ) ) {
'<!-- /wp:paragraph --></div></div>',
'<!-- /wp:media-text -->',
'<!-- wp:media-text {"mediaType":"image","mediaWidth":28,"imageFill":true} -->',
- '<div class="wp-block-media-text alignwide is-stacked-on-mobile is-image-fill" style="grid-template-columns:28% auto"><figure class="wp-block-media-text__media" style="background-image:url(' . esc_url( get_template_directory_uri() ) . '/images/pattern_02.jpg);background-position:50% 50%"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_02.jpg" alt="' . esc_html__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:heading {"level":3} -->',
+ '<div class="wp-block-media-text alignwide is-stacked-on-mobile is-image-fill" style="grid-template-columns:28% auto"><figure class="wp-block-media-text__media" style="background-image:url(' . esc_url( get_template_directory_uri() ) . '/images/pattern_02.jpg);background-position:50% 50%"><img src="' . esc_url( get_template_directory_uri() ) . '/images/pattern_02.jpg" alt="' . esc_attr__( 'Gradient', 'twentynineteen' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:heading {"level":3} -->',
'<h3>' . esc_html__( 'Doug Watson', 'twentynineteen' ) . '</h3>',
'<!-- /wp:heading -->',
'<!-- wp:paragraph -->',
diff --git a/src/wp-content/themes/twentyseventeen/inc/block-patterns.php b/src/wp-content/themes/twentyseventeen/inc/block-patterns.php
index f013aa9a54..e924ce7e29 100644
--- a/src/wp-content/themes/twentyseventeen/inc/block-patterns.php
+++ b/src/wp-content/themes/twentyseventeen/inc/block-patterns.php
@@ -14,7 +14,7 @@ if ( function_exists( 'register_block_pattern_category' ) ) {
register_block_pattern_category(
'twentyseventeen',
- array( 'label' => __( 'Twenty Seventeen', 'twentyseventeen' ) )
+ array( 'label' => esc_html__( 'Twenty Seventeen', 'twentyseventeen' ) )
);
}
@@ -25,15 +25,15 @@ if ( function_exists( 'register_block_pattern' ) ) {
register_block_pattern(
'twentyseventeen/large-heading-with-button',
array(
- 'title' => __( 'Large Heading with Button', 'twentyseventeen' ),
+ 'title' => esc_html__( 'Large Heading with Button', 'twentyseventeen' ),
'categories' => array( 'twentyseventeen' ),
'content' => '<!-- wp:heading {"level":1,"textColor":"black","style":{"typography":{"fontSize":50}}} -->
- <h1 class="has-black-color has-text-color" style="font-size:50px">' . __( 'Attract Leads with Marketing Campaigns that Work', 'twentyseventeen' ) . '</h1>
+ <h1 class="has-black-color has-text-color" style="font-size:50px">' . esc_html__( 'Attract Leads with Marketing Campaigns that Work', 'twentyseventeen' ) . '</h1>
<!-- /wp:heading -->
<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button {"borderRadius":0,"className":"is-style-fill"} -->
- <div class="wp-block-button is-style-fill"><a class="wp-block-button__link no-border-radius">' . __( 'Our Services', 'twentyseventeen' ) . '</a></div>
+ <div class="wp-block-button is-style-fill"><a class="wp-block-button__link no-border-radius">' . esc_html__( 'Our Services', 'twentyseventeen' ) . '</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->',
)
@@ -42,7 +42,7 @@ if ( function_exists( 'register_block_pattern' ) ) {
register_block_pattern(
'twentyseventeen/images-with-text-and-link',
array(
- 'title' => __( 'Images with Text and Link', 'twentyseventeen' ),
+ 'title' => esc_html__( 'Images with Text and Link', 'twentyseventeen' ),
'categories' => array( 'twentyseventeen' ),
'content' => '<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
@@ -51,16 +51,16 @@ if ( function_exists( 'register_block_pattern' ) ) {
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column">
<!-- wp:image {"className":"size-large"} -->
- <figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/stripes.jpg" alt="' . __( 'Black Stripes', 'twentyseventeen' ) . '"/></figure>
+ <figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/stripes.jpg" alt="' . esc_attr__( 'Black Stripes', 'twentyseventeen' ) . '"/></figure>
<!-- /wp:image -->
<!-- wp:heading {"textColor":"black","style":{"typography":{"fontSize":45}}} -->
- <h2 class="has-black-color has-text-color" style="font-size:45px">' . __( 'Branding', 'twentyseventeen' ) . '</h2>
+ <h2 class="has-black-color has-text-color" style="font-size:45px">' . esc_html__( 'Branding', 'twentyseventeen' ) . '</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"textColor":"black","style":{"typography":{"lineHeight":"1.8"}}} -->
- <p class="has-black-color has-text-color" style="line-height:1.8">' . __( 'Communicate your purpose and goals with a beautiful logo that encapsulates your business.', 'twentyseventeen' ) . '</p>
+ <p class="has-black-color has-text-color" style="line-height:1.8">' . esc_html__( 'Communicate your purpose and goals with a beautiful logo that encapsulates your business.', 'twentyseventeen' ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"style":{"typography":{"lineHeight":"3"}}} -->
- <p style="line-height:3"><a href="#"><strong>' . __( 'See Case Study', 'twentyseventeen' ) . ' →</strong></a></p>
+ <p style="line-height:3"><a href="#"><strong>' . esc_html__( 'See Case Study', 'twentyseventeen' ) . ' →</strong></a></p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column -->
@@ -68,16 +68,16 @@ if ( function_exists( 'register_block_pattern' ) ) {
<div style="height:254px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- wp:image {"className":"size-large"} -->
- <figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/white-border.jpg" alt="' . __( 'White border', 'twentyseventeen' ) . '"/></figure>
+ <figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/white-border.jpg" alt="' . esc_attr__( 'White border', 'twentyseventeen' ) . '"/></figure>
<!-- /wp:image -->
<!-- wp:heading {"textColor":"black","style":{"typography":{"fontSize":45}}} -->
- <h2 class="has-black-color has-text-color" style="font-size:45px">' . __( 'Web Design', 'twentyseventeen' ) . '</h2>
+ <h2 class="has-black-color has-text-color" style="font-size:45px">' . esc_html__( 'Web Design', 'twentyseventeen' ) . '</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"textColor":"black","style":{"typography":{"lineHeight":"1.8"}}} -->
- <p class="has-black-color has-text-color" style="line-height:1.8">' . __( 'Need a website? We&#39;ve got you covered. Our design team will create a stunning design to transform your brand.', 'twentyseventeen' ) . '</p>
+ <p class="has-black-color has-text-color" style="line-height:1.8">' . esc_html__( 'Need a website? We&#39;ve got you covered. Our design team will create a stunning design to transform your brand.', 'twentyseventeen' ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"style":{"typography":{"lineHeight":"3.0"}}} -->
- <p style="line-height:3.0"><a href="#"><strong>' . __( 'See Case Study', 'twentyseventeen' ) . ' →</strong></a></p>
+ <p style="line-height:3.0"><a href="#"><strong>' . esc_html__( 'See Case Study', 'twentyseventeen' ) . ' →</strong></a></p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->',
@@ -87,7 +87,7 @@ if ( function_exists( 'register_block_pattern' ) ) {
register_block_pattern(
'twentyseventeen/images-with-link',
array(
- 'title' => __( 'Images with Link', 'twentyseventeen' ),
+ 'title' => esc_html__( 'Images with Link', 'twentyseventeen' ),
'categories' => array( 'twentyseventeen' ),
'content' => '<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
@@ -97,13 +97,13 @@ if ( function_exists( 'register_block_pattern' ) ) {
<div class="wp-block-column"><!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container">
<!-- wp:image {"align":"center","sizeSlug":"large","className":"is-style-default"} -->
- <div class="wp-block-image is-style-default"><figure class="aligncenter size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/stripes.jpg" alt="' . __( 'Black Stripes', 'twentyseventeen' ) . '"/></figure></div>
+ <div class="wp-block-image is-style-default"><figure class="aligncenter size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/stripes.jpg" alt="' . esc_attr__( 'Black Stripes', 'twentyseventeen' ) . '"/></figure></div>
<!-- /wp:image -->
<!-- wp:heading {"align":"left","textColor":"black","style":{"typography":{"fontSize":30}}} -->
- <h2 class="has-text-align-left has-black-color has-text-color" style="font-size:30px">' . __( 'Branding', 'twentyseventeen' ) . '</h2>
+ <h2 class="has-text-align-left has-black-color has-text-color" style="font-size:30px">' . esc_html__( 'Branding', 'twentyseventeen' ) . '</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"align":"left"} -->
- <p class="has-text-align-left"><a href="#">' . __( 'See Case Study', 'twentyseventeen' ) . ' →</a></p>
+ <p class="has-text-align-left"><a href="#">' . esc_html__( 'See Case Study', 'twentyseventeen' ) . ' →</a></p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:group --></div>
<!-- /wp:column -->
@@ -111,13 +111,13 @@ if ( function_exists( 'register_block_pattern' ) ) {
<div class="wp-block-column"><!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container">
<!-- wp:image {"align":"center","sizeSlug":"large","className":"is-style-default"} -->
- <div class="wp-block-image is-style-default"><figure class="aligncenter size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/white-border.jpg" alt="' . __( 'White border', 'twentyseventeen' ) . '"/></figure></div>
+ <div class="wp-block-image is-style-default"><figure class="aligncenter size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/white-border.jpg" alt="' . esc_attr__( 'White border', 'twentyseventeen' ) . '"/></figure></div>
<!-- /wp:image -->
<!-- wp:heading {"align":"left","textColor":"black","style":{"typography":{"fontSize":30}}} -->
- <h2 class="has-text-align-left has-black-color has-text-color" style="font-size:30px">' . __( 'Design', 'twentyseventeen' ) . '</h2>
+ <h2 class="has-text-align-left has-black-color has-text-color" style="font-size:30px">' . esc_html__( 'Design', 'twentyseventeen' ) . '</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"align":"left"} -->
- <p class="has-text-align-left"><a href="#">' . __( 'See Case Study', 'twentyseventeen' ) . ' →</a></p>
+ <p class="has-text-align-left"><a href="#">' . esc_html__( 'See Case Study', 'twentyseventeen' ) . ' →</a></p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:group --></div>
<!-- /wp:column -->
@@ -125,13 +125,13 @@ if ( function_exists( 'register_block_pattern' ) ) {
<div class="wp-block-column"><!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container">
<!-- wp:image {"align":"center","sizeSlug":"large","className":"is-style-default"} -->
- <div class="wp-block-image is-style-default"><figure class="aligncenter size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/direct-light.jpg" alt="' . __( 'Direct Light', 'twentyseventeen' ) . '"/></figure></div>
+ <div class="wp-block-image is-style-default"><figure class="aligncenter size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/direct-light.jpg" alt="' . esc_attr__( 'Direct Light', 'twentyseventeen' ) . '"/></figure></div>
<!-- /wp:image -->
<!-- wp:heading {"align":"left","textColor":"black","style":{"typography":{"fontSize":30}}} -->
- <h2 class="has-text-align-left has-black-color has-text-color" style="font-size:30px">' . __( 'Strategy', 'twentyseventeen' ) . '</h2>
+ <h2 class="has-text-align-left has-black-color has-text-color" style="font-size:30px">' . esc_html__( 'Strategy', 'twentyseventeen' ) . '</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"align":"left"} -->
- <p class="has-text-align-left"><a href="#">' . __( 'See Case Study', 'twentyseventeen' ) . ' →</a></p>
+ <p class="has-text-align-left"><a href="#">' . esc_html__( 'See Case Study', 'twentyseventeen' ) . ' →</a></p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:group --></div>
<!-- /wp:column --></div>
@@ -145,21 +145,21 @@ if ( function_exists( 'register_block_pattern' ) ) {
register_block_pattern(
'twentyseventeen/services',
array(
- 'title' => __( 'Services', 'twentyseventeen' ),
+ 'title' => esc_html__( 'Services', 'twentyseventeen' ),
'categories' => array( 'twentyseventeen' ),
'content' => '<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- wp:heading {"level":1,"style":{"typography":{"fontSize":50}}} -->
- <h1 style="font-size:50px">' . __( 'Our Services', 'twentyseventeen' ) . '</h1>
+ <h1 style="font-size:50px">' . esc_html__( 'Our Services', 'twentyseventeen' ) . '</h1>
<!-- /wp:heading -->
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column">
<!-- wp:paragraph {"style":{"typography":{"fontSize":21, "lineHeight":"2.5"}}} -->
- <p style="font-size:21px"><a href="#">' . __( 'Branding', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Web Design', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Web Development', 'twentyseventeen' ) . ' →</a></p>
+ <p style="font-size:21px"><a href="#">' . esc_html__( 'Branding', 'twentyseventeen' ) . ' →</a><br><a href="#">' . esc_html__( 'Web Design', 'twentyseventeen' ) . ' →</a><br><a href="#">' . esc_html__( 'Web Development', 'twentyseventeen' ) . ' →</a></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
@@ -167,7 +167,7 @@ if ( function_exists( 'register_block_pattern' ) ) {
<!-- wp:column -->
<div class="wp-block-column">
<!-- wp:paragraph {"style":{"typography":{"fontSize":21, "lineHeight":"2.5"}}} -->
- <p style="font-size:21px"><a href="#">' . __( 'Content Strategy', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Marketing &amp; SEO', 'twentyseventeen' ) . ' →</a><br><a href="#">' . __( 'Video Production', 'twentyseventeen' ) . ' →</a></p>
+ <p style="font-size:21px"><a href="#">' . esc_html__( 'Content Strategy', 'twentyseventeen' ) . ' →</a><br><a href="#">' . esc_html__( 'Marketing &amp; SEO', 'twentyseventeen' ) . ' →</a><br><a href="#">' . esc_html__( 'Video Production', 'twentyseventeen' ) . ' →</a></p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
@@ -181,16 +181,16 @@ if ( function_exists( 'register_block_pattern' ) ) {
register_block_pattern(
'twentyseventeen/contact-us',
array(
- 'title' => __( 'Contact Us', 'twentyseventeen' ),
+ 'title' => esc_html__( 'Contact Us', 'twentyseventeen' ),
'categories' => array( 'twentyseventeen' ),
'content' => '<!-- wp:cover {"customOverlayColor":"#93aab8","minHeight":700,"align":"center"} -->
<div class="wp-block-cover aligncenter has-background-dim" style="background-color:#93aab8;min-height:700px"><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"left","textColor":"white","style":{"typography":{"fontSize":50}}} -->
- <p class="has-text-align-left has-white-color has-text-color" style="font-size:50px">' . __( 'We are proud to serve outstanding clients.', 'twentyseventeen' ) . '</p>
+ <p class="has-text-align-left has-white-color has-text-color" style="font-size:50px">' . esc_html__( 'We are proud to serve outstanding clients.', 'twentyseventeen' ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button {"borderRadius":0,"backgroundColor":"black","textColor":"white","className":"is-style-fill"} -->
- <div class="wp-block-button is-style-fill"><a class="wp-block-button__link has-white-color has-black-background-color has-text-color has-background no-border-radius">' . __( 'Contact us', 'twentyseventeen' ) . '</a></div>
+ <div class="wp-block-button is-style-fill"><a class="wp-block-button__link has-white-color has-black-background-color has-text-color has-background no-border-radius">' . esc_html__( 'Contact us', 'twentyseventeen' ) . '</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div></div>
<!-- /wp:cover -->',
diff --git a/src/wp-content/themes/twentytwenty/assets/js/index.js b/src/wp-content/themes/twentytwenty/assets/js/index.js
index 258658a97e..35efcd6b60 100644
--- a/src/wp-content/themes/twentytwenty/assets/js/index.js
+++ b/src/wp-content/themes/twentytwenty/assets/js/index.js
@@ -257,7 +257,10 @@ twentytwenty.coverModals = {
clickedEl = false;
}
- _win.scrollTo( 0, Math.abs( _win.twentytwenty.scrolled + getAdminBarHeight() ) );
+ _win.scrollTo({
+ top: Math.abs( _win.twentytwenty.scrolled + getAdminBarHeight() ),
+ behavior: 'instant'
+ });
_win.twentytwenty.scrolled = 0;
}, 500 );
diff --git a/src/wp-includes/block-template.php b/src/wp-includes/block-template.php
index affae1c09a..eecbe2d61d 100644
--- a/src/wp-includes/block-template.php
+++ b/src/wp-includes/block-template.php
@@ -253,7 +253,7 @@ function get_the_block_template_html() {
if ( is_user_logged_in() ) {
return '<h1>' . esc_html__( 'No matching template found' ) . '</h1>';
}
- return;
+ return '';
}
$content = $wp_embed->run_shortcode( $_wp_current_template_content );
diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php
index 0525ae792a..b2c88c9c25 100644
--- a/src/wp-includes/category-template.php
+++ b/src/wp-includes/category-template.php
@@ -71,7 +71,7 @@ function get_category_parents( $category_id, $link = false, $separator = '/', $n
*
* @since 0.71
*
- * @param int $post_id Optional. The post ID. Defaults to current post ID.
+ * @param int|false $post_id Optional. The post ID. Defaults to current post ID.
* @return WP_Term[] Array of WP_Term objects, one for each category assigned to the post.
*/
function get_the_category( $post_id = false ) {
@@ -131,11 +131,11 @@ function get_the_category_by_ID( $cat_id ) { // phpcs:ignore WordPress.NamingCon
*
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
- * @param string $separator Optional. Separator between the categories. By default, the links are placed
- * in an unordered list. An empty string will result in the default behavior.
- * @param string $parents Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
- * Default empty string.
- * @param int $post_id Optional. ID of the post to retrieve categories for. Defaults to the current post.
+ * @param string $separator Optional. Separator between the categories. By default, the links are placed
+ * in an unordered list. An empty string will result in the default behavior.
+ * @param string $parents Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
+ * Default empty string.
+ * @param int|false $post_id Optional. ID of the post to retrieve categories for. Defaults to the current post.
* @return string Category list for a post.
*/
function get_the_category_list( $separator = '', $parents = '', $post_id = false ) {
@@ -251,7 +251,7 @@ function get_the_category_list( $separator = '', $parents = '', $post_id = false
*
* @param int|string|int[]|string[] $category Category ID, name, slug, or array of such
* to check against.
- * @param int|WP_Post $post Optional. Post to check. Defaults to the current post.
+ * @param int|null|WP_Post $post Optional. Post to check. Defaults to the current post.
* @return bool True if the current post is in any of the given categories.
*/
function in_category( $category, $post = null ) {
@@ -267,11 +267,11 @@ function in_category( $category, $post = null ) {
*
* @since 0.71
*
- * @param string $separator Optional. Separator between the categories. By default, the links are placed
- * in an unordered list. An empty string will result in the default behavior.
- * @param string $parents Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
- * Default empty string.
- * @param int $post_id Optional. ID of the post to retrieve categories for. Defaults to the current post.
+ * @param string $separator Optional. Separator between the categories. By default, the links are placed
+ * in an unordered list. An empty string will result in the default behavior.
+ * @param string $parents Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
+ * Default empty string.
+ * @param int|false $post_id Optional. ID of the post to retrieve categories for. Defaults to the current post.
*/
function the_category( $separator = '', $parents = '', $post_id = false ) {
echo get_the_category_list( $separator, $parents, $post_id );
@@ -793,7 +793,7 @@ function wp_tag_cloud( $args = '' ) {
* @return int Scaled count.
*/
function default_topic_count_scale( $count ) {
- return round( log10( $count + 1 ) * 100 );
+ return (int) round( log10( $count + 1 ) * 100 );
}
/**
diff --git a/src/wp-includes/class-wp-block-pattern-categories-registry.php b/src/wp-includes/class-wp-block-pattern-categories-registry.php
index 3d37a5940a..2d5fbcf2fe 100644
--- a/src/wp-includes/class-wp-block-pattern-categories-registry.php
+++ b/src/wp-includes/class-wp-block-pattern-categories-registry.php
@@ -107,7 +107,7 @@ final class WP_Block_Pattern_Categories_Registry {
* @since 5.5.0
*
* @param string $category_name Pattern category name including namespace.
- * @return array Registered pattern properties.
+ * @return array|null Registered pattern properties, or `null` if the pattern category is not registered.
*/
public function get_registered( $category_name ) {
if ( ! $this->is_registered( $category_name ) ) {
diff --git a/src/wp-includes/class-wp-block-patterns-registry.php b/src/wp-includes/class-wp-block-patterns-registry.php
index 3b5f053bfd..2afa8a853f 100644
--- a/src/wp-includes/class-wp-block-patterns-registry.php
+++ b/src/wp-includes/class-wp-block-patterns-registry.php
@@ -188,7 +188,7 @@ final class WP_Block_Patterns_Registry {
* @since 5.5.0
*
* @param string $pattern_name Block pattern name including namespace.
- * @return array Registered pattern properties.
+ * @return array|null Registered pattern properties or `null` if the pattern is not registered.
*/
public function get_registered( $pattern_name ) {
if ( ! $this->is_registered( $pattern_name ) ) {
diff --git a/src/wp-includes/class-wp-block-styles-registry.php b/src/wp-includes/class-wp-block-styles-registry.php
index 9a990173b4..8fb5e2eb23 100644
--- a/src/wp-includes/class-wp-block-styles-registry.php
+++ b/src/wp-includes/class-wp-block-styles-registry.php
@@ -140,7 +140,7 @@ final class WP_Block_Styles_Registry {
*
* @param string $block_name Block type name including namespace.
* @param string $block_style_name Block style name.
- * @return array Registered block style properties.
+ * @return array|null Registered block style properties or `null` if the block style is not registered.
*/
public function get_registered( $block_name, $block_style_name ) {
if ( ! $this->is_registered( $block_name, $block_style_name ) ) {
diff --git a/src/wp-includes/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php
index 3db46ad088..2a7915224b 100644
--- a/src/wp-includes/class-wp-customize-widgets.php
+++ b/src/wp-includes/class-wp-customize-widgets.php
@@ -921,10 +921,12 @@ final class WP_Customize_Widgets {
</button>
<h3>
<span class="customize-action">
- <?php
+ <?php
+ $panel = $this->manager->get_panel( 'widgets' );
+ $panel_title = $panel && isset( $panel->title ) ? $panel->title : __( 'Widgets' );
/* translators: &#9656; is the unicode right-pointing triangle. %s: Section title in the Customizer. */
- printf( __( 'Customizing &#9656; %s' ), esc_html( $this->manager->get_panel( 'widgets' )->title ) );
- ?>
+ printf( __( 'Customizing &#9656; %s' ), esc_html( $panel_title ) );
+ ?>
</span>
<?php _e( 'Add a Widget' ); ?>
</h3>
diff --git a/src/wp-includes/class-wp-image-editor-imagick.php b/src/wp-includes/class-wp-image-editor-imagick.php
index 66085ac503..2e7c7039d5 100644
--- a/src/wp-includes/class-wp-image-editor-imagick.php
+++ b/src/wp-includes/class-wp-image-editor-imagick.php
@@ -484,37 +484,28 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
$this->image->setOption( 'png:compression-filter', '5' );
$this->image->setOption( 'png:compression-level', '9' );
$this->image->setOption( 'png:compression-strategy', '1' );
- // Check to see if a PNG is indexed, and find the pixel depth.
- if ( is_callable( array( $this->image, 'getImageDepth' ) ) ) {
- $indexed_pixel_depth = $this->image->getImageDepth();
-
- // Indexed PNG files get some additional handling.
- if ( 0 < $indexed_pixel_depth && 8 >= $indexed_pixel_depth ) {
- // Check for an alpha channel.
- if (
- is_callable( array( $this->image, 'getImageAlphaChannel' ) )
- && $this->image->getImageAlphaChannel()
- ) {
- $this->image->setOption( 'png:include-chunk', 'tRNS' );
- } else {
- $this->image->setOption( 'png:exclude-chunk', 'all' );
- }
-
- // Reduce colors in the images to maximum needed, using the global colorspace.
- $max_colors = pow( 2, $indexed_pixel_depth );
- if ( is_callable( array( $this->image, 'getImageColors' ) ) ) {
- $current_colors = $this->image->getImageColors();
- $max_colors = min( $max_colors, $current_colors );
- }
- $this->image->quantizeImage( $max_colors, $this->image->getColorspace(), 0, false, false );
-
- /**
- * If the colorspace is 'gray', use the png8 format to ensure it stays indexed.
- */
- if ( Imagick::COLORSPACE_GRAY === $this->image->getImageColorspace() ) {
- $this->image->setOption( 'png:format', 'png8' );
- }
+
+ // Indexed PNG files get some additional handling.
+ // See #63448 for details.
+ if (
+ is_callable( array( $this->image, 'getImageProperty' ) )
+ && '3' === $this->image->getImageProperty( 'png:IHDR.color-type-orig' )
+ ) {
+
+ // Check for an alpha channel.
+ if (
+ is_callable( array( $this->image, 'getImageAlphaChannel' ) )
+ && $this->image->getImageAlphaChannel()
+ ) {
+ $this->image->setOption( 'png:include-chunk', 'tRNS' );
+ } else {
+ $this->image->setOption( 'png:exclude-chunk', 'all' );
}
+ // Set the image format to Indexed PNG.
+ $this->image->setOption( 'png:format', 'png8' );
+
+ } else {
+ $this->image->setOption( 'png:exclude-chunk', 'all' );
}
}
diff --git a/src/wp-includes/class-wpdb.php b/src/wp-includes/class-wpdb.php
index c6e6099c26..47f291fcb3 100644
--- a/src/wp-includes/class-wpdb.php
+++ b/src/wp-includes/class-wpdb.php
@@ -2866,8 +2866,12 @@ class wpdb {
* @return array {
* Array of values and formats keyed by their field names.
*
- * @type mixed $value The value to be formatted.
- * @type string $format The format to be mapped to the value.
+ * @type array ...$0 {
+ * Value and format for this field.
+ *
+ * @type mixed $value The value to be formatted.
+ * @type string $format The format to be mapped to the value.
+ * }
* }
*/
protected function process_field_formats( $data, $format ) {
diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php
index 9190cf6eff..cd41d4b200 100644
--- a/src/wp-includes/comment-template.php
+++ b/src/wp-includes/comment-template.php
@@ -2095,8 +2095,8 @@ function comment_id_fields( $post = null ) {
*
* Only affects users with JavaScript disabled.
*
- * @internal The $comment global must be present to allow template tags access to the current
- * comment. See https://core.trac.wordpress.org/changeset/36512.
+ * {@internal The $comment global must be present to allow template tags access to the current
+ * comment. See https://core.trac.wordpress.org/changeset/36512.}
*
* @since 2.7.0
* @since 6.2.0 Added the `$post` parameter.
diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
index d0a7743c0e..3909683bce 100644
--- a/src/wp-includes/comment.php
+++ b/src/wp-includes/comment.php
@@ -446,6 +446,8 @@ function get_comment_count( $post_id = 0 ) {
/**
* Adds meta data field to a comment.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 2.9.0
*
* @link https://developer.wordpress.org/reference/functions/add_comment_meta/
@@ -474,6 +476,8 @@ function add_comment_meta( $comment_id, $meta_key, $meta_value, $unique = false
* value, will keep from removing duplicate metadata with the same key. It also
* allows removing all metadata matching key, if needed.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 2.9.0
*
* @link https://developer.wordpress.org/reference/functions/delete_comment_meta/
@@ -540,6 +544,8 @@ function wp_lazyload_comment_meta( array $comment_ids ) {
*
* If the meta field for the comment does not exist, it will be added.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 2.9.0
*
* @link https://developer.wordpress.org/reference/functions/update_comment_meta/
diff --git a/src/wp-includes/css/wp-embed-template.css b/src/wp-includes/css/wp-embed-template.css
index b5a482b737..7b86fdd3d3 100644
--- a/src/wp-includes/css/wp-embed-template.css
+++ b/src/wp-includes/css/wp-embed-template.css
@@ -39,15 +39,15 @@ body {
}
.dashicons-admin-comments {
- background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E");
+ background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%23646970%27%2F%3E%3C%2Fsvg%3E");
}
.wp-embed-comments a:hover .dashicons-admin-comments {
- background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E");
+ background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M5%202h9q.82%200%201.41.59T16%204v7q0%20.82-.59%201.41T14%2013h-2l-5%205v-5H5q-.82%200-1.41-.59T3%2011V4q0-.82.59-1.41T5%202z%27%20fill%3D%27%23135e96%27%2F%3E%3C%2Fsvg%3E");
}
.dashicons-share {
- background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E");
+ background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%23646970%27%2F%3E%3C%2Fsvg%3E");
display: none;
}
@@ -56,7 +56,7 @@ body {
}
.wp-embed-share-dialog-open:hover .dashicons-share {
- background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%230073aa%27%2F%3E%3C%2Fsvg%3E");
+ background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%23135e96%27%2F%3E%3C%2Fsvg%3E");
}
.wp-embed {
@@ -65,7 +65,7 @@ body {
font-weight: 400;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
line-height: 1.5;
- color: #8c8f94;
+ color: #646970;
background: #fff;
border: 1px solid #dcdcde;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
@@ -75,7 +75,7 @@ body {
}
.wp-embed a {
- color: #8c8f94;
+ color: #646970;
text-decoration: none;
}
@@ -115,7 +115,8 @@ p.wp-embed-heading {
}
.wp-embed .wp-embed-more {
- color: #c3c4c7;
+ color: #2271b1;
+ text-decoration: underline;
}
.wp-embed-footer {
@@ -163,7 +164,7 @@ p.wp-embed-heading {
.wp-embed-meta a:hover {
text-decoration: none;
- color: #2271b1;
+ color: #135e96;
}
.wp-embed-comments a {
diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index 744eefeb82..4033571edf 100644
--- a/src/wp-includes/formatting.php
+++ b/src/wp-includes/formatting.php
@@ -2551,6 +2551,11 @@ function balanceTags( $text, $force = false ) { // phpcs:ignore WordPress.Namin
/**
* Balances tags of string using a modified stack.
*
+ * {@internal Modified by Scott Reilly (coffee2code) 02 Aug 2004
+ * 1.1 Fixed handling of append/stack pop order of end text
+ * Added Cleaning Hooks
+ * 1.0 First Version}
+ *
* @since 2.0.4
* @since 5.3.0 Improve accuracy and add support for custom element tags.
*
@@ -2559,10 +2564,6 @@ function balanceTags( $text, $force = false ) { // phpcs:ignore WordPress.Namin
* @copyright November 4, 2001
* @version 1.1
* @todo Make better - change loop condition to $text in 1.2
- * @internal Modified by Scott Reilly (coffee2code) 02 Aug 2004
- * 1.1 Fixed handling of append/stack pop order of end text
- * Added Cleaning Hooks
- * 1.0 First Version
*
* @param string $text Text to be balanced.
* @return string Balanced text.
diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php
index 3e02c17853..cf41630c4a 100644
--- a/src/wp-includes/link-template.php
+++ b/src/wp-includes/link-template.php
@@ -4298,6 +4298,8 @@ function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
* - 'monsterid' (a monster)
* - 'wavatar' (a cartoon face)
* - 'identicon' (the "quilt", a geometric pattern)
+ * - 'initials' (initials based avatar with background color)
+ * - 'color' (generated background color)
* - 'mystery', 'mm', or 'mysteryman' (The Oyster Man)
* - 'blank' (transparent GIF)
* - 'gravatar_default' (the Gravatar logo)
@@ -4366,6 +4368,8 @@ function is_avatar_comment_type( $comment_type ) {
* - 'monsterid' (a monster)
* - 'wavatar' (a cartoon face)
* - 'identicon' (the "quilt", a geometric pattern)
+ * - 'initials' (initials based avatar with background color)
+ * - 'color' (generated background color)
* - 'mystery', 'mm', or 'mysteryman' (The Oyster Man)
* - 'blank' (transparent GIF)
* - 'gravatar_default' (the Gravatar logo)
@@ -4545,6 +4549,33 @@ function get_avatar_data( $id_or_email, $args = null ) {
'r' => $args['rating'],
);
+ // Handle additional parameters for the 'initials' avatar type
+ if ( 'initials' === $args['default'] ) {
+ $name = '';
+
+ if ( $user ) {
+ $name = ! empty( $user->display_name ) ? $user->display_name :
+ ( ! empty( $user->first_name ) && ! empty( $user->last_name ) ?
+ $user->first_name . ' ' . $user->last_name : $user->user_login );
+ } elseif ( is_object( $id_or_email ) && isset( $id_or_email->comment_author ) ) {
+ $name = $id_or_email->comment_author;
+ } elseif ( is_string( $id_or_email ) && false !== strpos( $id_or_email, '@' ) ) {
+ $name = str_replace( array( '.', '_', '-' ), ' ', substr( $id_or_email, 0, strpos( $id_or_email, '@' ) ) );
+ }
+
+ if ( ! empty( $name ) ) {
+ if ( preg_match( '/\p{Han}|\p{Hiragana}|\p{Katakana}|\p{Hangul}/u', $name ) || false === strpos( $name, ' ' ) ) {
+ $initials = mb_substr( $name, 0, min( 2, mb_strlen( $name, 'UTF-8' ) ), 'UTF-8' );
+ } else {
+ $first = mb_substr( $name, 0, 1, 'UTF-8' );
+ $last = mb_substr( $name, strrpos( $name, ' ' ) + 1, 1, 'UTF-8' );
+ $initials = $first . $last;
+ }
+
+ $url_args['initials'] = $initials;
+ }
+ }
+
/*
* Gravatars are always served over HTTPS.
*
diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php
index 86fe200f8d..4e7592bd74 100644
--- a/src/wp-includes/media-template.php
+++ b/src/wp-includes/media-template.php
@@ -443,7 +443,7 @@ function wp_print_media_templates() {
?>
</h2>
<div class="uploaded"><strong><?php _e( 'Uploaded on:' ); ?></strong> {{ data.dateFormatted }}</div>
- <div class="uploaded-by">
+ <div class="uploaded-by word-wrap-break-word">
<strong><?php _e( 'Uploaded by:' ); ?></strong>
<# if ( data.authorLink ) { #>
<a href="{{ data.authorLink }}">{{ data.authorName }}</a>
@@ -605,7 +605,7 @@ function wp_print_media_templates() {
<div class="centered">
<# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
<img src="{{ data.image.src }}" class="thumbnail" draggable="false" alt="" />
- <# } else if ( data.sizes ) {
+ <# } else if ( data.sizes ) {
if ( data.sizes.medium ) { #>
<img src="{{ data.sizes.medium.url }}" class="thumbnail" draggable="false" alt="" />
<# } else { #>
diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
index da46ef90a7..5d95b0a188 100644
--- a/src/wp-includes/media.php
+++ b/src/wp-includes/media.php
@@ -2992,9 +2992,6 @@ function wp_underscore_playlist_templates() {
function wp_playlist_scripts( $type ) {
wp_enqueue_style( 'wp-mediaelement' );
wp_enqueue_script( 'wp-playlist' );
- ?>
-<!--[if lt IE 9]><script>document.createElement('<?php echo esc_js( $type ); ?>');</script><![endif]-->
- <?php
add_action( 'wp_footer', 'wp_underscore_playlist_templates', 0 );
add_action( 'admin_footer', 'wp_underscore_playlist_templates', 0 );
}
@@ -3502,14 +3499,7 @@ function wp_audio_shortcode( $attr, $content = '' ) {
}
}
- $html = '';
-
- if ( 'mediaelement' === $library && 1 === $instance ) {
- $html .= "<!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->\n";
- }
-
- $html .= sprintf( '<audio %s controls="controls">', implode( ' ', $attr_strings ) );
-
+ $html = sprintf( '<audio %s controls="controls">', implode( ' ', $attr_strings ) );
$fileurl = '';
$source = '<source type="%s" src="%s" />';
@@ -3787,14 +3777,7 @@ function wp_video_shortcode( $attr, $content = '' ) {
}
}
- $html = '';
-
- if ( 'mediaelement' === $library && 1 === $instance ) {
- $html .= "<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->\n";
- }
-
- $html .= sprintf( '<video %s controls="controls">', implode( ' ', $attr_strings ) );
-
+ $html = sprintf( '<video %s controls="controls">', implode( ' ', $attr_strings ) );
$fileurl = '';
$source = '<source type="%s" src="%s" />';
diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php
index 6982e618c3..d60bf5e875 100644
--- a/src/wp-includes/meta.php
+++ b/src/wp-includes/meta.php
@@ -15,12 +15,14 @@ require ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php';
/**
* Adds metadata for the specified object.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 2.9.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $object_id ID of the object metadata is for.
* @param string $meta_key Metadata key.
* @param mixed $meta_value Metadata value. Arrays and objects are stored as serialized data and
@@ -65,11 +67,12 @@ function add_metadata( $meta_type, $object_id, $meta_key, $meta_value, $unique =
* Short-circuits adding metadata of a specific type.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
* Returning a non-null value will effectively short-circuit the function.
*
* Possible hook names include:
*
+ * - `add_blog_metadata`
* - `add_post_metadata`
* - `add_comment_metadata`
* - `add_term_metadata`
@@ -77,11 +80,12 @@ function add_metadata( $meta_type, $object_id, $meta_key, $meta_value, $unique =
*
* @since 3.1.0
*
- * @param null|bool $check Whether to allow adding metadata for the given type.
- * @param int $object_id ID of the object metadata is for.
- * @param string $meta_key Metadata key.
- * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
- * @param bool $unique Whether the specified meta key should be unique for the object.
+ * @param null|int|false $check Whether to allow adding metadata for the given type. Return false or a meta ID
+ * to short-circuit the function. Return null to continue with the default behavior.
+ * @param int $object_id ID of the object metadata is for.
+ * @param string $meta_key Metadata key.
+ * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
+ * @param bool $unique Whether the specified meta key should be unique for the object.
*/
$check = apply_filters( "add_{$meta_type}_metadata", null, $object_id, $meta_key, $meta_value, $unique );
if ( null !== $check ) {
@@ -105,10 +109,11 @@ function add_metadata( $meta_type, $object_id, $meta_key, $meta_value, $unique =
* Fires immediately before meta of a specific type is added.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
*
* Possible hook names include:
*
+ * - `add_blog_meta`
* - `add_post_meta`
* - `add_comment_meta`
* - `add_term_meta`
@@ -143,10 +148,11 @@ function add_metadata( $meta_type, $object_id, $meta_key, $meta_value, $unique =
* Fires immediately after meta of a specific type is added.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
*
* Possible hook names include:
*
+ * - `added_blog_meta`
* - `added_post_meta`
* - `added_comment_meta`
* - `added_term_meta`
@@ -168,12 +174,14 @@ function add_metadata( $meta_type, $object_id, $meta_key, $meta_value, $unique =
* Updates metadata for the specified object. If no value already exists for the specified object
* ID and metadata key, the metadata will be added.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 2.9.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $object_id ID of the object metadata is for.
* @param string $meta_key Metadata key.
* @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
@@ -218,11 +226,12 @@ function update_metadata( $meta_type, $object_id, $meta_key, $meta_value, $prev_
* Short-circuits updating metadata of a specific type.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
* Returning a non-null value will effectively short-circuit the function.
*
* Possible hook names include:
*
+ * - `update_blog_metadata`
* - `update_post_metadata`
* - `update_comment_metadata`
* - `update_term_metadata`
@@ -277,10 +286,11 @@ function update_metadata( $meta_type, $object_id, $meta_key, $meta_value, $prev_
* Fires immediately before updating metadata of a specific type.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
*
* Possible hook names include:
*
+ * - `update_blog_meta`
* - `update_post_meta`
* - `update_comment_meta`
* - `update_term_meta`
@@ -323,10 +333,11 @@ function update_metadata( $meta_type, $object_id, $meta_key, $meta_value, $prev_
* Fires immediately after updating metadata of a specific type.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
*
* Possible hook names include:
*
+ * - `updated_blog_meta`
* - `updated_post_meta`
* - `updated_comment_meta`
* - `updated_term_meta`
@@ -363,12 +374,14 @@ function update_metadata( $meta_type, $object_id, $meta_key, $meta_value, $prev_
/**
* Deletes metadata for the specified object.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 2.9.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $object_id ID of the object metadata is for.
* @param string $meta_key Metadata key.
* @param mixed $meta_value Optional. Metadata value. Must be serializable if non-scalar.
@@ -411,11 +424,12 @@ function delete_metadata( $meta_type, $object_id, $meta_key, $meta_value = '', $
* Short-circuits deleting metadata of a specific type.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
* Returning a non-null value will effectively short-circuit the function.
*
* Possible hook names include:
*
+ * - `delete_blog_metadata`
* - `delete_post_metadata`
* - `delete_comment_metadata`
* - `delete_term_metadata`
@@ -466,10 +480,11 @@ function delete_metadata( $meta_type, $object_id, $meta_key, $meta_value = '', $
* Fires immediately before deleting metadata of a specific type.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
*
* Possible hook names include:
*
+ * - `delete_blog_meta`
* - `delete_post_meta`
* - `delete_comment_meta`
* - `delete_term_meta`
@@ -515,10 +530,11 @@ function delete_metadata( $meta_type, $object_id, $meta_key, $meta_value = '', $
* Fires immediately after deleting metadata of a specific type.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
*
* Possible hook names include:
*
+ * - `deleted_blog_meta`
* - `deleted_post_meta`
* - `deleted_comment_meta`
* - `deleted_term_meta`
@@ -563,8 +579,8 @@ function delete_metadata( $meta_type, $object_id, $meta_key, $meta_value = '', $
* @see get_metadata_raw()
* @see get_metadata_default()
*
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $object_id ID of the object metadata is for.
* @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for
* the specified object. Default empty string.
@@ -596,8 +612,8 @@ function get_metadata( $meta_type, $object_id, $meta_key = '', $single = false )
*
* @since 5.5.0
*
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $object_id ID of the object metadata is for.
* @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for
* the specified object. Default empty string.
@@ -623,11 +639,12 @@ function get_metadata_raw( $meta_type, $object_id, $meta_key = '', $single = fal
* Short-circuits the return value of a meta field.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
* Returning a non-null value will effectively short-circuit the function.
*
* Possible filter names include:
*
+ * - `get_blog_metadata`
* - `get_post_metadata`
* - `get_comment_metadata`
* - `get_term_metadata`
@@ -641,8 +658,8 @@ function get_metadata_raw( $meta_type, $object_id, $meta_key = '', $single = fal
* @param int $object_id ID of the object metadata is for.
* @param string $meta_key Metadata key.
* @param bool $single Whether to return only the first value of the specified `$meta_key`.
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
*/
$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single, $meta_type );
if ( null !== $check ) {
@@ -687,8 +704,8 @@ function get_metadata_raw( $meta_type, $object_id, $meta_key = '', $single = fal
*
* @since 5.5.0
*
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $object_id ID of the object metadata is for.
* @param string $meta_key Metadata key.
* @param bool $single Optional. If true, return only the first value of the specified `$meta_key`.
@@ -707,10 +724,11 @@ function get_metadata_default( $meta_type, $object_id, $meta_key, $single = fals
* Filters the default metadata value for a specified meta key and object.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
*
* Possible filter names include:
*
+ * - `default_blog_metadata`
* - `default_post_metadata`
* - `default_comment_metadata`
* - `default_term_metadata`
@@ -723,8 +741,8 @@ function get_metadata_default( $meta_type, $object_id, $meta_key, $single = fals
* @param int $object_id ID of the object metadata is for.
* @param string $meta_key Metadata key.
* @param bool $single Whether to return only the first value of the specified `$meta_key`.
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
*/
$value = apply_filters( "default_{$meta_type}_metadata", $value, $object_id, $meta_key, $single, $meta_type );
@@ -740,8 +758,8 @@ function get_metadata_default( $meta_type, $object_id, $meta_key, $single = fals
*
* @since 3.3.0
*
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $object_id ID of the object metadata is for.
* @param string $meta_key Metadata key.
* @return bool Whether a meta field with the given key exists.
@@ -783,8 +801,8 @@ function metadata_exists( $meta_type, $object_id, $meta_key ) {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $meta_id ID for a specific meta row.
* @return stdClass|false {
* Metadata object, or boolean `false` if the metadata doesn't exist.
@@ -793,6 +811,7 @@ function metadata_exists( $meta_type, $object_id, $meta_key ) {
* @type mixed $meta_value The unserialized meta value.
* @type string $meta_id Optional. The meta ID when the meta type is any value except 'user'.
* @type string $umeta_id Optional. The meta ID when the meta type is 'user'.
+ * @type string $blog_id Optional. The object ID when the meta type is 'blog'.
* @type string $post_id Optional. The object ID when the meta type is 'post'.
* @type string $comment_id Optional. The object ID when the meta type is 'comment'.
* @type string $term_id Optional. The object ID when the meta type is 'term'.
@@ -820,11 +839,12 @@ function get_metadata_by_mid( $meta_type, $meta_id ) {
* Short-circuits the return value when fetching a meta field by meta ID.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
* Returning a non-null value will effectively short-circuit the function.
*
* Possible hook names include:
*
+ * - `get_blog_metadata_by_mid`
* - `get_post_metadata_by_mid`
* - `get_comment_metadata_by_mid`
* - `get_term_metadata_by_mid`
@@ -862,8 +882,8 @@ function get_metadata_by_mid( $meta_type, $meta_id ) {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $meta_id ID for a specific meta row.
* @param string $meta_value Metadata value. Must be serializable if non-scalar.
* @param string|false $meta_key Optional. You can provide a meta key to update it. Default false.
@@ -894,11 +914,12 @@ function update_metadata_by_mid( $meta_type, $meta_id, $meta_value, $meta_key =
* Short-circuits updating metadata of a specific type by meta ID.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
* Returning a non-null value will effectively short-circuit the function.
*
* Possible hook names include:
*
+ * - `update_blog_metadata_by_mid`
* - `update_post_metadata_by_mid`
* - `update_comment_metadata_by_mid`
* - `update_term_metadata_by_mid`
@@ -988,8 +1009,8 @@ function update_metadata_by_mid( $meta_type, $meta_id, $meta_value, $meta_key =
*
* @global wpdb $wpdb WordPress database abstraction object.
*
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $meta_id ID for a specific meta row.
* @return bool True on successful delete, false on failure.
*/
@@ -1019,11 +1040,12 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
* Short-circuits deleting metadata of a specific type by meta ID.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
* Returning a non-null value will effectively short-circuit the function.
*
* Possible hook names include:
*
+ * - `delete_blog_metadata_by_mid`
* - `delete_post_metadata_by_mid`
* - `delete_comment_metadata_by_mid`
* - `delete_term_metadata_by_mid`
@@ -1059,8 +1081,6 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
*
* - `delete_postmeta`
* - `delete_commentmeta`
- * - `delete_termmeta`
- * - `delete_usermeta`
*
* @since 3.4.0
*
@@ -1090,8 +1110,6 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
*
* - `deleted_postmeta`
* - `deleted_commentmeta`
- * - `deleted_termmeta`
- * - `deleted_usermeta`
*
* @since 3.4.0
*
@@ -1115,8 +1133,8 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param string|int[] $object_ids Array or comma delimited list of object IDs to update cache for.
* @return array|false Metadata cache for the specified objects, or false on failure.
*/
@@ -1145,11 +1163,12 @@ function update_meta_cache( $meta_type, $object_ids ) {
* Short-circuits updating the metadata cache of a specific type.
*
* The dynamic portion of the hook name, `$meta_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
* Returning a non-null value will effectively short-circuit the function.
*
* Possible hook names include:
*
+ * - `update_blog_metadata_cache`
* - `update_post_metadata_cache`
* - `update_comment_metadata_cache`
* - `update_term_metadata_cache`
@@ -1268,8 +1287,8 @@ function get_meta_sql( $meta_query, $type, $primary_table, $primary_id_column, $
*
* @global wpdb $wpdb WordPress database abstraction object.
*
- * @param string $type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @return string|false Metadata table name, or false if no metadata table exists
*/
function _get_meta_table( $type ) {
@@ -1290,8 +1309,8 @@ function _get_meta_table( $type ) {
* @since 3.1.3
*
* @param string $meta_key Metadata key.
- * @param string $meta_type Optional. Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table. Default empty string.
+ * @param string $meta_type Optional. Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table. Default empty string.
* @return bool Whether the meta key is considered protected.
*/
function is_protected_meta( $meta_key, $meta_type = '' ) {
@@ -1305,8 +1324,8 @@ function is_protected_meta( $meta_key, $meta_type = '' ) {
*
* @param bool $protected Whether the key is considered protected.
* @param string $meta_key Metadata key.
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
*/
return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
}
@@ -1319,8 +1338,8 @@ function is_protected_meta( $meta_key, $meta_type = '' ) {
*
* @param string $meta_key Metadata key.
* @param mixed $meta_value Metadata value to sanitize.
- * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param string $object_subtype Optional. The subtype of the object type. Default empty string.
* @return mixed Sanitized $meta_value.
*/
@@ -1331,15 +1350,15 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype =
* Filters the sanitization of a specific meta key of a specific meta type and subtype.
*
* The dynamic portions of the hook name, `$object_type`, `$meta_key`,
- * and `$object_subtype`, refer to the metadata object type (comment, post, term, or user),
+ * and `$object_subtype`, refer to the metadata object type (blog, comment, post, term, or user),
* the meta key value, and the object subtype respectively.
*
* @since 4.9.8
*
* @param mixed $meta_value Metadata value to sanitize.
* @param string $meta_key Metadata key.
- * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param string $object_subtype Object subtype.
*/
return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}_for_{$object_subtype}", $meta_value, $meta_key, $object_type, $object_subtype );
@@ -1349,15 +1368,15 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype =
* Filters the sanitization of a specific meta key of a specific meta type.
*
* The dynamic portions of the hook name, `$meta_type`, and `$meta_key`,
- * refer to the metadata object type (comment, post, term, or user) and the meta
+ * refer to the metadata object type (blog, comment, post, term, or user) and the meta
* key value, respectively.
*
* @since 3.3.0
*
* @param mixed $meta_value Metadata value to sanitize.
* @param string $meta_key Metadata key.
- * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
*/
return apply_filters( "sanitize_{$object_type}_meta_{$meta_key}", $meta_value, $meta_key, $object_type );
}
@@ -1369,7 +1388,7 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype =
* an object subtype is omitted, the meta key will be registered for the entire object type, however it can be partly
* overridden in case a more specific meta key of the same name exists for the same object type and a subtype.
*
- * If an object type does not support any subtypes, such as users or comments, you should commonly call this function
+ * If an object type does not support any subtypes, such as blogs, users, or comments, you should commonly call this function
* without passing a subtype.
*
* @since 3.3.0
@@ -1382,8 +1401,8 @@ function sanitize_meta( $meta_key, $meta_value, $object_type, $object_subtype =
* @since 6.4.0 The `$revisions_enabled` argument was added to the arguments array.
* @since 6.7.0 The `label` argument was added to the arguments array.
*
- * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param string $meta_key Meta key to register.
* @param array $args {
* Data used to describe the meta key when registered.
@@ -1461,8 +1480,8 @@ function register_meta( $object_type, $meta_key, $args, $deprecated = null ) {
*
* @param array $args Array of meta registration arguments.
* @param array $defaults Array of default arguments.
- * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param string $meta_key Meta key.
*/
$args = apply_filters( 'register_meta_args', $args, $defaults, $object_type, $meta_key );
@@ -1557,8 +1576,8 @@ function register_meta( $object_type, $meta_key, $args, $deprecated = null ) {
* @param string $meta_key Metadata key.
* @param bool $single If true, return only the first value of the specified `$meta_key`.
* This parameter has no effect if `$meta_key` is not specified.
- * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $meta_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @return mixed An array of default values if `$single` is false.
* The default value of the meta field if `$single` is true.
*/
@@ -1612,8 +1631,8 @@ function filter_default_metadata( $value, $object_id, $meta_key, $single, $meta_
* @since 4.6.0
* @since 4.9.8 The `$object_subtype` parameter was added.
*
- * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param string $meta_key Metadata key.
* @param string $object_subtype Optional. The subtype of the object type. Default empty string.
* @return bool True if the meta key is registered to the object type and, if provided,
@@ -1631,8 +1650,8 @@ function registered_meta_key_exists( $object_type, $meta_key, $object_subtype =
* @since 4.6.0
* @since 4.9.8 The `$object_subtype` parameter was added.
*
- * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param string $meta_key Metadata key.
* @param string $object_subtype Optional. The subtype of the object type. Default empty string.
* @return bool True if successful. False if the meta key was not registered.
@@ -1681,8 +1700,8 @@ function unregister_meta_key( $object_type, $meta_key, $object_subtype = '' ) {
* @since 4.6.0
* @since 4.9.8 The `$object_subtype` parameter was added.
*
- * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param string $object_subtype Optional. The subtype of the object type. Default empty string.
* @return array[] List of registered metadata args, keyed by their meta keys.
*/
@@ -1704,8 +1723,8 @@ function get_registered_meta_keys( $object_type, $object_subtype = '' ) {
*
* @since 4.6.0
*
- * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $object_id ID of the object the metadata is for.
* @param string $meta_key Optional. Registered metadata key. If not specified, retrieve all registered
* metadata for the specified object.
@@ -1767,8 +1786,8 @@ function _wp_register_meta_args_allowed_list( $args, $default_args ) {
*
* @since 4.9.8
*
- * @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
- * or any other object type with an associated meta table.
+ * @param string $object_type Type of object metadata is for. Accepts 'blog', 'post', 'comment', 'term',
+ * 'user', or any other object type with an associated meta table.
* @param int $object_id ID of the object to retrieve its subtype.
* @return string The object subtype or an empty string if unspecified subtype.
*/
@@ -1814,13 +1833,14 @@ function get_object_subtype( $object_type, $object_id ) {
}
/**
- * Filters the object subtype identifier for a non-standard object type.
+ * Filters the object subtype identifier.
*
* The dynamic portion of the hook name, `$object_type`, refers to the meta object type
- * (post, comment, term, user, or any other type with an associated meta table).
+ * (blog, post, comment, term, user, or any other type with an associated meta table).
*
* Possible hook names include:
*
+ * - `get_object_subtype_blog`
* - `get_object_subtype_post`
* - `get_object_subtype_comment`
* - `get_object_subtype_term`
@@ -1828,7 +1848,7 @@ function get_object_subtype( $object_type, $object_id ) {
*
* @since 4.9.8
*
- * @param string $object_subtype Empty string to override.
+ * @param string $object_subtype Object subtype or empty string to override.
* @param int $object_id ID of the object to get the subtype for.
*/
return apply_filters( "get_object_subtype_{$object_type}", $object_subtype, $object_id );
diff --git a/src/wp-includes/ms-load.php b/src/wp-includes/ms-load.php
index 0708bc4dcd..b8d5228d09 100644
--- a/src/wp-includes/ms-load.php
+++ b/src/wp-includes/ms-load.php
@@ -129,9 +129,9 @@ function ms_site_check() {
/**
* Retrieves the closest matching network for a domain and path.
*
- * @since 3.9.0
+ * {@internal In 4.4.0, converted to a wrapper for WP_Network::get_by_path()}
*
- * @internal In 4.4.0, converted to a wrapper for WP_Network::get_by_path()
+ * @since 3.9.0
*
* @param string $domain Domain to check.
* @param string $path Path to check.
@@ -552,12 +552,12 @@ function wpmu_current_site() {
/**
* Retrieves an object containing information about the requested network.
*
+ * {@internal In 4.6.0, converted to use get_network()}
+ *
* @since 3.9.0
* @deprecated 4.7.0 Use get_network()
* @see get_network()
*
- * @internal In 4.6.0, converted to use get_network()
- *
* @param object|int $network The network's database row or ID.
* @return WP_Network|false Object containing network information if found, false if not.
*/
diff --git a/src/wp-includes/ms-site.php b/src/wp-includes/ms-site.php
index 2a2b1474c5..a8d9f8e2b6 100644
--- a/src/wp-includes/ms-site.php
+++ b/src/wp-includes/ms-site.php
@@ -1022,6 +1022,8 @@ function clean_blog_cache( $blog ) {
/**
* Adds metadata to a site.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 5.1.0
*
* @param int $site_id Site ID.
@@ -1048,6 +1050,8 @@ function add_site_meta( $site_id, $meta_key, $meta_value, $unique = false ) {
* value, will keep from removing duplicate metadata with the same key. It also
* allows removing all metadata matching key, if needed.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 5.1.0
*
* @param int $site_id Site ID.
@@ -1090,11 +1094,13 @@ function get_site_meta( $site_id, $key = '', $single = false ) {
/**
* Updates metadata for a site.
*
- * Use the $prev_value parameter to differentiate between meta fields with the
+ * Use the `$prev_value` parameter to differentiate between meta fields with the
* same key and site ID.
*
* If the meta field for the site does not exist, it will be added.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 5.1.0
*
* @param int $site_id Site ID.
diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php
index e7ce2edb41..9fd6d1d00d 100644
--- a/src/wp-includes/pluggable.php
+++ b/src/wp-includes/pluggable.php
@@ -446,10 +446,10 @@ if ( ! function_exists( 'wp_mail' ) ) :
$phpmailer->addAddress( $address, $recipient_name );
break;
case 'cc':
- $phpmailer->addCc( $address, $recipient_name );
+ $phpmailer->addCC( $address, $recipient_name );
break;
case 'bcc':
- $phpmailer->addBcc( $address, $recipient_name );
+ $phpmailer->addBCC( $address, $recipient_name );
break;
case 'reply_to':
$phpmailer->addReplyTo( $address, $recipient_name );
@@ -3048,6 +3048,8 @@ if ( ! function_exists( 'get_avatar' ) ) :
* - 'monsterid' (a monster)
* - 'wavatar' (a cartoon face)
* - 'identicon' (the "quilt", a geometric pattern)
+ * - 'initials' (initials based avatar with background color)
+ * - 'color' (generated background color)
* - 'mystery', 'mm', or 'mysteryman' (The Oyster Man)
* - 'blank' (transparent GIF)
* - 'gravatar_default' (the Gravatar logo)
diff --git a/src/wp-includes/plugin.php b/src/wp-includes/plugin.php
index bed67a9d96..5b4079b0bd 100644
--- a/src/wp-includes/plugin.php
+++ b/src/wp-includes/plugin.php
@@ -359,7 +359,7 @@ function remove_all_filters( $hook_name, $priority = false ) {
*
* @global string[] $wp_current_filter Stores the list of current filters with the current one last
*
- * @return string Hook name of the current filter.
+ * @return string|false Hook name of the current filter, false if no filter is running.
*/
function current_filter() {
global $wp_current_filter;
@@ -632,7 +632,7 @@ function remove_all_actions( $hook_name, $priority = false ) {
*
* @since 3.9.0
*
- * @return string Hook name of the current action.
+ * @return string|false Hook name of the current action, false if no action is running.
*/
function current_action() {
return current_filter();
diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index 19fada6383..bd749b2f82 100644
--- a/src/wp-includes/post.php
+++ b/src/wp-includes/post.php
@@ -2608,6 +2608,8 @@ function get_posts( $args = null ) {
*
* Post meta data is called "Custom Fields" on the Administration Screen.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 1.5.0
*
* @param int $post_id Post ID.
@@ -2640,6 +2642,8 @@ function add_post_meta( $post_id, $meta_key, $meta_value, $unique = false ) {
* value, will keep from removing duplicate metadata with the same key. It also
* allows removing all metadata matching the key, if needed.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 1.5.0
*
* @param int $post_id Post ID.
@@ -2695,6 +2699,8 @@ function get_post_meta( $post_id, $key = '', $single = false ) {
*
* Can be used in place of add_post_meta().
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 1.5.0
*
* @param int $post_id Post ID.
diff --git a/src/wp-includes/rest-api/class-wp-rest-response.php b/src/wp-includes/rest-api/class-wp-rest-response.php
index c6ea11be83..0861d190d0 100644
--- a/src/wp-includes/rest-api/class-wp-rest-response.php
+++ b/src/wp-includes/rest-api/class-wp-rest-response.php
@@ -43,7 +43,7 @@ class WP_REST_Response extends WP_HTTP_Response {
/**
* Adds a link to the response.
*
- * @internal The $rel parameter is first, as this looks nicer when sending multiple.
+ * {@internal The $rel parameter is first, as this looks nicer when sending multiple.}
*
* @since 4.4.0
*
@@ -135,7 +135,7 @@ class WP_REST_Response extends WP_HTTP_Response {
/**
* Sets a single link header.
*
- * @internal The $rel parameter is first, as this looks nicer when sending multiple.
+ * {@internal The $rel parameter is first, as this looks nicer when sending multiple.}
*
* @since 4.4.0
*
diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
index 4b960d6c6b..0474613b2e 100644
--- a/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
+++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
@@ -662,11 +662,11 @@ abstract class WP_REST_Controller {
/**
* Sanitizes the slug value.
*
- * @since 4.7.0
- *
- * @internal We can't use sanitize_title() directly, as the second
+ * {@internal We can't use sanitize_title() directly, as the second
* parameter is the fallback title, which would end up being set to the
- * request object.
+ * request object.}
+ *
+ * @since 4.7.0
*
* @see https://github.com/WP-API/WP-API/issues/1585
*
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
index d439629882..cd2c06e4cc 100644
--- a/src/wp-includes/script-loader.php
+++ b/src/wp-includes/script-loader.php
@@ -396,7 +396,7 @@ function wp_default_packages_inline_scripts( $scripts ) {
"\n",
array(
'( function() {',
- ' var userId = ' . get_current_user_ID() . ';',
+ ' var userId = ' . get_current_user_id() . ';',
' var storageKey = "WP_DATA_USER_" + userId;',
' wp.data',
' .use( wp.data.plugins.persistence, { storageKey: storageKey } );',
@@ -997,8 +997,6 @@ function wp_default_scripts( $scripts ) {
// Not used in core, replaced by imgAreaSelect.
$scripts->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.min.js', array( 'jquery' ), '0.9.15' );
- $scripts->add( 'swfobject', '/wp-includes/js/swfobject.js', array(), '2.2-20120417' );
-
// Error messages for Plupload.
$uploader_l10n = array(
'queue_limit_exceeded' => __( 'You have attempted to queue too many files.' ),
@@ -1046,12 +1044,6 @@ function wp_default_scripts( $scripts ) {
$scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array( 'plupload', 'jquery', 'json2', 'media-models' ), false, 1 );
did_action( 'init' ) && $scripts->localize( 'wp-plupload', 'pluploadL10n', $uploader_l10n );
- // Keep 'swfupload' for back-compat.
- $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', array(), '2201-20110113' );
- $scripts->add( 'swfupload-all', false, array( 'swfupload' ), '2201' );
- $scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array( 'swfupload-all', 'jquery' ), '2201-20110524' );
- did_action( 'init' ) && $scripts->localize( 'swfupload-handlers', 'swfuploadL10n', $uploader_l10n );
-
$scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", array(), false, 1 );
did_action( 'init' ) && $scripts->add_data( 'comment-reply', 'strategy', 'async' );
diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
index 3e235b780f..a6c47e43ec 100644
--- a/src/wp-includes/taxonomy.php
+++ b/src/wp-includes/taxonomy.php
@@ -1292,6 +1292,8 @@ function get_term_to_edit( $id, $taxonomy ) {
*
* Prior to 4.5.0, taxonomy was passed as the first parameter of `get_terms()`.
*
+ * {@internal The `$deprecated` parameter is parsed for backward compatibility only.}
+ *
* @since 2.3.0
* @since 4.2.0 Introduced 'name' and 'childless' parameters.
* @since 4.4.0 Introduced the ability to pass 'term_id' as an alias of 'id' for the `orderby` parameter.
@@ -1301,8 +1303,6 @@ function get_term_to_edit( $id, $taxonomy ) {
* Introduced 'meta_key' and 'meta_value' parameters. Introduced the ability to order results by metadata.
* @since 4.8.0 Introduced 'suppress_filter' parameter.
*
- * @internal The `$deprecated` parameter is parsed for backward compatibility only.
- *
* @param array|string $args Optional. Array or string of arguments. See WP_Term_Query::__construct()
* for information on accepted arguments. Default empty array.
* @param array|string $deprecated Optional. Argument array, when using the legacy function parameter format.
@@ -1382,6 +1382,8 @@ function get_terms( $args = array(), $deprecated = '' ) {
/**
* Adds metadata to a term.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 4.4.0
*
* @param int $term_id Term ID.
@@ -1409,6 +1411,8 @@ function add_term_meta( $term_id, $meta_key, $meta_value, $unique = false ) {
/**
* Removes metadata matching criteria from a term.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 4.4.0
*
* @param int $term_id Term ID.
@@ -1455,6 +1459,8 @@ function get_term_meta( $term_id, $key = '', $single = false ) {
*
* If the meta field for the term does not exist, it will be added.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 4.4.0
*
* @param int $term_id Term ID.
@@ -1927,11 +1933,11 @@ function sanitize_term_field( $field, $value, $term_id, $taxonomy, $context ) {
*
* Default $args is 'hide_empty' which can be 'hide_empty=true' or array('hide_empty' => true).
*
+ * {@internal The `$deprecated` parameter is parsed for backward compatibility only.}
+ *
* @since 2.3.0
* @since 5.6.0 Changed the function signature so that the `$args` array can be provided as the first parameter.
*
- * @internal The `$deprecated` parameter is parsed for backward compatibility only.
- *
* @param array|string $args Optional. Array or string of arguments. See WP_Term_Query::__construct()
* for information on accepted arguments. Default empty array.
* @param array|string $deprecated Optional. Argument array, when using the legacy function parameter format.
@@ -4892,11 +4898,13 @@ function is_object_in_term( $object_id, $taxonomy, $terms = null ) {
if ( is_wp_error( $object_terms ) ) {
return $object_terms;
}
+
if ( empty( $object_terms ) ) {
return false;
}
+
if ( empty( $terms ) ) {
- return ( ! empty( $object_terms ) );
+ return true;
}
$terms = (array) $terms;
diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
index b4a71d855a..0727086aee 100644
--- a/src/wp-includes/theme.php
+++ b/src/wp-includes/theme.php
@@ -4349,6 +4349,8 @@ function create_initial_theme_features() {
*
* @since 5.9.0
*
+ * @global string[] $wp_theme_directories
+ *
* @return bool Whether the active theme is a block-based theme or not.
*/
function wp_is_block_theme() {
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index 6d53726327..c3df9229bf 100644
--- a/src/wp-includes/user.php
+++ b/src/wp-includes/user.php
@@ -1202,6 +1202,8 @@ function is_user_member_of_blog( $user_id = 0, $blog_id = 0 ) {
/**
* Adds meta data to a user.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 3.0.0
*
* @param int $user_id User ID.
@@ -1228,6 +1230,8 @@ function add_user_meta( $user_id, $meta_key, $meta_value, $unique = false ) {
* value, will keep from removing duplicate metadata with the same key. It also
* allows removing all metadata matching key, if needed.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 3.0.0
*
* @link https://developer.wordpress.org/reference/functions/delete_user_meta/
@@ -1279,6 +1283,8 @@ function get_user_meta( $user_id, $key = '', $single = false ) {
*
* If the meta field for the user does not exist, it will be added.
*
+ * For historical reasons both the meta key and the meta value are expected to be "slashed" (slashes escaped) on input.
+ *
* @since 3.0.0
*
* @link https://developer.wordpress.org/reference/functions/update_user_meta/