Is there any way to give all users access to one blog in a multisite network without using a plugin?

You could filter get_blogs_of_user and add this particular blog to the returned list. Pseudo-code, not tested: add_filter( ‘get_blogs_of_user’, ‘add_special_blog’, 10, 3 ); function add_special_blog( $blogs, $user_id, $all ) { $new_blog = get_blog_details( $special_blog_id ); $blogs[ $special_blog_id ] = (object) array( ‘userblog_id’ => $special_blog_id, ‘blogname’ => $new_blog->blogname, ‘domain’ => $new_blog->domain, ‘path’ => $new_blog->path, ‘site_id’ => $new_blog->site_id, … Read more

How can I modify text in admin bar?

Are you referring to the meta bar where people can login or register? I’d recommend using jQuery, because if you make the change to the core, it’ll be overwritten once you update it. $(‘a[href*=”register”]’).text(‘join’); This basically states find an anchor tag where the href contains the word register. Once it finds it, it changes the … Read more

How to use ‘depth’?

On recursive methods, I usually add a $depth parameter: function my_function($depth = -1) { if ($depth === 0) { return array(); // or any other value insisting an empty or false result } // do something $result = array(); while ($some_condition) { $result = array_merge($result, my_function($depth – 1)); // decrease $depth value } // maybe … Read more

Restrict Content for only Contributors via .htaccess

You can create a custom page template for downloads and use something similar to the following: if (current_user_can(‘contributor’)) { echo “<h2>Download Page</h2>”; } else { echo ‘You do not have access to this page”; } You would need additional code to show the file you are offering for download. Alternatively you could set another cookie … Read more