Forum Replies Created
-
AuthorPosts
-
[email protected]
ParticipantThanks, Long.
[email protected]
ParticipantThe last problem seemed to be that the widget block search only shows a certain amount of blocks.
I did find a new problem. When adding a block made with MB on the Widget Page the MB js/css is not included like file.css/js color.css/js group.css/js .... ect doe
[email protected]
ParticipantI think I found that this is some conflict with PUBLISHPRESS BLOCKS Plugin. When deactivated the blocks show up in the widget search.
[email protected]
ParticipantEven tried a simple test block, and it will not show up in the widget search either
$meta_boxes[] = [ 'title' => __( 'Test Block', 'your-text-domain' ), 'id' => 'test-block', 'description' => 'Test', 'icon' => [ 'background' => '#81d742', 'foreground' => '#eeee22', 'src' => 'admin-appearance', ], 'category' => 'text', 'keywords' => ['test'], 'supports' => [ 'align' => [''], ], 'type' => 'block', 'context' => 'content', 'fields' => [ [ 'name' => __( 'Button', 'your-text-domain' ), 'id' => $prefix . 'button_ps918i97tzm', 'type' => 'button', ], ], ];[email protected]
ParticipantHere is a generated function from MB Builder
function your_prefix_function_name( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'Olyweb Quicklink Block', 'your-text-domain' ), 'id' => 'olyweb-quicklink-block', 'icon' => 'grid-view', 'category' => 'oly-blocks', 'supports' => [ 'align' => [''], ], 'render_callback' => 'nb_quick_blocks', 'enqueue_assets' => 'olytheme_scripts', 'type' => 'block', 'context' => 'content', 'preview' => [ [ 'on' => '', ], ], 'fields' => [ [ 'name' => __( 'Background Color', 'your-text-domain' ), 'id' => $prefix . 'bg_color', 'type' => 'color', 'alpha_channel' => true, ], [ 'name' => __( 'Font Color', 'your-text-domain' ), 'id' => $prefix . 'font_color', 'type' => 'color', 'alpha_channel' => true, ], [ 'name' => __( 'Blocks', 'your-text-domain' ), 'id' => $prefix . 'quick_blocks', 'type' => 'group', 'collapsible' => true, 'group_title' => '{quick_block_title}', 'clone' => true, 'sort_clone' => true, 'max_clone' => 8, 'fields' => [ [ 'name' => __( 'Image', 'your-text-domain' ), 'id' => $prefix . 'quick_block_img', 'type' => 'single_image', 'image_size' => 'medium', ], [ 'name' => __( 'Title', 'your-text-domain' ), 'id' => $prefix . 'quick_block_title', 'type' => 'text', ], [ 'name' => __( 'URL', 'your-text-domain' ), 'id' => $prefix . 'quick_block_url', 'type' => 'text', 'desc' => __( 'include http://', 'your-text-domain' ), 'placeholder' => __( 'http://site.com', 'your-text-domain' ), ], ], ], ], ]; return $meta_boxes; }[email protected]
ParticipantDo you think in a future release you could add an option for a static image preview? *Without using a field name/id match. Say for instance I do not have an image field, but would like to add a static image that shows the layout of the block. As in the example images attached.
[email protected]
ParticipantThanks Long,
I see how it works now as a live preview.
Do you think in a future release you could add an option for a static image preview?'preview' => [ 'static_image' => [img_url], ],To generate something like Publisherpress Blocks example preview. This would be very helpful.
[email protected]
ParticipantWe had the same thing happen this morning to several sites.
PHP Fatal error: require(): Failed opening required '/nas/content/live/x/wp-content/plugins/meta-box-builder/vendor/composer/../meta-box/mbb-parser/src/functions.php' (include_path='.:/usr/share/pear/php:/usr/share/php') in /nas/content/live/acmhsprod/wp-content/plugins/meta-box-builder/vendor/composer/autoload_real.php on line 66
-
AuthorPosts