Settings Page Style

Support MB Settings Page Settings Page StyleResolved

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #17884
    prafgonprafgon
    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

    #17895
    Anh TranAnh Tran
    Keymaster

    Hi Filip,

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

    #19526
    ComSiComSi
    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 NguyenLong Nguyen
    Moderator

    Hi,

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

    #19885
    Content PilotContent 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 NguyenLong 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
    ComSiComSi
    Participant

    Hi Long,

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

    #19919
    Content PilotContent 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
    ComSiComSi
    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 PilotContent Pilot
    Participant

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

    #19927
    ComSiComSi
    Participant

    Ain't that the truth. 😉

    #21604
    Teia Local StudioTeia Local Studio
    Participant

    Hey there!

    Is that possible to have the "style" => "seamless" on a specific BOX inside a tabbed settings panel?

    If I set SEAMLESS in the box anywhere inside a page, or CPT, it works fine. But inside the setting page, does not.

    
    $meta_boxes[] = array(
        'id'             => 'my-id',
        'title'          => 'my-title',
        'settings_pages' => 'panel-abc',
        'tab'            => 'tab-123,
        'style'          => 'seamless',
        'fields' => array(
            array(
                'name' => 'Setting name',
                'id'   => 'sett-id',
                'type' => 'text',
                'class' => 'my-class',
                'columns' => 6
            ),
            array(
                'name' => 'Other setting name',
                'id'   => 'sett-id-2',
                'type' => 'text',
                'class' => 'my-class',
                'columns' => 6
            )
        )
    );
    

    Thank you!!!
    G.

    #21616
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thanks for your idea, I'm going to create a feature request to support style seamless (no-box) in the setting page for specific meta boxes.

    #21673
    Long NguyenLong Nguyen
    Moderator

    Solved in MB Settings Page v2.1.3, MB AIO will be released later.

    • $settings_pages: 'style' => 'boxes'
    • $meta_boxes: 'style' => 'seamless'
    #21677
    Teia Local StudioTeia Local Studio
    Participant

    THANK YOU!
    SO MUCH.

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