plugin updates
This commit is contained in:
+2
-1
@@ -47222,7 +47222,8 @@ function PatternList({
|
||||
return true;
|
||||
}
|
||||
if (selectedCategory === 'uncategorized') {
|
||||
const hasKnownCategory = pattern.categories.some(category => registeredPatternCategories.includes(category));
|
||||
var _pattern$categories$s;
|
||||
const hasKnownCategory = (_pattern$categories$s = pattern.categories?.some(category => registeredPatternCategories.includes(category))) !== null && _pattern$categories$s !== void 0 ? _pattern$categories$s : false;
|
||||
return !pattern.categories?.length || !hasKnownCategory;
|
||||
}
|
||||
return pattern.categories?.includes(selectedCategory);
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3
-1
@@ -57454,7 +57454,9 @@ function FormFileUpload({
|
||||
// @todo: Temporary fix a bug that prevents Chromium browsers from selecting ".heic" files
|
||||
// from the file upload. See https://core.trac.wordpress.org/ticket/62268#comment:4.
|
||||
// This can be removed once the Chromium fix is in the stable channel.
|
||||
const compatAccept = !!accept?.includes('image/*') ? `${accept}, image/heic, image/heif` : accept;
|
||||
// Prevent Safari from adding "image/heic" and "image/heif" to the accept attribute.
|
||||
const isSafari = globalThis.window?.navigator.userAgent.includes('Safari') && !globalThis.window?.navigator.userAgent.includes('Chrome') && !globalThis.window?.navigator.userAgent.includes('Chromium');
|
||||
const compatAccept = !isSafari && !!accept?.includes('image/*') ? `${accept}, image/heic, image/heif` : accept;
|
||||
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
|
||||
className: "components-form-file-upload",
|
||||
children: [ui, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -683,7 +683,7 @@ function CreatePatternModalContents({
|
||||
function getTermLabels(pattern, categories) {
|
||||
// Theme patterns rely on core pattern categories.
|
||||
if (pattern.type !== PATTERN_TYPES.user) {
|
||||
return categories.core?.filter(category => pattern.categories.includes(category.name)).map(category => category.label);
|
||||
return categories.core?.filter(category => pattern.categories?.includes(category.name)).map(category => category.label);
|
||||
}
|
||||
return categories.user?.filter(category => pattern.wp_pattern_category.includes(category.id)).map(category => category.label);
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user