Changeset 3475210
- Timestamp:
- 03/05/2026 07:31:13 AM (4 weeks ago)
- Location:
- meta-box
- Files:
-
- 28 edited
- 1 copied
-
tags/5.11.2 (copied) (copied from meta-box/trunk)
-
tags/5.11.2/inc/core.php (modified) (1 diff)
-
tags/5.11.2/inc/fields/block-editor.php (modified) (1 diff)
-
tags/5.11.2/inc/fields/file.php (modified) (1 diff)
-
tags/5.11.2/inc/fields/time.php (modified) (1 diff)
-
tags/5.11.2/inc/loader.php (modified) (1 diff)
-
tags/5.11.2/inc/sanitizer.php (modified) (2 diffs)
-
tags/5.11.2/js/block-editor/build/block-editor.asset.php (modified) (1 diff)
-
tags/5.11.2/js/block-editor/build/block-editor.js (modified) (1 diff)
-
tags/5.11.2/js/block-editor/build/style-block-editor.css (modified) (1 diff)
-
tags/5.11.2/js/icon.js (modified) (1 diff)
-
tags/5.11.2/js/time.js (modified) (2 diffs)
-
tags/5.11.2/meta-box.php (modified) (1 diff)
-
tags/5.11.2/readme.txt (modified) (3 diffs)
-
tags/5.11.2/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/inc/core.php (modified) (1 diff)
-
trunk/inc/fields/block-editor.php (modified) (1 diff)
-
trunk/inc/fields/file.php (modified) (1 diff)
-
trunk/inc/fields/time.php (modified) (1 diff)
-
trunk/inc/loader.php (modified) (1 diff)
-
trunk/inc/sanitizer.php (modified) (2 diffs)
-
trunk/js/block-editor/build/block-editor.asset.php (modified) (1 diff)
-
trunk/js/block-editor/build/block-editor.js (modified) (1 diff)
-
trunk/js/block-editor/build/style-block-editor.css (modified) (1 diff)
-
trunk/js/icon.js (modified) (1 diff)
-
trunk/js/time.js (modified) (2 diffs)
-
trunk/meta-box.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
meta-box/tags/5.11.2/inc/core.php
r3401868 r3475210 4 4 add_filter( 'plugin_action_links_meta-box/meta-box.php', [ $this, 'plugin_links' ], 20 ); 5 5 6 // Uses priority 20 to support custom po rt types registered using the default priority.6 // Uses priority 20 to support custom post types registered using the default priority. 7 7 add_action( 'init', [ $this, 'register_meta_boxes' ], 20 ); 8 8 add_action( 'edit_page_form', [ $this, 'fix_page_template' ] ); -
meta-box/tags/5.11.2/inc/fields/block-editor.php
r3451809 r3475210 34 34 'editor_settings' => $editor_settings, 35 35 ] ); 36 37 // Load block categories. 38 wp_add_inline_script( 39 'wp-blocks', 40 sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $block_editor_context ) ) ), 41 'after' 42 ); 43 44 // Preload server-registered block schemas. 45 wp_add_inline_script( 46 'wp-blocks', 47 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings(), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ');' 48 ); 49 50 // Load 3rd party blocks. 51 add_filter( 'should_load_block_editor_scripts_and_styles', '__return_true' ); 52 53 if ( ! did_action( 'enqueue_block_editor_assets' ) ) { 54 do_action( 'enqueue_block_editor_assets' ); 55 } 36 56 } 37 57 -
meta-box/tags/5.11.2/inc/fields/file.php
r3391539 r3475210 52 52 $result = wp_delete_attachment( $attachment ); 53 53 } else { 54 $path = str_replace( home_url( '/' ), trailingslashit( ABSPATH ), $attachment ); 55 $result = unlink( $path ); // phpcs:ignore WordPress.WP.AlternativeFunctions.unlink_unlink 54 $path = str_replace( home_url( '/' ), trailingslashit( ABSPATH ), $attachment ); 55 56 // Security: validate resolved path is within $field['upload_dir'] directory. 57 $real_path = realpath( $path ); 58 $real_path = wp_normalize_path( $real_path ); 59 $allowed_base = ! empty( $field['upload_dir'] ) ? trailingslashit( wp_normalize_path( $field['upload_dir'] ) ) : ''; 60 if ( ! $real_path || ! $allowed_base || ! str_starts_with( $real_path, $allowed_base ) ) { 61 wp_send_json_error( __( 'Error: The file is outside the allowed upload directory', 'meta-box' ) ); 62 } 63 64 $result = unlink( $real_path ); // phpcs:ignore WordPress.WP.AlternativeFunctions.unlink_unlink 56 65 } 57 66 -
meta-box/tags/5.11.2/inc/fields/time.php
r3391539 r3475210 21 21 $field = parent::normalize( $field ); 22 22 $field['js_options']['timeFormat'] = empty( $field['format'] ) ? $field['js_options']['timeFormat'] : $field['format']; 23 // This field does not support timestamp. 24 // Prevent the timestamp from being set to true, like switching from a date field to a time field in the builder. 25 if ( isset( $field['timestamp'] ) ) { 26 $field['timestamp'] = false; 27 } 28 23 29 return $field; 24 30 } -
meta-box/tags/5.11.2/inc/loader.php
r3451809 r3475210 8 8 protected function constants() { 9 9 // Script version, used to add version for scripts and styles. 10 define( 'RWMB_VER', '5.11. 1' );10 define( 'RWMB_VER', '5.11.2' ); 11 11 12 12 list( $path, $url ) = self::get_path( dirname( __DIR__ ) ); -
meta-box/tags/5.11.2/inc/sanitizer.php
r3440139 r3475210 84 84 'video' => [ $this, 'sanitize_object' ], 85 85 'wysiwyg' => 'wp_kses_post', 86 'block_editor' => 'wp_kses_post',87 86 ]; 88 87 … … 206 205 */ 207 206 private function sanitize_file( $value, $field ) { 208 return $field['upload_dir'] ? array_map( 'esc_url_raw', $value ) : $this->sanitize_object( $value ); 207 if ( ! $field['upload_dir'] ) { 208 return $this->sanitize_object( $value ); 209 } 210 211 // Security: sanitize URLs and reject path traversal sequences. 212 return array_filter( array_map( function ( $url ) { 213 return str_contains( $url, '..' ) ? '' : esc_url_raw( $url ); 214 }, $value ) ); 209 215 } 210 216 -
meta-box/tags/5.11.2/js/block-editor/build/block-editor.asset.php
r3451809 r3475210 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-format-library', 'wp-i18n', 'wp-media-utils', 'wp-primitives'), 'version' => ' 54b94dd750fd475c5136');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-format-library', 'wp-i18n', 'wp-media-utils', 'wp-primitives'), 'version' => '025c2e5baa0baf143b8f'); -
meta-box/tags/5.11.2/js/block-editor/build/block-editor.js
r3451809 r3475210 1 (()=>{"use strict";var e,o={ 471(){const e=window.wp.blockLibrary,o=window.wp.element,t=(window.wp.formatLibrary,window.wp.blockEditor),r=window.wp.blocks,s=window.wp.components,l=window.wp.compose,i=window.wp.i18n,n=window.wp.primitives,a=window.ReactJSXRuntime;var c=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})}),d=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})}),w=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})}),m=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});const b=window.wp.coreData,h=window.wp.data,v=window.wp.mediaUtils;function p({textarea:e}){const{value:n,setValue:p,hasUndo:u,hasRedo:x,undo:k,redo:g}=(0,l.useStateWithHistory)({blocks:(j=e.value,j.includes("\x3c!--")?(0,r.parse)(j):(0,r.rawHandler)({HTML:j}))});var j;const[f,y]=(0,o.useReducer)(e=>!e,!1),[_,B]=(0,o.useReducer)(e=>!e,!1),H=o=>{p({blocks:o}),e.value=(0,r.serialize)(o)},E=JSON.parse(e.dataset.settings),S=(({allowed_blocks:e})=>(0,h.useSelect)(o=>{const t=rwmbBlockEditor.editor_settings;Array.isArray(e)&&e.length>0&&(t.allowedBlockTypes=e);let r=o(b.store).canUser("create","media");return r=r||!1!==r,r?(t.mediaUpload=({onError:e,...o})=>{(0,v.uploadMedia)({wpAllowedMimeTypes:t.allowedMimeTypes,onError:({message:o})=>e(o),...o})},t):t}))(E);(0,o.useEffect)(()=>(document.body.style.overflow=_?"hidden":"",()=>{document.body.style.overflow=""}),[_]);const z=(0,a.jsxs)(t.BlockEditorProvider,{value:n.blocks,onChange:H,onInput:H,settings:S,children:[(0,a.jsxs)(s.Flex,{justify:"space-between",className:"rwmb-block-editor__toolbar",children:[(0,a.jsxs)(s.Flex,{justify:"flex-start",children:[(0,a.jsx)(t.Inserter,{toggleProps:{size:"compact",variant:"primary"}}),(0,a.jsx)(s.Button,{onClick:k,disabled:!u,accessibleWhenDisabled:!0,icon:c,label:(0,i.__)("Undo","meta-box"),size:"compact"}),(0,a.jsx)(s.Button,{onClick:g,disabled:!x,accessibleWhenDisabled:!0,icon:d,label:(0,i.__)("Redo","meta-box"),size:"compact"}),(0,a.jsx)(t.BlockNavigationDropdown,{})]}),(0,a.jsxs)(s.Flex,{justify:"flex-end",children:[(0,a.jsx)(s.Button,{icon:w,"aria-pressed":_,label:(0,i.__)("Toggle Fullscreen","meta-box"),size:"compact",onClick:B}),(0,a.jsx)(s.Button,{icon:m,"aria-pressed":f,label:(0,i.__)("Toggle Sidebar","meta-box"),size:"compact",onClick:y})]})]}),(0,a.jsxs)(s.Flex,{gap:0,align:"stretch",className:"rwmb-block-editor__main",children:[(0,a.jsx)("div",{className:"rwmb-block-editor__content",style:{height:E.height},children:(0,a.jsx)(t.BlockTools,{children:(0,a.jsx)(t.WritingFlow,{children:(0,a.jsx)(t.BlockList,{})})})}),f&&(0,a.jsx)("div",{className:"rwmb-block-editor__sidebar",children:(0,a.jsx)(t.BlockInspector,{})})]})]});return _?(0,o.createPortal)((0,a.jsx)("div",{className:"rwmb-block-editor__canvas rwmb-block-editor__canvas--fullscreen",children:z}),(()=>{let e=document.getElementById("rwmb-block-editor-portal");return e||(e=document.createElement("div"),e.id="rwmb-block-editor-portal",document.body.appendChild(e)),e})()):(0,a.jsx)("div",{className:"rwmb-block-editor__canvas",children:z})}(0,e.registerCoreBlocks)();const u=e=>{const t=e.nextElementSibling;t&&t.classList.contains("rwmb-block-editor")&&t.remove(),function(e){const t=document.createElement("div");t.classList.add("rwmb-block-editor");const r=(0,o.createRoot)(t);e.parentNode.insertBefore(t,e.nextSibling),e.style.display="none",r.render((0,a.jsx)(p,{textarea:e}))}(e)};rwmb.$document.on("mb_ready",()=>{document.querySelectorAll(".rwmb-block_editor-wrapper textarea").forEach(u)}).on("clone",".rwmb-block_editor",function(){setTimeout(()=>u(this),200)})}},t={};function r(e){var s=t[e];if(void 0!==s)return s.exports;var l=t[e]={exports:{}};return o[e](l,l.exports,r),l.exports}r.m=o,e=[],r.O=(o,t,s,l)=>{if(!t){var i=1/0;for(d=0;d<e.length;d++){for(var[t,s,l]=e[d],n=!0,a=0;a<t.length;a++)(!1&l||i>=l)&&Object.keys(r.O).every(e=>r.O[e](t[a]))?t.splice(a--,1):(n=!1,l<i&&(i=l));if(n){e.splice(d--,1);var c=s();void 0!==c&&(o=c)}}return o}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[t,s,l]},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={640:0,281:0};r.O.j=o=>0===e[o];var o=(o,t)=>{var s,l,[i,n,a]=t,c=0;if(i.some(o=>0!==e[o])){for(s in n)r.o(n,s)&&(r.m[s]=n[s]);if(a)var d=a(r)}for(o&&o(t);c<i.length;c++)l=i[c],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(d)},t=globalThis.webpackChunk=globalThis.webpackChunk||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var s=r.O(void 0,[281],()=>r(471));s=r.O(s)})();1 (()=>{"use strict";var e,o={813(){const e=window.wp.blockLibrary,o=window.wp.element,t=(window.wp.formatLibrary,window.wp.blockEditor),r=window.wp.blocks,s=window.wp.components,l=window.wp.compose,i=window.wp.i18n,n=window.wp.primitives,a=window.ReactJSXRuntime;var c=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})}),d=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})}),w=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})}),m=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});const b=window.wp.coreData,h=window.wp.data,v=window.wp.mediaUtils;function p({textarea:e}){const{value:n,setValue:p,hasUndo:u,hasRedo:x,undo:k,redo:g}=(0,l.useStateWithHistory)({blocks:(j=e.value,j.includes("\x3c!--")?(0,r.parse)(j):(0,r.rawHandler)({HTML:j}))});var j;const[f,y]=(0,o.useReducer)(e=>!e,!1),[_,B]=(0,o.useReducer)(e=>!e,!1),H=o=>{p({blocks:o}),e.value=(0,r.serialize)(o)},E=JSON.parse(e.dataset.settings),S=(({allowed_blocks:e})=>(0,h.useSelect)(o=>{const t=rwmbBlockEditor.editor_settings;Array.isArray(e)&&e.length>0&&(t.allowedBlockTypes=e);let r=o(b.store).canUser("create","media");return r=r||!1!==r,r?(t.mediaUpload=({onError:e,...o})=>{(0,v.uploadMedia)({wpAllowedMimeTypes:t.allowedMimeTypes,onError:({message:o})=>e(o),...o})},t):t}))(E);(0,o.useEffect)(()=>(document.body.style.overflow=_?"hidden":"",()=>{document.body.style.overflow=""}),[_]);const z=(0,a.jsxs)(t.BlockEditorProvider,{value:n.blocks,onChange:H,onInput:H,settings:S,children:[(0,a.jsxs)(s.Flex,{justify:"space-between",className:"rwmb-block-editor__toolbar",children:[(0,a.jsxs)(s.Flex,{justify:"flex-start",children:[(0,a.jsx)(t.Inserter,{toggleProps:{size:"compact",variant:"primary"}}),(0,a.jsx)(s.Button,{onClick:k,disabled:!u,accessibleWhenDisabled:!0,icon:c,label:(0,i.__)("Undo","meta-box"),size:"compact"}),(0,a.jsx)(s.Button,{onClick:g,disabled:!x,accessibleWhenDisabled:!0,icon:d,label:(0,i.__)("Redo","meta-box"),size:"compact"}),(0,a.jsx)(t.BlockNavigationDropdown,{})]}),(0,a.jsxs)(s.Flex,{justify:"flex-end",children:[(0,a.jsx)(s.Button,{icon:w,"aria-pressed":_,label:(0,i.__)("Toggle Fullscreen","meta-box"),size:"compact",onClick:B}),(0,a.jsx)(s.Button,{icon:m,"aria-pressed":f,label:(0,i.__)("Toggle Sidebar","meta-box"),size:"compact",onClick:y})]})]}),(0,a.jsxs)(s.Flex,{gap:0,align:"stretch",className:"rwmb-block-editor__main",children:[(0,a.jsx)("div",{className:"rwmb-block-editor__content",style:{minHeight:E.height},children:(0,a.jsx)(t.BlockTools,{children:(0,a.jsx)(t.WritingFlow,{children:(0,a.jsx)(t.BlockList,{})})})}),f&&(0,a.jsx)("div",{className:"rwmb-block-editor__sidebar",children:(0,a.jsx)(t.BlockInspector,{})})]}),(0,a.jsx)(t.BlockBreadcrumb,{})]});return _?(0,o.createPortal)((0,a.jsx)("div",{className:"rwmb-block-editor__canvas rwmb-block-editor__canvas--fullscreen",children:z}),(()=>{let e=document.getElementById("rwmb-block-editor-portal");return e||(e=document.createElement("div"),e.id="rwmb-block-editor-portal",document.body.appendChild(e)),e})()):(0,a.jsx)("div",{className:"rwmb-block-editor__canvas",children:z})}(0,e.registerCoreBlocks)();const u=e=>{const t=e.nextElementSibling;t&&t.classList.contains("rwmb-block-editor")&&t.remove(),function(e){const t=document.createElement("div");t.classList.add("rwmb-block-editor");const r=(0,o.createRoot)(t);e.parentNode.insertBefore(t,e.nextSibling),e.style.display="none",r.render((0,a.jsx)(p,{textarea:e}))}(e)};rwmb.$document.on("mb_ready",()=>{document.querySelectorAll(".rwmb-block_editor-wrapper textarea").forEach(u)}).on("clone",".rwmb-block_editor",function(){setTimeout(()=>u(this),200)})}},t={};function r(e){var s=t[e];if(void 0!==s)return s.exports;var l=t[e]={exports:{}};return o[e](l,l.exports,r),l.exports}r.m=o,e=[],r.O=(o,t,s,l)=>{if(!t){var i=1/0;for(d=0;d<e.length;d++){for(var[t,s,l]=e[d],n=!0,a=0;a<t.length;a++)(!1&l||i>=l)&&Object.keys(r.O).every(e=>r.O[e](t[a]))?t.splice(a--,1):(n=!1,l<i&&(i=l));if(n){e.splice(d--,1);var c=s();void 0!==c&&(o=c)}}return o}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[t,s,l]},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={640:0,281:0};r.O.j=o=>0===e[o];var o=(o,t)=>{var s,l,[i,n,a]=t,c=0;if(i.some(o=>0!==e[o])){for(s in n)r.o(n,s)&&(r.m[s]=n[s]);if(a)var d=a(r)}for(o&&o(t);c<i.length;c++)l=i[c],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(d)},t=globalThis.webpackChunk=globalThis.webpackChunk||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var s=r.O(void 0,[281],()=>r(813));s=r.O(s)})(); -
meta-box/tags/5.11.2/js/block-editor/build/style-block-editor.css
r3451809 r3475210 1 .rwmb-block-editor{background:#fff;border:1px solid #ddd}.rwmb-block-editor__canvas{display:flex;flex-direction:column}.rwmb-block-editor__canvas--fullscreen{background:#fff;inset:0;position:fixed;z-index:999998}.rwmb-block-editor__canvas--fullscreen .rwmb-block-editor__content{height:100%!important;resize:none}.rwmb-block-editor__ toolbar{border-bottom:1px solid #ddd;box-sizing:border-box;height:46px;padding-inline:8px}.rwmb-block-editor__toolbar .components-accessible-toolbar.block-editor-block-contextual-toolbar{box-shadow:none}.rwmb-block-editor__main{flex:1}.rwmb-block-editor__content{box-sizing:border-box;flex:1;overflow:hidden;padding-inline:8px;resize:vertical}.rwmb-block-editor__sidebar{border-left:1px solid #ddd;box-sizing:border-box;width:240px}#poststuff .rwmb-block-editor .block-editor-block-inspector h2{padding:0}#poststuff .rwmb-block-editor .components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 5px}.components-popover.block-editor-inserter__popover{z-index:999999}.components-popover__content{overflow-x:hidden!important}1 .rwmb-block-editor{background:#fff;border:1px solid #ddd}.rwmb-block-editor__canvas{display:flex;flex-direction:column}.rwmb-block-editor__canvas--fullscreen{background:#fff;inset:0;position:fixed;z-index:999998}.rwmb-block-editor__canvas--fullscreen .rwmb-block-editor__content{height:100%!important;resize:none}.rwmb-block-editor__canvas .block-editor-block-breadcrumb{border-top:1px solid #ddd;padding-block:4px}.rwmb-block-editor__toolbar{border-bottom:1px solid #ddd;box-sizing:border-box;height:46px;padding-inline:8px}.rwmb-block-editor__toolbar .components-accessible-toolbar.block-editor-block-contextual-toolbar{box-shadow:none}.rwmb-block-editor__main{flex:1}.rwmb-block-editor__content{box-sizing:border-box;flex:1;overflow:hidden;padding-inline:8px;resize:vertical}.rwmb-block-editor__sidebar{border-left:1px solid #ddd;box-sizing:border-box;width:240px}#poststuff .rwmb-block-editor .block-editor-block-inspector h2{padding:0}#poststuff .rwmb-block-editor .components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 5px}.components-popover.block-editor-inserter__popover{z-index:999999}.components-popover__content{overflow-x:hidden!important} -
meta-box/tags/5.11.2/js/icon.js
r2999828 r3475210 8 8 const template = option => { 9 9 if ( option.text.includes( '<svg' ) ) { 10 const title = option.text.replace( /<svg.*?>.*?<\/svg>/, '' ); 11 return $( `<span class="rwmb-icon-select" title="${ title }">${ option.text }</span>` ); 10 const title = option.text.replace( /<svg.*?>.*?<\/svg>/s, '' ); 11 const $span = $( '<span>', { class: 'rwmb-icon-select', title } ); 12 $span.html( option.text ); 13 return $span; 12 14 } 13 15 -
meta-box/tags/5.11.2/js/time.js
r3220512 r3475210 9 9 options = $this.data( 'options' ), 10 10 current = $this.val(); 11 current = formatTime( current );12 11 13 12 $this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text … … 40 39 } 41 40 42 const formatTime = time => {43 if ( !time.includes( ':' ) ) {44 return time;45 }46 let [ hours, minutes ] = time.split( ':' );47 hours = hours.padStart( 2, '0' );48 minutes = minutes.padStart( 2, '0' );49 50 return `${ hours }:${ minutes }`;51 };52 53 41 // Set language if available 54 42 function setTimeI18n() { -
meta-box/tags/5.11.2/meta-box.php
r3451809 r3475210 4 4 * Plugin URI: https://metabox.io 5 5 * Description: Create custom meta boxes and custom fields in WordPress. 6 * Version: 5.11. 16 * Version: 5.11.2 7 7 * Author: MetaBox.io 8 8 * Author URI: https://metabox.io -
meta-box/tags/5.11.2/readme.txt
r3451809 r3475210 5 5 Requires at least: 6.5 6 6 Requires PHP: 7.1 7 Tested up to: 6.9 8 Stable tag: 5.11. 17 Tested up to: 6.9.1 8 Stable tag: 5.11.2 9 9 License: GPLv2 or later 10 10 … … 149 149 == Changelog == 150 150 151 = 5.11.2 - 2026-03-05 = 152 153 **Improvements for the block editor field:** 154 155 - Add breadcrumbs 156 - Fix compatibility with Block Visibility plugin 157 - Fix not loading 3rd-party blocks 158 - Improve the CSS 159 160 **Other changes:** 161 162 - Fix save time format for the datetime field 163 - Fix icon field dropdown broken display when SVG contains double quotes 164 - Fix path traversal in `ajax_delete_file` for security 165 - Fix timestamp should not be set for the time picker field 166 151 167 = 5.11.1 - 2026-02-02 = 152 168 … … 165 181 - Fix conflicts with `image_advanced` and `file_advanced` fields 166 182 167 ** Other changes:**183 **Other changes:** 168 184 169 185 - Fix cannot create new terms with required date/time fields -
meta-box/tags/5.11.2/vendor/composer/installed.php
r3451809 r3475210 2 2 'root' => array( 3 3 'name' => 'wpmetabox/meta-box', 4 'pretty_version' => '5.11. 1',5 'version' => '5.11. 1.0',6 'reference' => '2 1cc88efff8892a93a8218ba1b00a142eabb0d86',4 'pretty_version' => '5.11.2', 5 'version' => '5.11.2.0', 6 'reference' => '270c63653de72c4677b99450551fcd71fbf84b93', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'wpmetabox/meta-box' => array( 14 'pretty_version' => '5.11. 1',15 'version' => '5.11. 1.0',16 'reference' => '2 1cc88efff8892a93a8218ba1b00a142eabb0d86',14 'pretty_version' => '5.11.2', 15 'version' => '5.11.2.0', 16 'reference' => '270c63653de72c4677b99450551fcd71fbf84b93', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
meta-box/trunk/inc/core.php
r3401868 r3475210 4 4 add_filter( 'plugin_action_links_meta-box/meta-box.php', [ $this, 'plugin_links' ], 20 ); 5 5 6 // Uses priority 20 to support custom po rt types registered using the default priority.6 // Uses priority 20 to support custom post types registered using the default priority. 7 7 add_action( 'init', [ $this, 'register_meta_boxes' ], 20 ); 8 8 add_action( 'edit_page_form', [ $this, 'fix_page_template' ] ); -
meta-box/trunk/inc/fields/block-editor.php
r3451809 r3475210 34 34 'editor_settings' => $editor_settings, 35 35 ] ); 36 37 // Load block categories. 38 wp_add_inline_script( 39 'wp-blocks', 40 sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $block_editor_context ) ) ), 41 'after' 42 ); 43 44 // Preload server-registered block schemas. 45 wp_add_inline_script( 46 'wp-blocks', 47 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings(), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ');' 48 ); 49 50 // Load 3rd party blocks. 51 add_filter( 'should_load_block_editor_scripts_and_styles', '__return_true' ); 52 53 if ( ! did_action( 'enqueue_block_editor_assets' ) ) { 54 do_action( 'enqueue_block_editor_assets' ); 55 } 36 56 } 37 57 -
meta-box/trunk/inc/fields/file.php
r3391539 r3475210 52 52 $result = wp_delete_attachment( $attachment ); 53 53 } else { 54 $path = str_replace( home_url( '/' ), trailingslashit( ABSPATH ), $attachment ); 55 $result = unlink( $path ); // phpcs:ignore WordPress.WP.AlternativeFunctions.unlink_unlink 54 $path = str_replace( home_url( '/' ), trailingslashit( ABSPATH ), $attachment ); 55 56 // Security: validate resolved path is within $field['upload_dir'] directory. 57 $real_path = realpath( $path ); 58 $real_path = wp_normalize_path( $real_path ); 59 $allowed_base = ! empty( $field['upload_dir'] ) ? trailingslashit( wp_normalize_path( $field['upload_dir'] ) ) : ''; 60 if ( ! $real_path || ! $allowed_base || ! str_starts_with( $real_path, $allowed_base ) ) { 61 wp_send_json_error( __( 'Error: The file is outside the allowed upload directory', 'meta-box' ) ); 62 } 63 64 $result = unlink( $real_path ); // phpcs:ignore WordPress.WP.AlternativeFunctions.unlink_unlink 56 65 } 57 66 -
meta-box/trunk/inc/fields/time.php
r3391539 r3475210 21 21 $field = parent::normalize( $field ); 22 22 $field['js_options']['timeFormat'] = empty( $field['format'] ) ? $field['js_options']['timeFormat'] : $field['format']; 23 // This field does not support timestamp. 24 // Prevent the timestamp from being set to true, like switching from a date field to a time field in the builder. 25 if ( isset( $field['timestamp'] ) ) { 26 $field['timestamp'] = false; 27 } 28 23 29 return $field; 24 30 } -
meta-box/trunk/inc/loader.php
r3451809 r3475210 8 8 protected function constants() { 9 9 // Script version, used to add version for scripts and styles. 10 define( 'RWMB_VER', '5.11. 1' );10 define( 'RWMB_VER', '5.11.2' ); 11 11 12 12 list( $path, $url ) = self::get_path( dirname( __DIR__ ) ); -
meta-box/trunk/inc/sanitizer.php
r3440139 r3475210 84 84 'video' => [ $this, 'sanitize_object' ], 85 85 'wysiwyg' => 'wp_kses_post', 86 'block_editor' => 'wp_kses_post',87 86 ]; 88 87 … … 206 205 */ 207 206 private function sanitize_file( $value, $field ) { 208 return $field['upload_dir'] ? array_map( 'esc_url_raw', $value ) : $this->sanitize_object( $value ); 207 if ( ! $field['upload_dir'] ) { 208 return $this->sanitize_object( $value ); 209 } 210 211 // Security: sanitize URLs and reject path traversal sequences. 212 return array_filter( array_map( function ( $url ) { 213 return str_contains( $url, '..' ) ? '' : esc_url_raw( $url ); 214 }, $value ) ); 209 215 } 210 216 -
meta-box/trunk/js/block-editor/build/block-editor.asset.php
r3451809 r3475210 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-format-library', 'wp-i18n', 'wp-media-utils', 'wp-primitives'), 'version' => ' 54b94dd750fd475c5136');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-format-library', 'wp-i18n', 'wp-media-utils', 'wp-primitives'), 'version' => '025c2e5baa0baf143b8f'); -
meta-box/trunk/js/block-editor/build/block-editor.js
r3451809 r3475210 1 (()=>{"use strict";var e,o={ 471(){const e=window.wp.blockLibrary,o=window.wp.element,t=(window.wp.formatLibrary,window.wp.blockEditor),r=window.wp.blocks,s=window.wp.components,l=window.wp.compose,i=window.wp.i18n,n=window.wp.primitives,a=window.ReactJSXRuntime;var c=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})}),d=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})}),w=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})}),m=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});const b=window.wp.coreData,h=window.wp.data,v=window.wp.mediaUtils;function p({textarea:e}){const{value:n,setValue:p,hasUndo:u,hasRedo:x,undo:k,redo:g}=(0,l.useStateWithHistory)({blocks:(j=e.value,j.includes("\x3c!--")?(0,r.parse)(j):(0,r.rawHandler)({HTML:j}))});var j;const[f,y]=(0,o.useReducer)(e=>!e,!1),[_,B]=(0,o.useReducer)(e=>!e,!1),H=o=>{p({blocks:o}),e.value=(0,r.serialize)(o)},E=JSON.parse(e.dataset.settings),S=(({allowed_blocks:e})=>(0,h.useSelect)(o=>{const t=rwmbBlockEditor.editor_settings;Array.isArray(e)&&e.length>0&&(t.allowedBlockTypes=e);let r=o(b.store).canUser("create","media");return r=r||!1!==r,r?(t.mediaUpload=({onError:e,...o})=>{(0,v.uploadMedia)({wpAllowedMimeTypes:t.allowedMimeTypes,onError:({message:o})=>e(o),...o})},t):t}))(E);(0,o.useEffect)(()=>(document.body.style.overflow=_?"hidden":"",()=>{document.body.style.overflow=""}),[_]);const z=(0,a.jsxs)(t.BlockEditorProvider,{value:n.blocks,onChange:H,onInput:H,settings:S,children:[(0,a.jsxs)(s.Flex,{justify:"space-between",className:"rwmb-block-editor__toolbar",children:[(0,a.jsxs)(s.Flex,{justify:"flex-start",children:[(0,a.jsx)(t.Inserter,{toggleProps:{size:"compact",variant:"primary"}}),(0,a.jsx)(s.Button,{onClick:k,disabled:!u,accessibleWhenDisabled:!0,icon:c,label:(0,i.__)("Undo","meta-box"),size:"compact"}),(0,a.jsx)(s.Button,{onClick:g,disabled:!x,accessibleWhenDisabled:!0,icon:d,label:(0,i.__)("Redo","meta-box"),size:"compact"}),(0,a.jsx)(t.BlockNavigationDropdown,{})]}),(0,a.jsxs)(s.Flex,{justify:"flex-end",children:[(0,a.jsx)(s.Button,{icon:w,"aria-pressed":_,label:(0,i.__)("Toggle Fullscreen","meta-box"),size:"compact",onClick:B}),(0,a.jsx)(s.Button,{icon:m,"aria-pressed":f,label:(0,i.__)("Toggle Sidebar","meta-box"),size:"compact",onClick:y})]})]}),(0,a.jsxs)(s.Flex,{gap:0,align:"stretch",className:"rwmb-block-editor__main",children:[(0,a.jsx)("div",{className:"rwmb-block-editor__content",style:{height:E.height},children:(0,a.jsx)(t.BlockTools,{children:(0,a.jsx)(t.WritingFlow,{children:(0,a.jsx)(t.BlockList,{})})})}),f&&(0,a.jsx)("div",{className:"rwmb-block-editor__sidebar",children:(0,a.jsx)(t.BlockInspector,{})})]})]});return _?(0,o.createPortal)((0,a.jsx)("div",{className:"rwmb-block-editor__canvas rwmb-block-editor__canvas--fullscreen",children:z}),(()=>{let e=document.getElementById("rwmb-block-editor-portal");return e||(e=document.createElement("div"),e.id="rwmb-block-editor-portal",document.body.appendChild(e)),e})()):(0,a.jsx)("div",{className:"rwmb-block-editor__canvas",children:z})}(0,e.registerCoreBlocks)();const u=e=>{const t=e.nextElementSibling;t&&t.classList.contains("rwmb-block-editor")&&t.remove(),function(e){const t=document.createElement("div");t.classList.add("rwmb-block-editor");const r=(0,o.createRoot)(t);e.parentNode.insertBefore(t,e.nextSibling),e.style.display="none",r.render((0,a.jsx)(p,{textarea:e}))}(e)};rwmb.$document.on("mb_ready",()=>{document.querySelectorAll(".rwmb-block_editor-wrapper textarea").forEach(u)}).on("clone",".rwmb-block_editor",function(){setTimeout(()=>u(this),200)})}},t={};function r(e){var s=t[e];if(void 0!==s)return s.exports;var l=t[e]={exports:{}};return o[e](l,l.exports,r),l.exports}r.m=o,e=[],r.O=(o,t,s,l)=>{if(!t){var i=1/0;for(d=0;d<e.length;d++){for(var[t,s,l]=e[d],n=!0,a=0;a<t.length;a++)(!1&l||i>=l)&&Object.keys(r.O).every(e=>r.O[e](t[a]))?t.splice(a--,1):(n=!1,l<i&&(i=l));if(n){e.splice(d--,1);var c=s();void 0!==c&&(o=c)}}return o}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[t,s,l]},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={640:0,281:0};r.O.j=o=>0===e[o];var o=(o,t)=>{var s,l,[i,n,a]=t,c=0;if(i.some(o=>0!==e[o])){for(s in n)r.o(n,s)&&(r.m[s]=n[s]);if(a)var d=a(r)}for(o&&o(t);c<i.length;c++)l=i[c],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(d)},t=globalThis.webpackChunk=globalThis.webpackChunk||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var s=r.O(void 0,[281],()=>r(471));s=r.O(s)})();1 (()=>{"use strict";var e,o={813(){const e=window.wp.blockLibrary,o=window.wp.element,t=(window.wp.formatLibrary,window.wp.blockEditor),r=window.wp.blocks,s=window.wp.components,l=window.wp.compose,i=window.wp.i18n,n=window.wp.primitives,a=window.ReactJSXRuntime;var c=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})}),d=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})}),w=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"})}),m=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});const b=window.wp.coreData,h=window.wp.data,v=window.wp.mediaUtils;function p({textarea:e}){const{value:n,setValue:p,hasUndo:u,hasRedo:x,undo:k,redo:g}=(0,l.useStateWithHistory)({blocks:(j=e.value,j.includes("\x3c!--")?(0,r.parse)(j):(0,r.rawHandler)({HTML:j}))});var j;const[f,y]=(0,o.useReducer)(e=>!e,!1),[_,B]=(0,o.useReducer)(e=>!e,!1),H=o=>{p({blocks:o}),e.value=(0,r.serialize)(o)},E=JSON.parse(e.dataset.settings),S=(({allowed_blocks:e})=>(0,h.useSelect)(o=>{const t=rwmbBlockEditor.editor_settings;Array.isArray(e)&&e.length>0&&(t.allowedBlockTypes=e);let r=o(b.store).canUser("create","media");return r=r||!1!==r,r?(t.mediaUpload=({onError:e,...o})=>{(0,v.uploadMedia)({wpAllowedMimeTypes:t.allowedMimeTypes,onError:({message:o})=>e(o),...o})},t):t}))(E);(0,o.useEffect)(()=>(document.body.style.overflow=_?"hidden":"",()=>{document.body.style.overflow=""}),[_]);const z=(0,a.jsxs)(t.BlockEditorProvider,{value:n.blocks,onChange:H,onInput:H,settings:S,children:[(0,a.jsxs)(s.Flex,{justify:"space-between",className:"rwmb-block-editor__toolbar",children:[(0,a.jsxs)(s.Flex,{justify:"flex-start",children:[(0,a.jsx)(t.Inserter,{toggleProps:{size:"compact",variant:"primary"}}),(0,a.jsx)(s.Button,{onClick:k,disabled:!u,accessibleWhenDisabled:!0,icon:c,label:(0,i.__)("Undo","meta-box"),size:"compact"}),(0,a.jsx)(s.Button,{onClick:g,disabled:!x,accessibleWhenDisabled:!0,icon:d,label:(0,i.__)("Redo","meta-box"),size:"compact"}),(0,a.jsx)(t.BlockNavigationDropdown,{})]}),(0,a.jsxs)(s.Flex,{justify:"flex-end",children:[(0,a.jsx)(s.Button,{icon:w,"aria-pressed":_,label:(0,i.__)("Toggle Fullscreen","meta-box"),size:"compact",onClick:B}),(0,a.jsx)(s.Button,{icon:m,"aria-pressed":f,label:(0,i.__)("Toggle Sidebar","meta-box"),size:"compact",onClick:y})]})]}),(0,a.jsxs)(s.Flex,{gap:0,align:"stretch",className:"rwmb-block-editor__main",children:[(0,a.jsx)("div",{className:"rwmb-block-editor__content",style:{minHeight:E.height},children:(0,a.jsx)(t.BlockTools,{children:(0,a.jsx)(t.WritingFlow,{children:(0,a.jsx)(t.BlockList,{})})})}),f&&(0,a.jsx)("div",{className:"rwmb-block-editor__sidebar",children:(0,a.jsx)(t.BlockInspector,{})})]}),(0,a.jsx)(t.BlockBreadcrumb,{})]});return _?(0,o.createPortal)((0,a.jsx)("div",{className:"rwmb-block-editor__canvas rwmb-block-editor__canvas--fullscreen",children:z}),(()=>{let e=document.getElementById("rwmb-block-editor-portal");return e||(e=document.createElement("div"),e.id="rwmb-block-editor-portal",document.body.appendChild(e)),e})()):(0,a.jsx)("div",{className:"rwmb-block-editor__canvas",children:z})}(0,e.registerCoreBlocks)();const u=e=>{const t=e.nextElementSibling;t&&t.classList.contains("rwmb-block-editor")&&t.remove(),function(e){const t=document.createElement("div");t.classList.add("rwmb-block-editor");const r=(0,o.createRoot)(t);e.parentNode.insertBefore(t,e.nextSibling),e.style.display="none",r.render((0,a.jsx)(p,{textarea:e}))}(e)};rwmb.$document.on("mb_ready",()=>{document.querySelectorAll(".rwmb-block_editor-wrapper textarea").forEach(u)}).on("clone",".rwmb-block_editor",function(){setTimeout(()=>u(this),200)})}},t={};function r(e){var s=t[e];if(void 0!==s)return s.exports;var l=t[e]={exports:{}};return o[e](l,l.exports,r),l.exports}r.m=o,e=[],r.O=(o,t,s,l)=>{if(!t){var i=1/0;for(d=0;d<e.length;d++){for(var[t,s,l]=e[d],n=!0,a=0;a<t.length;a++)(!1&l||i>=l)&&Object.keys(r.O).every(e=>r.O[e](t[a]))?t.splice(a--,1):(n=!1,l<i&&(i=l));if(n){e.splice(d--,1);var c=s();void 0!==c&&(o=c)}}return o}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[t,s,l]},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={640:0,281:0};r.O.j=o=>0===e[o];var o=(o,t)=>{var s,l,[i,n,a]=t,c=0;if(i.some(o=>0!==e[o])){for(s in n)r.o(n,s)&&(r.m[s]=n[s]);if(a)var d=a(r)}for(o&&o(t);c<i.length;c++)l=i[c],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(d)},t=globalThis.webpackChunk=globalThis.webpackChunk||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var s=r.O(void 0,[281],()=>r(813));s=r.O(s)})(); -
meta-box/trunk/js/block-editor/build/style-block-editor.css
r3451809 r3475210 1 .rwmb-block-editor{background:#fff;border:1px solid #ddd}.rwmb-block-editor__canvas{display:flex;flex-direction:column}.rwmb-block-editor__canvas--fullscreen{background:#fff;inset:0;position:fixed;z-index:999998}.rwmb-block-editor__canvas--fullscreen .rwmb-block-editor__content{height:100%!important;resize:none}.rwmb-block-editor__ toolbar{border-bottom:1px solid #ddd;box-sizing:border-box;height:46px;padding-inline:8px}.rwmb-block-editor__toolbar .components-accessible-toolbar.block-editor-block-contextual-toolbar{box-shadow:none}.rwmb-block-editor__main{flex:1}.rwmb-block-editor__content{box-sizing:border-box;flex:1;overflow:hidden;padding-inline:8px;resize:vertical}.rwmb-block-editor__sidebar{border-left:1px solid #ddd;box-sizing:border-box;width:240px}#poststuff .rwmb-block-editor .block-editor-block-inspector h2{padding:0}#poststuff .rwmb-block-editor .components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 5px}.components-popover.block-editor-inserter__popover{z-index:999999}.components-popover__content{overflow-x:hidden!important}1 .rwmb-block-editor{background:#fff;border:1px solid #ddd}.rwmb-block-editor__canvas{display:flex;flex-direction:column}.rwmb-block-editor__canvas--fullscreen{background:#fff;inset:0;position:fixed;z-index:999998}.rwmb-block-editor__canvas--fullscreen .rwmb-block-editor__content{height:100%!important;resize:none}.rwmb-block-editor__canvas .block-editor-block-breadcrumb{border-top:1px solid #ddd;padding-block:4px}.rwmb-block-editor__toolbar{border-bottom:1px solid #ddd;box-sizing:border-box;height:46px;padding-inline:8px}.rwmb-block-editor__toolbar .components-accessible-toolbar.block-editor-block-contextual-toolbar{box-shadow:none}.rwmb-block-editor__main{flex:1}.rwmb-block-editor__content{box-sizing:border-box;flex:1;overflow:hidden;padding-inline:8px;resize:vertical}.rwmb-block-editor__sidebar{border-left:1px solid #ddd;box-sizing:border-box;width:240px}#poststuff .rwmb-block-editor .block-editor-block-inspector h2{padding:0}#poststuff .rwmb-block-editor .components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 5px}.components-popover.block-editor-inserter__popover{z-index:999999}.components-popover__content{overflow-x:hidden!important} -
meta-box/trunk/js/icon.js
r2999828 r3475210 8 8 const template = option => { 9 9 if ( option.text.includes( '<svg' ) ) { 10 const title = option.text.replace( /<svg.*?>.*?<\/svg>/, '' ); 11 return $( `<span class="rwmb-icon-select" title="${ title }">${ option.text }</span>` ); 10 const title = option.text.replace( /<svg.*?>.*?<\/svg>/s, '' ); 11 const $span = $( '<span>', { class: 'rwmb-icon-select', title } ); 12 $span.html( option.text ); 13 return $span; 12 14 } 13 15 -
meta-box/trunk/js/time.js
r3220512 r3475210 9 9 options = $this.data( 'options' ), 10 10 current = $this.val(); 11 current = formatTime( current );12 11 13 12 $this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text … … 40 39 } 41 40 42 const formatTime = time => {43 if ( !time.includes( ':' ) ) {44 return time;45 }46 let [ hours, minutes ] = time.split( ':' );47 hours = hours.padStart( 2, '0' );48 minutes = minutes.padStart( 2, '0' );49 50 return `${ hours }:${ minutes }`;51 };52 53 41 // Set language if available 54 42 function setTimeI18n() { -
meta-box/trunk/meta-box.php
r3451809 r3475210 4 4 * Plugin URI: https://metabox.io 5 5 * Description: Create custom meta boxes and custom fields in WordPress. 6 * Version: 5.11. 16 * Version: 5.11.2 7 7 * Author: MetaBox.io 8 8 * Author URI: https://metabox.io -
meta-box/trunk/readme.txt
r3451809 r3475210 5 5 Requires at least: 6.5 6 6 Requires PHP: 7.1 7 Tested up to: 6.9 8 Stable tag: 5.11. 17 Tested up to: 6.9.1 8 Stable tag: 5.11.2 9 9 License: GPLv2 or later 10 10 … … 149 149 == Changelog == 150 150 151 = 5.11.2 - 2026-03-05 = 152 153 **Improvements for the block editor field:** 154 155 - Add breadcrumbs 156 - Fix compatibility with Block Visibility plugin 157 - Fix not loading 3rd-party blocks 158 - Improve the CSS 159 160 **Other changes:** 161 162 - Fix save time format for the datetime field 163 - Fix icon field dropdown broken display when SVG contains double quotes 164 - Fix path traversal in `ajax_delete_file` for security 165 - Fix timestamp should not be set for the time picker field 166 151 167 = 5.11.1 - 2026-02-02 = 152 168 … … 165 181 - Fix conflicts with `image_advanced` and `file_advanced` fields 166 182 167 ** Other changes:**183 **Other changes:** 168 184 169 185 - Fix cannot create new terms with required date/time fields -
meta-box/trunk/vendor/composer/installed.php
r3451809 r3475210 2 2 'root' => array( 3 3 'name' => 'wpmetabox/meta-box', 4 'pretty_version' => '5.11. 1',5 'version' => '5.11. 1.0',6 'reference' => '2 1cc88efff8892a93a8218ba1b00a142eabb0d86',4 'pretty_version' => '5.11.2', 5 'version' => '5.11.2.0', 6 'reference' => '270c63653de72c4677b99450551fcd71fbf84b93', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'wpmetabox/meta-box' => array( 14 'pretty_version' => '5.11. 1',15 'version' => '5.11. 1.0',16 'reference' => '2 1cc88efff8892a93a8218ba1b00a142eabb0d86',14 'pretty_version' => '5.11.2', 15 'version' => '5.11.2.0', 16 'reference' => '270c63653de72c4677b99450551fcd71fbf84b93', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.