Ticket #5592: 5592.diff
File 5592.diff, 6.0 KB (added by , 17 years ago) |
---|
-
wp-includes/script-loader.php
119 119 $this->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists'), '20071104' ); 120 120 $this->add( 'admin-posts', '/wp-admin/js/edit-posts.js', array('wp-lists'), '20071023' ); 121 121 $this->add( 'admin-users', '/wp-admin/js/users.js', array('wp-lists'), '20070823' ); 122 $this->add( 'admin-forms', '/wp-admin/js/forms.js', array('wp-lists'), '20080108' ); 122 123 $this->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' ); 123 124 $this->add( 'upload', '/wp-admin/js/upload.js', array('jquery'), '20070518' ); 124 125 $this->add( 'post', '/wp-admin/js/post.js', array('suggest'), '20080102' ); -
wp-admin/users.php
209 209 <form action="" method="post" name="updateusers" id="updateusers"> 210 210 <?php wp_nonce_field('delete-users') ?> 211 211 <?php echo $referer; ?> 212 212 213 <div class="wrap"> 213 214 <h2><?php _e('Delete Users'); ?></h2> 214 215 <p><?php _e('You have specified these users for deletion:'); ?></p> … … 270 271 271 272 default: 272 273 wp_enqueue_script('admin-users'); 273 274 wp_enqueue_script('admin-forms'); 275 274 276 include('admin-header.php'); 275 277 276 278 // Query the users … … 385 387 <?php endif; ?> 386 388 </tr> 387 389 <tr class="thead"> 390 <th><input type="checkbox" onclick="checkAllUsers('<?php echo $role; ?>')"/></th> 388 391 <th><?php _e('ID') ?></th> 389 392 <th><?php _e('Username') ?></th> 390 393 <th><?php _e('Name') ?></th> … … 397 400 $style = ''; 398 401 foreach ( (array) $roleclass as $user_object ) { 399 402 $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; 400 echo "\n\t" . user_row($user_object, $style );403 echo "\n\t" . user_row($user_object, $style, $role); 401 404 } 402 405 ?> 403 406 -
wp-admin/edit-comments.php
4 4 $title = __('Edit Comments'); 5 5 $parent_file = 'edit-comments.php'; 6 6 wp_enqueue_script( 'admin-comments' ); 7 wp_enqueue_script('admin-forms'); 7 8 8 9 require_once('admin-header.php'); 9 10 if (empty($_GET['mode'])) $mode = 'view'; 10 11 else $mode = attribute_escape($_GET['mode']); 11 12 ?> 12 13 <script type="text/javascript">14 <!--15 function checkAll(form)16 {17 for (i = 0, n = form.elements.length; i < n; i++) {18 if(form.elements[i].type == "checkbox") {19 if(form.elements[i].checked == true)20 form.elements[i].checked = false;21 else22 form.elements[i].checked = true;23 }24 }25 }26 27 function getNumChecked(form)28 {29 var num = 0;30 for (i = 0, n = form.elements.length; i < n; i++) {31 if(form.elements[i].type == "checkbox") {32 if(form.elements[i].checked == true)33 num++;34 }35 }36 return num;37 }38 //-->39 </script>40 13 <div class="wrap"> 41 14 <h2><?php _e('Comments'); ?></h2> 42 15 <form name="searchform" action="" method="get" id="editcomments"> -
wp-admin/admin-ajax.php
387 387 $x = new WP_Ajax_Response( array( 388 388 'what' => 'user', 389 389 'id' => $user_id, 390 'data' => user_row( $user_object ),390 'data' => user_row( $user_object, '', $user_object->roles[0] ), 391 391 'supplemental' => array( 392 392 'show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login), 393 393 'role' => $user_object->roles[0] -
wp-admin/includes/template.php
313 313 } 314 314 } 315 315 316 function user_row( $user_object, $style = '' ) {316 function user_row( $user_object, $style = '', $role = '' ) { 317 317 if ( !( is_object( $user_object) && is_a( $user_object, 'WP_User' ) ) ) 318 318 $user_object = new WP_User( (int) $user_object ); 319 319 $email = $user_object->user_email; … … 326 326 $short_url = substr( $short_url, 0, 32 ).'...'; 327 327 $numposts = get_usernumposts( $user_object->ID ); 328 328 $r = "<tr id='user-$user_object->ID'$style> 329 <td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' value='{$user_object->ID}' /> <label for='user_{$user_object->ID}'>{$user_object->ID}</label></td>329 <td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' /> <label for='user_{$user_object->ID}'>{$user_object->ID}</label></td> 330 330 <td><label for='user_{$user_object->ID}'><strong>$user_object->user_login</strong></label></td> 331 331 <td><label for='user_{$user_object->ID}'>$user_object->first_name $user_object->last_name</label></td> 332 332 <td><a href='mailto:$email' title='" . sprintf( __('e-mail: %s' ), $email ) . "'>$email</a></td> -
wp-admin/link-manager.php
7 7 require_once ('admin.php'); 8 8 9 9 wp_enqueue_script( 'wp-lists' ); 10 wp_enqueue_script('admin-forms'); 10 11 11 12 wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]')); 12 13 … … 45 46 break; 46 47 } 47 48 ?> 48 <script type="text/javascript"> 49 /* <![CDATA[ */ 50 function checkAll(form) 51 { 52 for (i = 0, n = form.elements.length; i < n; i++) { 53 if(form.elements[i].type == "checkbox") { 54 if(form.elements[i].checked == true) 55 form.elements[i].checked = false; 56 else 57 form.elements[i].checked = true; 58 } 59 } 60 } 61 62 jQuery(function($){$('#the-list').wpList();}); 63 64 /* ]]> */ 65 </script> 66 49 <script type="text/javascript" src="js/edit-comments.js"></script> 67 50 <?php 68 51 if ( isset($_GET['deleted']) ) { 69 52 echo '<div style="background-color: rgb(207, 235, 247);" id="message" class="updated fade"><p>';