Ticket #8760: just-checkbox-changes.diff
File just-checkbox-changes.diff, 1.9 KB (added by , 16 years ago) |
---|
-
wp-admin/includes/template.php
1805 1805 if ( strlen( $short_url ) > 35 ) 1806 1806 $short_url = substr( $short_url, 0, 32 ).'...'; 1807 1807 $numposts = get_usernumposts( $user_object->ID ); 1808 $checkbox = ''; 1809 // Check if the user for this row is editable 1808 1810 if ( current_user_can( 'edit_user', $user_object->ID ) ) { 1811 // Set up the user editing link 1812 // TODO: make profile/user-edit determination a seperate function 1809 1813 if ($current_user->ID == $user_object->ID) { 1810 1814 $edit_link = 'profile.php'; 1811 1815 } else { 1812 1816 $edit_link = clean_url( add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ) ); 1813 1817 } 1814 1818 $edit = "<strong><a href=\"$edit_link\">$user_object->user_login</a></strong><br />"; 1819 1820 // Set up the hover actions for this user 1815 1821 $actions = array(); 1816 1822 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 1817 1823 if ( $current_user->ID != $user_object->ID ) … … 1825 1831 $edit .= "<span class='$action'>$link$sep</span>"; 1826 1832 } 1827 1833 $edit .= '</div>'; 1834 1835 // Set up the checkbox (because the user is editable, otherwise its empty) 1836 $checkbox = "<input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' />"; 1837 1828 1838 } else { 1829 1839 $edit = '<strong>' . $user_object->user_login . '</strong>'; 1830 1840 } … … 1844 1854 1845 1855 switch ($column_name) { 1846 1856 case 'cb': 1847 $r .= "<th scope='row' class='check-column'> <input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' /></th>";1857 $r .= "<th scope='row' class='check-column'>$checkbox</th>"; 1848 1858 break; 1849 1859 case 'username': 1850 1860 $r .= "<td $attributes>$avatar $edit</td>";