Multisite settings page only working for the default site

Support MB Settings Page Multisite settings page only working for the default siteResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #16270
    SGSG
    Participant

    I added a simple settings page according to this in my custom plugin:

    $plugin_admin_options = new Vendor_Admin_Options();
    $this->loader->add_filter('mb_settings_pages', $plugin_admin_options, 'addOptionsPage', 1);
    $this->loader->add_filter('rwmb_meta_boxes', $plugin_admin_options, 'addOptions');
    class Vendor_Admin_Options
    {
        /**
         * @param $settings_pages
         * @return array
         */
        public function addOptionsPage($settings_pages)
        {
            $settings_pages[] = array(
                'id'          => 'vendor',
                'option_name' => 'vendor',
                'menu_title'  => 'VENDOR',
                'icon_url'    => 'dashicons-admin-settings',
                'page_title'  => 'Vendor Settings',
                'style'       => 'no-boxes',
                'columns'     => 1,
                'parent'      => 'options-general.php',
                'tabs'        => array(
                    'general' => __('Data', 'vendor'),
                    'design'  => __('Colors', 'vendor'),
                ),
                'position'    => -10,
                'help_tabs' => array(
                    array(
                        'title'   => 'Data',
                        'content' => '<p>Content</p>',
                    ),
                ),
    
            );
    
            return $settings_pages;
        }
    ...
    }
    

    But the addOptionsPage function only executes on the default network site, not on the other sites. What could be the problem?

    I checked the execution, addOptionsPage only on the default site, but addOptions is executed on the other sites aswell.

    #16272
    Anh TranAnh Tran
    Keymaster

    Hi SG,

    Are 3 plugins: your custom plugin, MB Settings Page and Meta Box are network-activated?

    #16273
    SGSG
    Participant

    Thanks so much Anh, sometimes one does not see the forrest for the trees.

    I did not enable the required AIO plugins on the subsite.

    Best regards!

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