• Thank you for great plugin.

    I made simple admin side menu and would like to apply to all my multisite stores. Do I have to set up one by one?

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author gqevu6bsiz

    (@gqevu6bsiz)

    Thank you.
    My WP Customize have some filters so you can same customize to apply to all sites.

    e.g.)

    
    add_filter( 'mywp_controller_admin_sidebar_get_sidebar' , 'custom_mywp_controller_admin_sidebar_get_sidebar' );
    
    function custom_mywp_controller_admin_sidebar_get_sidebar( $posts ) {
    
        $defaults = array(
          'ID' => '',
          'post_author' => 1,
          'menu_order' => 0,
          'post_parent' => 0,
    
          'item_parent' => 0,
          'item_type' => 'default',
          'item_default_type' => '',
          'item_default_id' => '',
          'item_default_parent_id' => '',
          'item_capability' => '',
          'item_li_class' => '',
          'item_li_id' => '',
          'item_link_class' => '',
          'item_link_id' => '',
          'item_link_title' => '',
          'item_link_url' => '',
          'item_link_attr' => '',
          'item_icon_class' => '',
          'item_icon_id' => '',
          'item_icon_class' => '',
          'item_icon_title' => '',
          'item_icon_style' => '',
          'item_icon_img' => '',
        );
    
        $sidebar_items = array();
    
        $sidebar_items[] = (object) wp_parse_args(
          array(
            'ID' => 'menu-dashboard',
            'item_default_type' => 'menu',
            'item_default_id' => 'index.php',
            'item_default_parent_id' => '',
            'item_link_title' => 'Dashboard',
            'item_icon_class' => 'dashicons-before dashicons-dashboard',
          ),
          $defaults
        );
    
        return $sidebar_items;
    
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘How to apply same settings to all multisite?’ is closed to new replies.