]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/pluggable.php
WordPress 4.3.1
[autoinstalls/wordpress.git] / wp-includes / pluggable.php
index c4eb8cc56625068f092ed900c564cdfcc20e89e7..e41cbfe585183a51c520d68bb88731f18674165d 100644 (file)
@@ -1689,13 +1689,23 @@ if ( !function_exists('wp_new_user_notification') ) :
  *
  * @since 2.0.0
  * @since 4.3.0 The `$plaintext_pass` parameter was changed to `$notify`.
  *
  * @since 2.0.0
  * @since 4.3.0 The `$plaintext_pass` parameter was changed to `$notify`.
+ * @since 4.3.1 The `$plaintext_pass` parameter was deprecated. `$notify` added as a third parameter.
  *
  *
- * @param int    $user_id User ID.
- * @param string $notify  Whether admin and user should be notified ('both') or
- *                        only the admin ('admin' or empty).
+ * @global wpdb         $wpdb      WordPress database object for queries.
+ * @global PasswordHash $wp_hasher Portable PHP password hashing framework instance.
+ *
+ * @param int    $user_id    User ID.
+ * @param null   $deprecated Not used (argument deprecated).
+ * @param string $notify     Optional. Type of notification that should happen. Accepts 'admin' or an empty
+ *                           string (admin only), or 'both' (admin and user). The empty string value was kept
+ *                           for backward-compatibility purposes with the renamed parameter. Default empty.
  */
  */
-function wp_new_user_notification( $user_id, $notify = '' ) {
-       global $wpdb;
+function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) {
+       if ( $deprecated !== null ) {
+               _deprecated_argument( __FUNCTION__, '4.3.1' );
+       }
+
+       global $wpdb, $wp_hasher;
        $user = get_userdata( $user_id );
 
        // The blogname option is escaped with esc_html on the way into the database in sanitize_option
        $user = get_userdata( $user_id );
 
        // The blogname option is escaped with esc_html on the way into the database in sanitize_option