Dan Maby
@danmaby.com
Passionate about people, community (@wpldn.uk), and tech. Long history with #WordPress, doing interesting things with #JS. When not at a screen #rugby and #woodworking
I'm not clear if this is the best way to approach this.
Or should I use `is_block_theme()` in PHP, then access it via something like the following in JS:
const isBlockTheme = window.isBlockThemeActive ?? false;
Or should I use `is_block_theme()` in PHP, then access it via something like the following in JS:
const isBlockTheme = window.isBlockThemeActive ?? false;
April 28, 2025 at 5:09 PM
I'm not clear if this is the best way to approach this.
Or should I use `is_block_theme()` in PHP, then access it via something like the following in JS:
const isBlockTheme = window.isBlockThemeActive ?? false;
Or should I use `is_block_theme()` in PHP, then access it via something like the following in JS:
const isBlockTheme = window.isBlockThemeActive ?? false;
`useSetting( 'spacing.margin' )` will return the Core-supported margin config if the theme supports it (via theme.json)
If it returns undefined or false, it means margin is not supported
So I can then manually render custom settings in BoxControl inside ToolsPanelItem so margin is still editable
If it returns undefined or false, it means margin is not supported
So I can then manually render custom settings in BoxControl inside ToolsPanelItem so margin is still editable
April 28, 2025 at 5:09 PM
`useSetting( 'spacing.margin' )` will return the Core-supported margin config if the theme supports it (via theme.json)
If it returns undefined or false, it means margin is not supported
So I can then manually render custom settings in BoxControl inside ToolsPanelItem so margin is still editable
If it returns undefined or false, it means margin is not supported
So I can then manually render custom settings in BoxControl inside ToolsPanelItem so margin is still editable
It'll be great to catch up, Ross! Thanks for joining us at #WPLDN. Feel free to reach out if you're in London early & want to meet. @nathanwrigley.com, @smartyweb.bsky.social, Giles, & I will be near the venue. Tagging @keithdevon.com, @markwilkinson.dev, @louisetowler.com, @tna.sh & @garyjones.io
February 24, 2025 at 8:25 AM
It'll be great to catch up, Ross! Thanks for joining us at #WPLDN. Feel free to reach out if you're in London early & want to meet. @nathanwrigley.com, @smartyweb.bsky.social, Giles, & I will be near the venue. Tagging @keithdevon.com, @markwilkinson.dev, @louisetowler.com, @tna.sh & @garyjones.io
That's fantastic! Looking forward to catching up, Tim
February 21, 2025 at 9:06 AM
That's fantastic! Looking forward to catching up, Tim