Question about the code
-
Hi @dglingren
I have the problem on one of my sites that is using MLA that
get_option( 'page_on_front' )is returning the value for another site.I was looking through all of the cases of the code that have
switch_to_blog()and found the following code inMLAMultisiteExtensions::mla_gallery_query_arguments()which I don’t fully understand.$blog_details = get_blog_details( reset( $site_ids ) ); if ( $blog_details ) { switch_to_blog( current( $site_ids )); } else { unset( self::$shortcode_attributes['site_id'] ); }Thank you for looking into and explaining to me why the
switch_to_blog()is needed here.Ulrich
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Question about the code’ is closed to new replies.