choose_primary_blog()

choose_primary_blog()函数是Wordpress函数

choose_primary_blog()

处理选择用户主站点的显示。
Handles the display of choosing a user’s primary site.

说明(Description)

这将显示用户的主站点,并允许用户选择哪个站点是主站点。


返回(Return)

无返回值


源码(Source)

/**
 * Handles the display of choosing a user's primary site.
 *
 * This displays the user's primary site and allows the user to choose
 * which site is primary.
 *
 * @since 3.0.0
 */
function choose_primary_blog() {
	?>
	
	
	
		
		
		 1 ) {
			$found = false;
			?>
			
				userblog_id )
						$found = true;
					?>userblog_id ); ?>>userblog_id ) ) ?>
			
			userblog_id );
			}
		} elseif ( count( $all_blogs ) == 1 ) {
			$blog = reset( $all_blogs );
			echo esc_url( get_home_url( $blog->userblog_id ) );
			if ( $primary_blog != $blog->userblog_id ) // Set the primary blog again if it's out of sync with blog list.
				update_user_meta( get_current_user_id(), 'primary_blog', $blog->userblog_id );
		} else {
			echo "N/A";
		}
		?>
更新版本源码位置使用被使用
3.0.0wp-admin/includes/ms.php:75808
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索