rose18
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Limit the columns for core/columnsThank you @faisalahammad ! When I add that code to my functions.php file, I get this error message:
Notice: Function WP_Block_Type_Registry::register was called incorrectly. Block type "core/columns" is already registered. Please see Debugging in WordPress for more information.
Is there a way to fix it?
Hi all,
It’s working now.
Thanks!
Forum: Fixing WordPress
In reply to: Remove Image size preset settings in core image blockThank you @czapla ! Your plugin works to disable/hide the ‘Image Dimensions’. From your block.json file (https://github.com/michalczaplinski/image-wrapper/blob/main/src/block.json), is it the codes below removes the ‘Image Dimension’:
"attributes": { "allowResize": { "type": "boolean", "default": false } },
Thank you!
Thank you @santosguillamot ! The code that you provided works ??
Thanks Again!
Forum: Fixing WordPress
In reply to: Remove Image size preset settings in core image blockThank you @czapla ! I have been researching to find a way to disable the entire “Image Dimensions” option using the block hooks, but no luck. Would you know how I can disable it using the filter hook? or can you point me in the right direction?
Thanks!
Forum: Fixing WordPress
In reply to: Disable custom image size control in core image blockThank you for your help @darerodz !
thank you for the update @santosguillamot !
Forum: Fixing WordPress
In reply to: Extending WP Core BlocksThank you for the resources @contentiskey ! These are very helpful
Forum: Fixing WordPress
In reply to: Block settings – Block gap/spacing value disappearsThanks @contentiskey !
So I assume there isn’t a way to fix that?Forum: Fixing WordPress
In reply to: Block settings – Block gap/spacing value disappearsHi @contentiskey ,
I think this is a core issue. I did switch to the twenty twenty two theme and added the code below to the theme.json file so I can disable the size preset (screenshot https://snipboard.io/kxKyX8.jpg).
"spacing": { "spacingScale": { "operator": "*", "increment": 1.5, "steps": 0, "mediumStep": 1.5, "unit": "rem" }, "blockGap": true, }
The block gap/spacing value works if I remove the ‘spacingScale’ code, but I really want to disable the size preset.
Forum: Fixing WordPress
In reply to: Remove Padding left and right from core paragraph blockDid anyone find a solution to disable the padding left/right from the block settings?
I want to disable the left/right options for certain core blocks.Thanks!
Forum: Fixing WordPress
In reply to: Adding Spacing/Dimension Properties to core blocksThank you @west7 for this suggestion! I guess that’s one way to do this, but is there a way to add Dimension, Margin and Padding properties to built-in core blocks?
Thanks again!
Forum: Fixing WordPress
In reply to: Block editor : Hide ‘core/columns’ block in inserterHi @threadi ,
From this article (https://wpengine.com/builders/wordpress-contextual-patterns/), this contextual pattern is a built-in feature in wordpress, so nothing related to ACF Pro.
This feature basically allows you to convert the existing block into a pattern.Would anyone know a way to hide the ‘core/columns’ block in the inserter (screenshot: https://snipboard.io/r3MvkQ.jpg)?
Forum: Fixing WordPress
In reply to: Getting alot of console errors on fresh wordpress installThank you @noisysocks !
Forum: Fixing WordPress
In reply to: Custom WP blocks – return the text/ background hex colorThanks @artemiosans!
However, we are not using the ACF color picker. We are using the WordPress built-in color UI, so retrieving the color value with php is different.
Since it’s using the WordPress color UI, then it should be using WordPress core functions to read the theme JSON file.
It seems that we can use this function to access the hex code color:
WP_Theme_JSON_Resolver::get_theme_data()->get_settings();