Make WordPress Core

Ticket #32254: 32254.patch

File 32254.patch, 9.2 KB (added by afercia, 10 years ago)
  • src/wp-admin/includes/class-wp-links-list-table.php

     
    150150                                                echo "<td $attributes><strong><a class='row-title' href='$edit_link' title='" . esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $link->link_name ) ) . "'>$link->link_name</a></strong><br />";
    151151
    152152                                                $actions = array();
    153                                                 $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';
    154153                                                $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( "link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id ) . "' onclick=\"if ( confirm( '" . esc_js( sprintf( __( "You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete." ), $link->link_name ) ) . "' ) ) { return true;}return false;\">" . __( 'Delete' ) . "</a>";
    155154                                                echo $this->row_actions( $actions );
    156155
  • src/wp-admin/includes/class-wp-media-list-table.php

     
    506506                $actions = array();
    507507
    508508                if ( $this->detached ) {
    509                         if ( current_user_can( 'edit_post', $post->ID ) )
    510                                 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '">' . __( 'Edit' ) . '</a>';
    511509                        if ( current_user_can( 'delete_post', $post->ID ) )
    512510                                if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
    513511                                        $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=trash&amp;post=$post->ID", 'trash-post_' . $post->ID ) . "'>" . __( 'Trash' ) . "</a>";
     
    520518                                $actions['attach'] = '<a href="#the-list" onclick="findPosts.open( \'media[]\',\''.$post->ID.'\' );return false;" class="hide-if-no-js">'.__( 'Attach' ).'</a>';
    521519                }
    522520                else {
    523                         if ( current_user_can( 'edit_post', $post->ID ) && !$this->is_trash )
    524                                 $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '">' . __( 'Edit' ) . '</a>';
    525521                        if ( current_user_can( 'delete_post', $post->ID ) ) {
    526522                                if ( $this->is_trash )
    527523                                        $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=untrash&amp;post=$post->ID", 'untrash-post_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>";
     
    544540                 * @since 2.8.0
    545541                 *
    546542                 * @param array   $actions  An array of action links for each attachment.
    547                  *                          Default 'Edit', 'Delete Permanently', 'View'.
     543                 *                          Default 'Delete Permanently', 'View'.
    548544                 * @param WP_Post $post     WP_Post object for the current attachment.
    549545                 * @param bool    $detached Whether the list table contains media not attached
    550546                 *                          to any posts. Default true.
  • src/wp-admin/includes/class-wp-ms-sites-list-table.php

     
    279279                                                                'visit' => '',
    280280                                                        );
    281281
    282                                                         $actions['edit']        = '<span class="edit"><a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ) . '">' . __( 'Edit' ) . '</a></span>';
    283282                                                        $actions['backend']     = "<span class='backend'><a href='" . esc_url( get_admin_url( $blog['blog_id'] ) ) . "' class='edit'>" . __( 'Dashboard' ) . '</a></span>';
    284283                                                        if ( get_current_site()->blog_id != $blog['blog_id'] ) {
    285284                                                                if ( get_blog_status( $blog['blog_id'], 'deleted' ) == '1' )
  • src/wp-admin/includes/class-wp-ms-users-list-table.php

     
    196196                                                        <br/>
    197197                                                        <?php
    198198                                                                $actions = array();
    199                                                                 $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';
    200199
    201200                                                                if ( current_user_can( 'delete_user', $user->ID ) && ! in_array( $user->user_login, $super_admins ) ) {
    202201                                                                        $actions['delete'] = '<a href="' . $delete = esc_url( network_admin_url( add_query_arg( '_wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), wp_nonce_url( 'users.php', 'deleteuser' ) . '&amp;action=deleteuser&amp;id=' . $user->ID ) ) ) . '" class="delete">' . __( 'Delete' ) . '</a>';
     
    249248                                                                        echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . get_current_site()->domain, '', $val->domain . $path ) . '</a>';
    250249                                                                        echo ' <small class="row-actions">';
    251250                                                                        $actions = array();
    252                                                                         $actions['edit'] = '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a>';
    253251
    254252                                                                        $class = '';
    255253                                                                        if ( get_blog_status( $val->userblog_id, 'spam' ) == 1 )
  • src/wp-admin/includes/class-wp-posts-list-table.php

     
    755755
    756756                                $actions = array();
    757757                                if ( $can_edit_post && 'trash' != $post->post_status ) {
    758                                         $actions['edit'] = '<a href="' . get_edit_post_link( $post->ID ) . '" title="' . esc_attr__( 'Edit this item' ) . '">' . __( 'Edit' ) . '</a>';
    759758                                        $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr__( 'Edit this item inline' ) . '">' . __( 'Quick&nbsp;Edit' ) . '</a>';
    760759                                }
    761760                                if ( current_user_can( 'delete_post', $post->ID ) ) {
     
    789788                                         * @since 2.8.0
    790789                                         *
    791790                                         * @param array   $actions An array of row action links. Defaults are
    792                                          *                         'Edit', 'Quick Edit', 'Restore, 'Trash',
     791                                         *                         'Quick Edit', 'Restore, 'Trash',
    793792                                         *                         'Delete Permanently', 'Preview', and 'View'.
    794793                                         * @param WP_Post $post    The post object.
    795794                                         */
     
    804803                                         * @since 2.8.0
    805804                                         *
    806805                                         * @param array   $actions An array of row action links. Defaults are
    807                                          *                         'Edit', 'Quick Edit', 'Restore, 'Trash',
     806                                         *                         'Quick Edit', 'Restore, 'Trash',
    808807                                         *                         'Delete Permanently', 'Preview', and 'View'.
    809808                                         * @param WP_Post $post    The post object.
    810809                                         */
  • src/wp-admin/includes/class-wp-terms-list-table.php

     
    330330
    331331                $actions = array();
    332332                if ( current_user_can( $tax->cap->edit_terms ) ) {
    333                         $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';
    334333                        $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __( 'Quick&nbsp;Edit' ) . '</a>';
    335334                }
    336335                if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term )
     
    345344                 * @deprecated 3.0.0 Use {$taxonomy}_row_actions instead.
    346345                 *
    347346                 * @param array  $actions An array of action links to be displayed. Default
    348                  *                        'Edit', 'Quick Edit', 'Delete', and 'View'.
     347                 *                        'Quick Edit', 'Delete', and 'View'.
    349348                 * @param object $tag     Term object.
    350349                 */
    351350                $actions = apply_filters( 'tag_row_actions', $actions, $tag );
     
    358357                 * @since 3.0.0
    359358                 *
    360359                 * @param array  $actions An array of action links to be displayed. Default
    361                  *                        'Edit', 'Quick Edit', 'Delete', and 'View'.
     360                 *                        'Quick Edit', 'Delete', and 'View'.
    362361                 * @param object $tag     Term object.
    363362                 */
    364363                $actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag );
  • src/wp-admin/includes/class-wp-users-list-table.php

     
    363363
    364364                        if ( current_user_can( 'edit_user',  $user_object->ID ) ) {
    365365                                $edit = "<strong><a href=\"$edit_link\">$user_object->user_login</a></strong><br />";
    366                                 $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';
    367366                        } else {
    368367                                $edit = "<strong>$user_object->user_login</strong><br />";
    369368                        }
     
    379378                         * @since 2.8.0
    380379                         *
    381380                         * @param array   $actions     An array of action links to be displayed.
    382                          *                             Default 'Edit', 'Delete' for single site, and
    383                          *                             'Edit', 'Remove' for Multisite.
     381                         *                             Default 'Delete' for single site, and
     382                         *                             'Remove' for Multisite.
    384383                         * @param WP_User $user_object WP_User object for the currently-listed user.
    385384                         */
    386385                        $actions = apply_filters( 'user_row_actions', $actions, $user_object );