{"id":9531,"date":"2010-08-16T20:34:50","date_gmt":"2010-08-16T20:34:50","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/primary-blog-switcher-for-superadmins\/"},"modified":"2016-08-08T23:28:53","modified_gmt":"2016-08-08T23:28:53","slug":"primary-blog-switcher-for-superadmins","status":"publish","type":"plugin","link":"https:\/\/fr.wordpress.org\/plugins\/primary-blog-switcher-for-superadmins\/","author":67928,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"4.6","stable_tag":"trunk","tested":"4.6.30","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Primary Blog Switcher for SuperAdmins","header_author":"D Sader","header_description":"","assets_banners_color":"","last_updated":"2016-08-08 23:28:53","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/dsader.snowotherway.org","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/primary-blog-switcher-for-superadmins\/","header_author_uri":"http:\/\/dsader.snowotherway.org","rating":5,"author_block_rating":0,"active_installs":10,"downloads":3370,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"4.6":"<ul>\n<li>WP 4.6 tests OK, cleanup php notices<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"2"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[441,325,51046,51047,435],"plugin_category":[43,51],"plugin_contributors":[84386],"plugin_business_model":[],"class_list":["post-9531","plugin","type-plugin","status-publish","hentry","plugin_tags-multisite","plugin_tags-network","plugin_tags-primary-blog","plugin_tags-primary-site","plugin_tags-profile","plugin_category-customization","plugin_category-multisite","plugin_contributors-dsader","plugin_committers-dsader"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/primary-blog-switcher-for-superadmins.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>WordPress <a href=\"http:\/\/codex.wordpress.org\/Create_A_Network\">Multisite<\/a> network plugin to allow Network Admin to set the \"Primary Blog\" (aka Primary Site) of a user while editing a user's profile.<\/p>\n\n<p>Well, for whatever reasons (usually users fiddling around - I use WP multisite in a school with students grades 4-12), users aren't attached(or become unattached) to the correct \"Primary Blog\".<\/p>\n\n<p>This isn't a deal breaker, but annoying when they login and are redirected to a blog that is not their expected primary. It also is annoying when I use other plugins to list user primary blog for display in a member directory, member profiles, etc.<\/p>\n\n<p>Telling users to reset their primary blog at their own Dashboard-&gt;My Blogs is a fix, but the SuperAdmin(Teacher in my case) can head off the confusion first with this plugin. There is no other way(AFAIK) for the Network Admin to set the \"Primary Blog\" of a user while editing their profile.<\/p>\n\n<p>Now, I can quickly scan the Network Admin list of users and edit profiles and set primary blogs of any user correctly.<\/p>\n\n<p>I can also use my <a href=\"http:\/\/wordpress.org\/extend\/plugins\/menus\/\">Menus plugin<\/a> to toggle the My Sites menu item so users can no longer fiddle with the Primary Site switcher at all. Problem solved.<\/p>\n\n<h3>Notes<\/h3>\n\n<p>The original code for the Primary Site switcher is in wp-admin-includes\/ms.php. I've basically copied that, but changed <code>get_current_user_id()<\/code> to <code>$edit_user = (int) $_GET['user_id'];<\/code> and added it to the \"edit_user_profile\" hook.<\/p>\n\n<p>The plugin can be used to add users to a \"Special Blog\" by uncomment(remove the \/* and *\/) this section in the plugin code and change the $special_blog_id:<\/p>\n\n<pre><code>&lt;optgroup label=\"Other Blogs\"&gt;&lt;\/optgroup&gt;\n&lt;optgroup label=\"Special Blog\"&gt;\n&lt;?php $special_blog_id = '63'; \/\/\n$special_blog = get_blog_details( $special_blog_id ); ?&gt;\n&lt;option value='&lt;?php echo $special_blog_id ?&gt;'&gt;http:\/\/&lt;?php echo $special_blog-&gt;domain.$special_blog-&gt;path ?&gt;&lt;\/option&gt;\n&lt;\/optgroup&gt;\n<\/code><\/pre>\n\n<!--section=installation-->\n<p>This section describes how to install the plugin and get it working.<\/p>\n\n<ol>\n<li>Upload the plugin to your blog, Network Activate it<\/li>\n<li>Edit user profiles as Network Dashboard-&gt;Users-&gt;Edit<\/li>\n<li>View Network Dashboard for notices of users who have the main blog set as their primary blog, or no blog at all.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<ul>\n<li><p>Can I set the Main blog as a user's primary? Yes.<\/p><\/li>\n<li><p>Can I set the Dashboard blog (if enabled) as a user's primary? Yes.<\/p><\/li>\n<li><p>Can I set Donncha's Sitewide Tags blog (if enabled) as a user's primary? Yes.<\/p><\/li>\n<li><p>Can I add a user to some other blog \"special blog\" as their primary? Yes, but see \"special blog\" comments in the plugin code.<\/p><\/li>\n<li><p>Does this plugin filter the list of blogs already listed at a user's Dashboard-&gt;My Sites-&gt;Primary Site? No.<\/p><\/li>\n<li><p>I can't change a user's primary blog, there are no blogs to choose from in the dropdown on their profile? Add the user first to a couple of blogs and try again.<\/p><\/li>\n<\/ul>\n\n<!--section=changelog-->\n<h4>4.6<\/h4>\n\n<ul>\n<li>WP 4.6 tests OK, cleanup php notices<\/li>\n<\/ul>","raw_excerpt":"WordPress multisite network plugin to allow Network Admin to set the &quot;Primary Blog&quot; (aka Primary Site) of a user while editing a profile.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/fr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/9531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/fr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/fr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=9531"}],"author":[{"embeddable":true,"href":"https:\/\/fr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dsader"}],"wp:attachment":[{"href":"https:\/\/fr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=9531"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/fr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=9531"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/fr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=9531"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/fr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=9531"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/fr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=9531"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/fr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=9531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}