Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  Bump to 5.1.4
  Allow block CSS to load enqueue_block_assets fires on front-end
  Use global wp for accessing PLuginDocumentSettingsPanel
  • Loading branch information
lipemat committed Sep 6, 2024
2 parents c87c092 + ef418be commit d8e7c5e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.3
5.1.4
2 changes: 1 addition & 1 deletion js/dist/block-editor.js

Large diffs are not rendered by default.

Binary file modified js/dist/block-editor.js.br
Binary file not shown.
2 changes: 1 addition & 1 deletion js/dist/block-editor.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions js/dist/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
},
"block-editor.js": {
"src": "block-editor.js",
"integrity": "sha384-FwKsosfTR1O9soexpqVpJ+Om+jY/z874II4CkfrfyxEobZlIxg89wMWaaMAnTzUr",
"hash": "18c1db843acdea2aa703"
"integrity": "sha384-QVI/fv/KRcYE8n6R5PAFZN9wKSbloxsRWV2zLSBd4v67KwVKBalOsvgCDMSK9T+2",
"hash": "538193c31f7f8a79b72e"
},
"block-editor.js.LICENSE.txt": {
"src": "block-editor.js.LICENSE.txt",
Expand All @@ -26,12 +26,12 @@
},
"block-editor.js.br": {
"src": "block-editor.js.br",
"integrity": "sha384-Dyx1wJVVk7mCkqCMzAKdml4o2FHYoYOonU0DKGXzPmeMqrTo/HMBwMDMRddoO3nr",
"hash": "fb8dc0dfbdaaea73cfb2"
"integrity": "sha384-PmWlC+2yTO/LgGP/K1mBUFbOmiyKF+SApyzur/jTiGWWpdMJvVLBkfYpHZ89S/pc",
"hash": "62dd9111e9c57e1c78b2"
},
"block-editor.js.map": {
"src": "block-editor.js.map",
"integrity": "sha384-2CdBOw+vekkWnuS0b5LMt1DDzFjuTs3YFH3dziadLBEDmoVIiTqw1TiPOoZ0oIkx",
"hash": "76cf67023f2c086bfe12"
"integrity": "sha384-NtcuPmlYL6x8KXeKD7roi7bbjKF1fFegQSVyq7+0skyuHtWwTCs/b+hRxHb42Y6M",
"hash": "e6c17d4ddd7674fbe2da"
}
}
5 changes: 4 additions & 1 deletion js/src/gutenberg/meta-boxes/Taxonomy/WithTaxonomyPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import {PluginDocumentSettingPanel} from '@wordpress/edit-post';
import {__, sprintf} from '@wordpress/i18n';
import {useEntityRecord, useEntityRecords} from '@wordpress/core-data';
import {type ComponentType, type PropsWithChildren, useEffect} from 'react';
import type {Tag, Taxonomy} from '@wordpress/core-data/entities';
import {useTerms} from '@lipemat/js-boilerplate-gutenberg';
import {dispatch} from '@wordpress/data';

// @todo Remove this fallback when minimum WP version is 6.6.
// @ts-ignore
const PluginDocumentSettingPanel = window.wp.editor?.PluginDocumentSettingPanel ?? window.wp.editPost.PluginDocumentSettingPanel;

export type FromPanel = {
tax: Taxonomy<'edit'> | null;
terms: Tag<'edit'>[]
Expand Down
5 changes: 0 additions & 5 deletions src/Theme/Scripts/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,12 @@ public function admin_scripts(): void {
* 1. In block editors.
* 2. In iframe block editors.
* 3. On the front-end.
* We skip #3 because we want the block styles to load on the front-end
* after the front-end.css file is loaded.
*
* @link https://make.wordpress.org/core/2023/07/18/miscellaneous-editor-changes-in-wordpress-6-3/#post-editor-iframed
*
* @action enqueue_block_assets 11 0
*/
public function block_scripts(): void {
if ( ! is_admin() ) {
return;
}
foreach ( $this->handles as $resource ) {
if ( ! $resource->is_block_asset() ) {
continue;
Expand Down

0 comments on commit d8e7c5e

Please sign in to comment.