Forum Replies Created
-
AuthorPosts
-
Nicholas Cox
Participantalso forgot to mention, no i have just metabox plugin installed and a default wordpress blank theme so nothing is disabling the dashicons from what i can see.
Nicholas Cox
ParticipantHi
Ok thats fine if it will only work for the tabs extension. I was under the impression that Dashicons are not loaded by default in WordPress as several forums mention this (link below) so makes me wonder why you are seeing the icons on the front end and i am not without enabling them with
wp_enqueue_style( 'dashicons' ). Does your theme load them? just really letting you know as others may have this issue.Nicholas Cox
ParticipantHi, any update on this?
Nicholas Cox
ParticipantFor anyone who is interested this is the CSS i used to get even spacing to the fields e.g. gap: 10px;
.rwmb-form .rwmb-meta-box { display: flex; flex-direction: column; gap: 10px; } .rwmb-form .rwmb-row { display: flex; flex-wrap: wrap; gap: 10px; } .rwmb-form .rwmb-column { margin-right: 0; box-sizing: border-box; min-width: 300px; flex: 1; } .rwmb-form .rwmb-column-1 { width: 8.33%; } .rwmb-form .rwmb-column-2 { width: 16.66%; } .rwmb-form .rwmb-column-3 { width: 25%; } .rwmb-form .rwmb-column-4 { width: 33%; } .rwmb-form .rwmb-column-5 { width: 41.66%; } .rwmb-form .rwmb-column-6 { width: 50%; } .rwmb-form .rwmb-column-7 { width: 58.33%; } .rwmb-form .rwmb-column-8 { width: 66.66%; } .rwmb-form .rwmb-column-9 { width: 75%; } .rwmb-form .rwmb-column-10 { width: 83.33%; } .rwmb-form .rwmb-column-11 { width: 91.66%; } .rwmb-form .rwmb-column-12 { width: 100%; }September 16, 2024 at 11:55 PM in reply to: metabox block category null in WP_Block_Type_Registry #46481Nicholas Cox
ParticipantHi,
I have added the test plugin to the new site (test site) where i have sent you an email using the contact form.
I have outputted the code in the footer.php file in the theme named drip-create.
echo "<pre>"; var_dump( WP_Block_Type_Registry::get_instance()->get_all_registered() ); echo "</pre>";the test plugin i made so you can see the issue with metabox blocks
wp-content\plugins\drip-create-plugin-test\includes/run.phpwith the 'dc-container-block' as the test block i made up for you.
wp-content\plugins\drip-create-plugin-test\includes\dc-container/dc-container.phpyou will see the issue on the homepage e.g.
["meta-box/dc-container-block"]=> object(WP_Block_Type)#1079 (30) { ["api_version"]=> int(1) ["name"]=> string(27) "meta-box/dc-container-block" ["title"]=> string(0) "" ["category"]=> NULL ["parent"]=> NULL ["ancestor"]=> NULL ["allowed_blocks"]=> NULL ["icon"]=> NULL ["description"]=> string(0) "" ["keywords"]=> array(0) { } ["textdomain"]=> NULLthanks
Nicholas Cox
Participantok thanks
September 16, 2024 at 9:54 PM in reply to: metabox block category null in WP_Block_Type_Registry #46476Nicholas Cox
ParticipantAlso the metabox block title and description do not show either? e.g.
'meta-box/dc-product-listing-block' => object(WP_Block_Type)[1127] public 'api_version' => int 1 public 'name' => string 'meta-box/dc-product-listing-block' (length=33) public 'title' => string '' (length=0) public 'category' => null public 'parent' => null public 'ancestor' => null public 'allowed_blocks' => null public 'icon' => null public 'description' => string '' (length=0) public 'keywords' => array (size=0) empty public 'textdomain' => null public 'styles' => array (size=0) empty private 'variations' => null public 'variation_callback' => null public 'selectors' => array (size=0) empty public 'supports' => null public 'example' => null public 'render_callback' => array (size=2) 0 => object(MBBlocks\Block)[1125] ... 1 => string 'render' (length=6) public 'attributes' => array (size=3) 'lock' => array (size=1) ... 'metadata' => array (size=1) ... 'className' => array (size=1) ... private 'uses_context' => array (size=0) empty public 'provides_context' => null public 'block_hooks' => array (size=0) empty public 'editor_script_handles' => array (size=1) 0 => string 'mb-blocks' (length=9) public 'script_handles' => array (size=0) empty public 'view_script_handles' => array (size=0) empty public 'view_script_module_ids' => array (size=0) empty public 'editor_style_handles' => array (size=1) 0 => string 'mb-blocks' (length=9) public 'style_handles' => array (size=0) empty public 'view_style_handles' => array (size=0) empty private 'deprecated_properties' => array (size=5) 0 => string 'editor_script' (length=13) 1 => string 'script' (length=6) 2 => string 'view_script' (length=11) 3 => string 'editor_style' (length=12) 4 => string 'style' (length=5)September 16, 2024 at 8:17 PM in reply to: metabox block category null in WP_Block_Type_Registry #46470Nicholas Cox
Participantalso even if i change the registered block to a default category e.g. 'widgets' then the issue still persists (null category).
September 16, 2024 at 8:03 PM in reply to: metabox block category null in WP_Block_Type_Registry #46469Nicholas Cox
ParticipantHi, I have done what you said but the issue still persists.
I run this code in my footer on the front end to check if its working and no luck
$editorblocks = WP_Block_Type_Registry::get_instance()->get_all_registered(); foreach ($editorblocks as $block) { if ($block->category){ if ($block->category == 'dc-blocks'){ var_dump($block); } } }Nicholas Cox
ParticipantIf I add my own CSS I have to override alot of the CSS added by metabox just to set the correct the spacing between form fields
Nicholas Cox
ParticipantHi yes i know its noted in the docs, I was just asking if there was any update to support it as its been a sought after request for years. If there are bugs or issues in the latest release of metabox extensions then the idea to rollback is important thanks all. But thanks anyway
Nicholas Cox
ParticipantHi, sorry just to clear, i am using a metabox form shortcode to display the form on the front end of the website. Are you saying that metabox uses WordPress Admin to process the front end validation? I assume only admin scripts run when browsing the WordPress admin area in the backend.
September 11, 2024 at 9:07 PM in reply to: metabox block category null in WP_Block_Type_Registry #46415Nicholas Cox
ParticipantOk I have it all setup but the output is still not displaying the category, see below. I have tested quote a few times and still the same issue. Not sure what to look into next.
Nicholas Cox
ParticipantHi
ok but i still need to validate the front end forms using PHP for security reasons. I only wanted to hide it from the wordpress admin page for the post type edit page, by doing this i cant use the form validation at all with on the front end, as its a front end form surely this would still work?
thanks
Nicholas Cox
ParticipantHi, yes is huge when the form width is wide. So was wondering if this was intentional or not as i thought even padding widths for responsive design would be a good standard thats all.
-
AuthorPosts