Pullquote Block Styles disappeared?

The solid colour pullquote style had been deprecated and removed in 2021, and was removed in favor of more comprehensive options based on block style options: Given that we can now achieve border and background variations using block supports, we’re removing the existing styles and adding a textAlign attribute to compensate. https://github.com/WordPress/gutenberg/pull/30951 If you really … Read more

Rest api request throttling

I wasn’t sure from the Laravel docs exactly how it works there, but there are a couple of security plugins (at least) that have rate limiting on a per-IP basis: ShieldPRO WordFence This may be more useful, however, as it is focused only on rate limiting and isn’t a product, and would be more flexible … Read more

Check if specific role exists

This is based on Bosco’s comment. You can do this instead of line 3 in the above code: wp_roles()->is_role( ‘editor’ ); That grabs a WP_Roles object (what the code you had tries to do by getting a global variable) and calls the same is_role() function.

wp-scripts start build hangs

Nothing is hanging. It’s just waiting for a change so that it can automatically build again. That’s what start does. If you just want to run a build once use build. The warnings in your second example are self explanatory: You’re using a font asset that is very large and exceeds the recommended maximum size. … Read more

Remove default Image Sizes

To unset all default image sizes in WordPress using PHP you can use this function: add_filter( ‘intermediate_image_sizes’, ‘remove_default_img_sizes’, 10, 1); function remove_default_img_sizes( $sizes ) { $targets = [‘thumbnail’, ‘medium’, ‘medium_large’, ‘large’, ‘1536×1536’, ‘2048×2048’]; foreach($sizes as $size_index=>$size) { if(in_array($size, $targets)) { unset($sizes[$size_index]); } } return $sizes; } Alternatively, you can also unset default images by going … Read more

image_size with respect to aspect ratios

Right before image subsizes are created, there’s a filter called intermediate_image_sizes_advanced that lets you modify the list of sizes. Here’s code that you could expand on — right now it just removes the thumbnail as a proof of concept: function remove_image_sizes_before_generation( $new_sizes, $image_meta, $attachment_id ) { $width = $image_meta[0]; $height = $image_meta[1]; // … Calculate aspect … Read more

How to handle a large child theme

I assume this will be a lot of extra load on the site to have all these extra files? Or are the parent theme files “skipped” and “doesn’t count” if I have them in my child theme? if the child theme file is slower than the parent theme file then yes if the child theme … Read more