<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[30630] trunk/src/wp-admin/includes/ms.php: Add missing DocBlocks for several functions in wp-admin/includes/ms.php.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/30630">30630</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/30630","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>DrewAPicture</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2014-11-30 05:05:36 +0000 (Sun, 30 Nov 2014)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Add missing DocBlocks for several functions in wp-admin/includes/ms.php.
Props dustyf.
See <a href="https://core.trac.wordpress.org/ticket/30483">#30483</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesmsphp">trunk/src/wp-admin/includes/ms.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesmsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/ms.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/ms.php 2014-11-30 04:48:54 UTC (rev 30629)
+++ trunk/src/wp-admin/includes/ms.php 2014-11-30 05:05:36 UTC (rev 30630)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,13 +44,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'wp_handle_upload_prefilter', 'check_upload_size' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Delete a blog
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Delete a blog.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.0.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $blog_id Blog ID
- * @param bool $drop True if blog's table should be dropped. Default is false.
- * @return void
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $blog_id Blog ID.
+ * @param bool $drop True if blog's table should be dropped. Default is false.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wpmu_delete_blog( $blog_id, $drop = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -169,7 +168,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> restore_current_blog();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-// @todo Merge with wp_delete_user() ?
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Delete a user from the network and remove from all sites.
+ *
+ * @since 3.0.0
+ *
+ * @todo Merge with wp_delete_user() ?
+ *
+ * @param int $id The user ID.
+ * @return bool True if the user was deleted, otherwise false.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function wpmu_delete_user( $id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -225,6 +233,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Sends an email when a site administrator email address is changed.
+ *
+ * @since 3.0.0
+ *
+ * @param string $old_value The old email address. Not currently used.
+ * @param string $value The new email address.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function update_option_new_admin_email( $old_value, $value ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $value == get_option( 'admin_email' ) || !is_email( $value ) )
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -278,6 +294,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'add_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Sends an email when an email address change is requested.
+ *
+ * @since 3.0.0
+ *
+ * @global object $errors WP_Error object.
+ * @global object $wpdb WordPress database object.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function send_confirmation_on_profile_email() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $errors, $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px"> $current_user = wp_get_current_user();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -348,6 +372,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'personal_options_update', 'send_confirmation_on_profile_email' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Adds an admin notice alerting the user to check for confirmation email
+ * after email address change.
+ *
+ * @since 3.0.0
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function new_user_email_admin_notice() {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( strpos( $_SERVER['PHP_SELF'], 'profile.php' ) && isset( $_GET['updated'] ) && $email = get_option( get_current_user_id() . '_new_email' ) )
</span><span class="cx" style="display: block; padding: 0 10px"> echo "<div class='update-nag'>" . sprintf( __( "Your email address has not been updated yet. Please check your inbox at %s for a confirmation email." ), $email['newemail'] ) . "</div>";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -360,7 +390,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since MU
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $echo Optional. If $echo is set and the quota is exceeded, a warning message is echoed. Default is true.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return int
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return bool True if user is over upload space quota, otherwise false.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function upload_is_user_over_quota( $echo = true ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( get_site_option( 'upload_space_check_disabled' ) )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -422,7 +452,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return min( $size, $available );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-// Edit blog upload space setting on Edit Blog page
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Displays the edit blog upload space setting form on the Edit Blog screen.
+ *
+ * @since 3.0.0
+ *
+ * @param int $id The ID of the blog to display the setting for.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function upload_space_setting( $id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> switch_to_blog( $id );
</span><span class="cx" style="display: block; padding: 0 10px"> $quota = get_option( 'blog_upload_space' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -440,6 +476,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'wpmueditblogaction', 'upload_space_setting' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Update the status of a user in the database.
+ *
+ * Used in core to mark a user as spam or "ham" (not spam) in Multisite.
+ *
+ * @since 3.0.0
+ *
+ * @param int $id The user ID.
+ * @param string $pref The column in the wp_users table to update the user's status
+ * in (presumably user_status, spam, or deleted).
+ * @param int $value The new status for the user.
+ * @param null $deprecated Deprecated as of 3.0.2 and should not be used.
+ * @return int The initially passed $value.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function update_user_status( $id, $pref, $value, $deprecated = null ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -476,6 +526,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $value;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Cleans the user cache for a specific user.
+ *
+ * @since 3.0.0
+ *
+ * @param int $id The user ID.
+ * @return bool|int The ID of the refreshed user or false if the user does not exist.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function refresh_user_details( $id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $id = (int) $id;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -487,6 +545,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $id;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Returns the language for a language code.
+ *
+ * @since 3.0.0
+ *
+ * @param string $code Optional. The two-letter language code. Default empty.
+ * @return string The language corresponding to $code if it exists. If it does not exist,
+ * then the first two letters of $code is returned.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function format_code_lang( $code = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $code = strtolower( substr( $code, 0, 2 ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $lang_codes = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -514,6 +581,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return strtr( $code, $lang_codes );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Synchronize category and post tag slugs when global terms are enabled.
+ *
+ * @since 3.0.0
+ *
+ * @param $term The term.
+ * @param $taxonomy The taxonomy for $term. Should be 'category' or 'post_tag', as these are
+ * the only taxonomies which are processed by this function; anything else
+ * will be returned untouched.
+ * @return object|array Returns `$term`, after filtering the 'slug' field with {@see sanitize_title()}
+ * if $taxonomy is 'category' or 'post_tag'.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function sync_category_tag_slugs( $term, $taxonomy ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( global_terms_enabled() && ( $taxonomy == 'category' || $taxonomy == 'post_tag' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_object( $term ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -526,6 +605,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'get_term', 'sync_category_tag_slugs', 10, 2 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Displays an access denied message when a user tries to view a site's dashboard they
+ * do not have access to.
+ *
+ * @since 3.2.0
+ * @access private
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function _access_denied_splash() {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_user_logged_in() || is_network_admin() )
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -560,6 +646,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'admin_page_access_denied', '_access_denied_splash', 99 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Checks if the current user has permissions to import new users.
+ *
+ * @since 3.0.0
+ *
+ * @param string $permission A permission to be checked. Currently not used.
+ * @return bool True if the user has proper permissions, false if they do not.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function check_import_new_users( $permission ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !is_super_admin() )
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -568,6 +662,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'import_allow_create_users', 'check_import_new_users' );
</span><span class="cx" style="display: block; padding: 0 10px"> // See "import_allow_fetch_attachments" and "import_attachment_size_limit" filters too.
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Generates and displays a drop-down of available languages.
+ *
+ * @since 3.0.0
+ *
+ * @param array $lang_files Optional. An array of the language files. Default empty array.
+ * @param string $current Optional. The current language code. Default empty.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function mu_dropdown_languages( $lang_files = array(), $current = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $flag = false;
</span><span class="cx" style="display: block; padding: 0 10px"> $output = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -595,6 +697,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Order by name
</span><span class="cx" style="display: block; padding: 0 10px"> uksort( $output, 'strnatcasecmp' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filter the languages available in the dropdown.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -605,9 +708,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $current The current language code.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $output = apply_filters( 'mu_dropdown_languages', $output, $lang_files, $current );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> echo implode( "\n\t", $output );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Displays an admin notice to upgrade all sites after a core upgrade.
+ *
+ * @since 3.0.0
+ *
+ * @global int $wp_db_version The version number of the database.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function site_admin_notice() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_db_version;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !is_super_admin() )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -618,6 +729,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'admin_notices', 'site_admin_notice' );
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'network_admin_notices', 'site_admin_notice' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Avoids a collision between a site slug and a permalink slug.
+ *
+ * In a subdirectory install this will make sure that a site and a post do not use the
+ * same subdirectory by checking for a site with the same name as a new post.
+ *
+ * @since 3.0.0
+ *
+ * @param array $data An array of post data.
+ * @param array $postarr An array of posts. Not currently used.
+ * @return array The new array of post data after checking for collisions.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function avoid_blog_page_permalink_collision( $data, $postarr ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_subdomain_install() )
</span><span class="cx" style="display: block; padding: 0 10px"> return $data;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -641,6 +764,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'wp_insert_post_data', 'avoid_blog_page_permalink_collision', 10, 2 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * 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
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function choose_primary_blog() {
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <table class="form-table">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -696,9 +827,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Grants Super Admin privileges.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.0.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param int $user_id ID of the user to be granted Super Admin privileges.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool True on success, false on failure. This can fail when the user is
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * already a super admin or when the $super_admins global is defined.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * already a super admin or when the `$super_admins` global is defined.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function grant_super_admin( $user_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // If global super_admins override is defined, there is nothing to do here.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -740,9 +872,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Revokes Super Admin privileges.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.0.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param int $user_id ID of the user Super Admin privileges to be revoked from.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool True on success, false on failure. This can fail when the user's email
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * is the network admin email or when the $super_admins global is defined.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * is the network admin email or when the `$super_admins` global is defined.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function revoke_super_admin( $user_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // If global super_admins override is defined, there is nothing to do here.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -783,12 +916,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Whether or not we can edit this network from this page
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Whether or not we can edit this network from this page.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * By default editing of network is restricted to the Network Admin for that site_id this allows for this to be overridden
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * By default editing of network is restricted to the Network Admin for that `$site_id`
+ * this allows for this to be overridden.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.1.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param integer $site_id The network/site ID to check.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
+ * @param int $site_id The network/site ID to check.
+ * @return bool True if network can be edited, otherwise false.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function can_edit_network( $site_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -813,6 +949,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Thickbox image paths for Network Admin.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.1.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @access private
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function _thickbox_path_admin_subfolder() {
</span></span></pre>
</div>
</div>
</body>
</html>