How to retrieve blog language without any region (locale) attached?

I’m posting this at the request of one of our Discord users, who doesn’t use WPSE: Stack Overflow / Stack Exchange is kind of a bizarre place. Why is that question voted “-2”? The question is basically asking more or less the same thing that multiple WordPress tickets are asking for: https://core.trac.wordpress.org/ticket/48152 https://core.trac.wordpress.org/ticket/50183 Also the … Read more

WPMU – How to echo only one URL

Ok I was able to eventually figure it out, what I did was exclude the main blog from the code. <?php if(current_user_can( ‘edit_posts’ )) { global $current_user; $blogs = get_blogs_of_user( $current_user->id ); if($blogs) { foreach ( $blogs as $blog ) { if($blog->userblog_id != 1) { echo ‘<li><a href=”http://’ . $blog->domain . $blog->path .’upload-and-manage-documents/”>My Documents</a></li>’; echo … Read more

Correct way to hardcode an image into a parent theme file?

If you check the Codex, the use of get_bloginfo() for certain parameters is discouraged: ‘stylesheet_url’ – Returns the primary CSS (usually style.css) file URL of the active theme. Consider using get_stylesheet_uri() instead. ‘stylesheet_directory’ – Returns the stylesheet directory URL of the active theme. (Was a local path in earlier WordPress versions.) Consider using get_stylesheet_directory_uri() instead. … Read more