Custom Fields
Re-Envisioned
Support MB Settings Page Multisite settings page only working for the default site

This topic contains 2 replies, has 2 voices, and was last updated by  SG 3 weeks ago.

  • Creator
    Topic
  • #16270
    Resolved
    SG
    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #16272

    Anh Tran
    Keymaster

    Hi SG,

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

    #16273

    SG
    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 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.