Changeset 26503 for trunk/src/wp-admin/includes/user.php
- Timestamp:
- 12/01/2013 05:53:18 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/user.php
r25606 r26503 110 110 111 111 /* checking the password has been typed twice */ 112 /** 113 * Fires before the password and confirm password fields are checked for congruity. 114 * 115 * @since 1.5.1 116 * 117 * @param string $user_login The username. 118 * @param string &$pass1 The password, passed by reference. 119 * @param string &$pass2 The confirmed password, passed by reference. 120 */ 112 121 do_action_ref_array( 'check_passwords', array( $user->user_login, &$pass1, &$pass2 ) ); 113 122 … … 150 159 } 151 160 152 // Allow plugins to return their own errors. 161 /** 162 * Fires before user profile update errors are returned. 163 * 164 * @since 2.8.0 165 * 166 * @param array &$errors An array of user profile update errors, passed by reference. 167 * @param bool $update Whether this is a user update. 168 * @param WP_User &$user WP_User object, passed by reference. 169 */ 153 170 do_action_ref_array( 'user_profile_update_errors', array( &$errors, $update, &$user ) ); 154 171 … … 185 202 186 203 $all_roles = $wp_roles->roles; 187 $editable_roles = apply_filters('editable_roles', $all_roles); 204 205 /** 206 * Filter the list of editable roles. 207 * 208 * @since 2.8.0 209 * 210 * @param array $all_roles List of roles. 211 */ 212 $editable_roles = apply_filters( 'editable_roles', $all_roles ); 188 213 189 214 return $editable_roles; … … 218 243 global $wpdb; 219 244 $query = $wpdb->prepare("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author = %d ORDER BY post_modified DESC", $user_id); 220 $query = apply_filters('get_users_drafts', $query); 245 246 /** 247 * Filter the user's drafts query string. 248 * 249 * @since 2.0.0 250 * 251 * @param string $query The user's drafts query string. 252 */ 253 $query = apply_filters( 'get_users_drafts', $query ); 221 254 return $wpdb->get_results( $query ); 222 255 } … … 245 278 return false; 246 279 247 // allow for transaction statement 248 do_action('delete_user', $id); 280 /** 281 * Fires immediately before a user is deleted from the database. 282 * 283 * @since 2.0.0 284 * 285 * @param int $id User ID. 286 */ 287 do_action( 'delete_user', $id ); 249 288 250 289 if ( 'novalue' === $reassign || null === $reassign ) { … … 258 297 } 259 298 299 /** 300 * Filter the list of post types to delete with a user. 301 * 302 * @since 3.4.0 303 * 304 * @param array $post_types_to_delete Post types to delete. 305 * @param int $id User ID. 306 */ 260 307 $post_types_to_delete = apply_filters( 'post_types_to_delete_with_user', $post_types_to_delete, $id ); 261 308 $post_types_to_delete = implode( "', '", $post_types_to_delete ); … … 302 349 clean_user_cache( $user ); 303 350 304 // allow for commit transaction 305 do_action('deleted_user', $id); 351 /** 352 * Fires immediately after a user is deleted from the database. 353 * 354 * @since 2.9.0 355 * 356 * @param int $id ID of the deleted user. 357 */ 358 do_action( 'deleted_user', $id ); 306 359 307 360 return true;
Note: See TracChangeset
for help on using the changeset viewer.