Custom Fields
Re-Envisioned
Support MB Settings Page Settings Page Style

  • Creator
    Topic
  • #17884
    Resolved prafgon
    Participant

    Hi there!

    I recently decided to update the Settings Page extension and it appears that it breaks the style? The “style” => “no-boxes” option seems to be completely ignored and I keep seeing the boxed layout.

    Once I load the old settings page version, everything works like a charm again?

    Regards,
    Filip

Viewing 10 replies - 1 through 10 (of 14 total)
  • Author
    Replies
  • #17895
    Anh Tran
    Keymaster

    Hi Filip,

    I’ve just tested and it works well. Can you share your code?

    #19526
    ComSi
    Participant

    I think I have the same problem, I think I found out why. To me this looks like a bug.

    When you have just style=no-boxes and columns=1 set, nothing changed and you still get the boxed layout.
    When you add the tabs key, then the no-boxes layout kicks in.

    
    $settings_pages[] = [
        'id'          => 'vacancies',
        'option_name' => 'vacancy',
        'menu_title'  => __('Vacancies', 'vac'),
        'parent'      => 'options-general.php',
        'style'       => 'no-boxes',
        'columns'     => 1,
    
        // remove this and the box layout appears
        'tabs'        => [ 'test' => "Test" ]
    ];
    

    This is undesirable because we just want to mimic a normal WP settings page, those don’t have tabs and no white boxes.

    Or am I missing something?

    #19528
    Long Nguyen
    Moderator

    Hi,

    Thank you. I’m going to check it out and let you know later.

    #19885
    Content Pilot
    Participant

    Hi Long, I am seeing the same thing. no-boxes style is being ignored if tabs are not present. I think myself and the other commentators want a single page, flat settings page. no tabs, no boxes, just basic fields. Thanks

    public function settings_page( array $settings_pages ) : array {
            $settings_pages[] = array(
                'id'          => 'social-media',
                'option_name' => 'poa',
                'menu_title'  => esc_html__( 'Social Media', 'poa' ),
                'parent'      => 'options-general.php',
                'style'       => 'no-boxes',
                'columns'     => 1,
            );
    
            return $settings_pages;
    
        }
    #19892
    Long Nguyen
    Moderator

    Hi guys,

    Please update the latest version of MB AIO to v1.11.9 or MB Settings Page to v2.1.1 to fix this issue.

    #19910
    ComSi
    Participant

    Hi Long,

    This fixes the issue. Great work, thanks a lot!

    #19919
    Content Pilot
    Participant

    Hi Long, thanks for pushing a patch. I am using Composer to load this plugin with this code

    "meta-box/mb-settings-page": "dev-master"

    But after running this command, Composer says there is nothing to update.

    composer update meta-box/mb-settings-page

    Do you all need to push the code to the master branch or tag the release?

    #19920
    ComSi
    Participant

    @content Pilot

    You need to clear the composer cache and re-install (not update) the vendor plugins.

    rm -rf vendor && composer clear-cache && composer install

    See the docs here: https://docs.metabox.io/extensions/composer/#versions–updates

    #19922
    Content Pilot
    Participant

    @Comsi. bless you. it’s always the cache, isn’t it?

    #19927
    ComSi
    Participant

    Ain’t that the truth. 😉

Viewing 10 replies - 1 through 10 (of 14 total)
  • You must be logged in to reply to this topic.