mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-31 07:49:38 +01:00
a225c5cdc6
This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
5.6 KiB
JavaScript
2 lines
5.6 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.plugins=function(e){var n={};function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(n){return e[n]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s="./node_modules/@wordpress/plugins/build-module/index.js")}({"./node_modules/@babel/runtime/helpers/esm/extends.js":function(e,n,t){"use strict";function r(){return(r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}t.d(n,"a",(function(){return r}))},"./node_modules/@wordpress/plugins/build-module/index.js":function(e,n,t){"use strict";t.r(n),t.d(n,"PluginArea",(function(){return j})),t.d(n,"withPluginContext",(function(){return d})),t.d(n,"registerPlugin",(function(){return v})),t.d(n,"unregisterPlugin",(function(){return h})),t.d(n,"getPlugin",(function(){return b})),t.d(n,"getPlugins",(function(){return w}));var r=t("@wordpress/element"),i=t("lodash"),o=t("./node_modules/memize/index.js"),s=t.n(o),u=t("@wordpress/hooks"),l=t("./node_modules/@babel/runtime/helpers/esm/extends.js"),c=t("@wordpress/compose");const{Consumer:a,Provider:p}=Object(r.createContext)({name:null,icon:null}),d=e=>Object(c.createHigherOrderComponent)(n=>t=>Object(r.createElement)(a,null,i=>Object(r.createElement)(n,Object(l.a)({},t,e(i,t)))),"withPluginContext");var g=t("@wordpress/primitives");var m=Object(r.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(g.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"}));const f={};function v(e,n){if("object"!=typeof n)return console.error("No settings object provided!"),null;if("string"!=typeof e)return console.error("Plugin name must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(e))return console.error('Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'),null;f[e]&&console.error(`Plugin "${e}" is already registered.`),n=Object(u.applyFilters)("plugins.registerPlugin",n,e);const{render:t,scope:r}=n;if(!Object(i.isFunction)(t))return console.error('The "render" property must be specified and must be a valid function.'),null;if(r){if("string"!=typeof r)return console.error("Plugin scope must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(r))return console.error('Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-page".'),null}return f[e]={name:e,icon:m,...n},Object(u.doAction)("plugins.pluginRegistered",n,e),n}function h(e){if(!f[e])return void console.error('Plugin "'+e+'" is not registered.');const n=f[e];return delete f[e],Object(u.doAction)("plugins.pluginUnregistered",n,e),n}function b(e){return f[e]}function w(e){return Object.values(f).filter(n=>n.scope===e)}class x extends r.Component{constructor(){super(...arguments),this.setPlugins=this.setPlugins.bind(this),this.memoizedContext=s()((e,n)=>({name:e,icon:n})),this.state=this.getCurrentPluginsState()}getCurrentPluginsState(){return{plugins:Object(i.map)(w(this.props.scope),({icon:e,name:n,render:t})=>({Plugin:t,context:this.memoizedContext(n,e)}))}}componentDidMount(){Object(u.addAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered",this.setPlugins),Object(u.addAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered",this.setPlugins)}componentWillUnmount(){Object(u.removeAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered"),Object(u.removeAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered")}setPlugins(){this.setState(this.getCurrentPluginsState)}render(){return Object(r.createElement)("div",{style:{display:"none"}},Object(i.map)(this.state.plugins,({context:e,Plugin:n})=>Object(r.createElement)(p,{key:e.name,value:e},Object(r.createElement)(n,null))))}}var j=x},"./node_modules/memize/index.js":function(e,n,t){e.exports=function(e,n){var t,r,i=0;function o(){var o,s,u=t,l=arguments.length;e:for(;u;){if(u.args.length===arguments.length){for(s=0;s<l;s++)if(u.args[s]!==arguments[s]){u=u.next;continue e}return u!==t&&(u===r&&(r=u.prev),u.prev.next=u.next,u.next&&(u.next.prev=u.prev),u.next=t,u.prev=null,t.prev=u,t=u),u.val}u=u.next}for(o=new Array(l),s=0;s<l;s++)o[s]=arguments[s];return u={args:o,val:e.apply(null,o)},t?(t.prev=u,u.next=t):r=u,i===n.maxSize?(r=r.prev).next=null:i++,t=u,u.val}return n=n||{},o.clear=function(){t=null,r=null,i=0},o}},"@wordpress/compose":function(e,n){e.exports=window.wp.compose},"@wordpress/element":function(e,n){e.exports=window.wp.element},"@wordpress/hooks":function(e,n){e.exports=window.wp.hooks},"@wordpress/primitives":function(e,n){e.exports=window.wp.primitives},lodash:function(e,n){e.exports=window.lodash}}); |