Skip to content

Commit

Permalink
CDPT-2268: Horizontal lists no longer have the 'is-style-page-nav' class
Browse files Browse the repository at this point in the history
- Add an exception to the removeCustomClassNameSupport function for the list block
  • Loading branch information
EmilyHazlehurst committed Jan 16, 2025
1 parent d9caaa2 commit 5bfa652
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { addFilter } from "@wordpress/hooks";
*/

const removeCustomClassNameSupport = (settings, name) => {
if (
!name.startsWith("core/") ||
settings.supports?.customClassName === false
) {
// Blocks that are allowed to have custom class name support, e.g. the list block and the horizontal styling variant.
const allowed = ['core/list'];

if (!name.startsWith("core/") || settings.supports?.customClassName === false || allowed.includes(name)) {
return settings;
}

Expand Down

0 comments on commit 5bfa652

Please sign in to comment.