1]; } foreach( $blogs_ids as $b ) { //if multisite, each iteration changes site if (is_multisite()) { switch_to_blog( $b->blog_id ); } //activate post/chapter level meta for demonstration (these are gonna be created anyway) if ( site_cpt::pressbooks_identify() ) { update_option( 'schema_locations', ['chapter' => '1'] ); } else { update_option( 'schema_locations', ['post' => '1'] ); } //activate parent radio property if ( site_cpt::pressbooks_identify() ) { update_option( 'parent_filter_settings', ['radio1' => 'creativeWork_properties'] ); } else { update_option( 'parent_filter_settings', ['radio1' => 'organization_properties'] ); } //activate site-level meta for demonstration (these are gonna be created anyway) if ( site_cpt::pressbooks_identify() ) { update_option( 'metadata_checkbox', '1' ); } else { update_option( 'site-meta_checkbox', '1' ); } // set book type schema active for demonstration for posts/chapters (these are gonna be created anyway) if ( site_cpt::pressbooks_identify() ) { update_option( 'metadata_schemaTypes\Pressbooks_Metadata_CreativeWork', ['book_type' => '1'] ); } else { update_option( 'site-meta_schemaTypes\Pressbooks_Metadata_Organization', ['corporation_type' => '1'] ); } } //if multisite is active, restore the blog which was used before updating options if (is_multisite()) { restore_current_blog(); } } }