[wp-trac] [WordPress Trac] #54086: bloginfo language issue

WordPress Trac noreply at wordpress.org
Wed Sep 8 16:50:55 UTC 2021


#54086: bloginfo language issue
--------------------------------+-----------------------------
 Reporter:  kukac7              |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:  5.8
 Severity:  normal              |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------------------
 hi,

 the code snippet below only returns the name of the blog well, not the
 language, it is always the same.
 even though the language is changed in the site admin settings.

 {{{#!php
 <?php
 $sites = get_sites();

 foreach ( $sites as $site ) {
         switch_to_blog( $site->blog_id );
         echo get_bloginfo( 'name' );
         echo get_bloginfo( 'language' );
         restore_current_blog();
 }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54086>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list