Anchor not saving

Support MB Blocks Anchor not savingResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15841
    Johannes GrossJohannes Gross
    Participant

    Love this extension. Great job!

    While working with it, I noticed that the anchor does not save and is not available through the callback attribute.

    Here is a snippet of my code:

    $meta_boxes[] = array(
                    'id'         => 'twt-gallery-block',
                    'title'      => 'TWT Gallery',
                    'type'            => 'block',
                    'icon'            => 'layout',
                    'category'        => 'layout',
                    'render_callback' => array($this, 'render_block'),
                    'supports' => array(
                        'anchor' => true,
                        'customClassName' => true,
                    ),
                    'fields' => array(
                        array(
                            'name' => 'Images',
                            'id'   => 'images',
                            'type' => 'image_advanced',
                        ),
                        array(
                            'name' => 'Row Height (px)',
                            'placeholder' => '300',
                            'id'   => 'row_height',
                            'type' => 'number',
                        ),
                        array(
                            'name' => 'Displayed At Start',
                            'placeholder' => '20',
                            'id'   => 'displayed_at_start',
                            'type' => 'number',
                        ),
                        array(
                            'name' => 'Load More Increments',
                            'placeholder' => '10',
                            'id'   => 'load_more_increments',
                            'type' => 'number',
                        ),
                        array(
                            'name' => 'Last Row',
                            'id'   => 'last_row',
                            'type' => 'select',
                            'options' => array(
                                'justify' => 'justify',
                                'nojustify' => 'don\'t justify'
                            )
                        ),
                    )
                );
    

    Not urgent...

    #15862
    Anh TranAnh Tran
    Keymaster

    Hi Johannes,

    Thanks for your feedback. This is a Gutenberg problem and have fixed in this pull request. I think it'll be available in WordPress 5.2.3.

    #15873
    Johannes GrossJohannes Gross
    Participant

    Great! Thank you for your reply and for staying on top of this!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.