~canonical-sysadmins/wordpress/4.6.1

« back to all changes in this revision

Viewing changes to wp-admin/includes/class-wp-terms-list-table.php

  • Committer: Nick Moffitt
  • Date: 2016-04-14 10:44:19 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: nick.moffitt@canonical.com-20160414104419-w6lxcr3ru4enc2w5
Merge WP4.5 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
375
375
                        get_edit_term_link( $tag->term_id, $taxonomy, $this->screen->post_type )
376
376
                );
377
377
 
378
 
                $out = '<strong><a class="row-title" href="' . esc_url( $edit_link ) . '" title="' . esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $name ) ) . '">' . $name . '</a></strong><br />';
 
378
                $out = sprintf(
 
379
                        '<strong><a class="row-title" href="%s" aria-label="%s">%s</a></strong><br />',
 
380
                        esc_url( $edit_link ),
 
381
                        /* translators: %s: taxonomy term name */
 
382
                        esc_attr( sprintf( __( '&#8220;%s&#8221; (Edit)' ), $tag->name ) ),
 
383
                        $name
 
384
                );
379
385
 
380
386
                $out .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">';
381
387
                $out .= '<div class="name">' . $qe_data->name . '</div>';
429
435
 
430
436
                $actions = array();
431
437
                if ( current_user_can( $tax->cap->edit_terms ) ) {
432
 
                        $actions['edit'] = '<a href="' . esc_url( $edit_link ) . '">' . __( 'Edit' ) . '</a>';
433
 
                        $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __( 'Quick&nbsp;Edit' ) . '</a>';
434
 
                }
435
 
                if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term )
436
 
                        $actions['delete'] = "<a class='delete-tag' href='" . wp_nonce_url( "edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ) . "'>" . __( 'Delete' ) . "</a>";
437
 
                if ( $tax->public )
438
 
                        $actions['view'] = '<a href="' . get_term_link( $tag ) . '">' . __( 'View' ) . '</a>';
 
438
                        $actions['edit'] = sprintf(
 
439
                                '<a href="%s" aria-label="%s">%s</a>',
 
440
                                esc_url( $edit_link ),
 
441
                                /* translators: %s: taxonomy term name */
 
442
                                esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $tag->name ) ),
 
443
                                __( 'Edit' )
 
444
                        );
 
445
                        $actions['inline hide-if-no-js'] = sprintf(
 
446
                                '<a href="#" class="editinline aria-button-if-js" aria-label="%s">%s</a>',
 
447
                                /* translators: %s: taxonomy term name */
 
448
                                esc_attr( sprintf( __( 'Quick edit &#8220;%s&#8221; inline' ), $tag->name ) ),
 
449
                                __( 'Quick&nbsp;Edit' )
 
450
                        );
 
451
                }
 
452
                if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term ) {
 
453
                        $actions['delete'] = sprintf(
 
454
                                '<a href="%s" class="delete-tag aria-button-if-js" aria-label="%s">%s</a>',
 
455
                                wp_nonce_url( "edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ),
 
456
                                /* translators: %s: taxonomy term name */
 
457
                                esc_attr( sprintf( __( 'Delete &#8220;%s&#8221;' ), $tag->name ) ),
 
458
                                __( 'Delete' )
 
459
                        );
 
460
                }
 
461
                if ( $tax->public ) {
 
462
                        $actions['view'] = sprintf(
 
463
                                '<a href="%s" aria-label="%s">%s</a>',
 
464
                                get_term_link( $tag ),
 
465
                                /* translators: %s: taxonomy term name */
 
466
                                esc_attr( sprintf( __( 'View &#8220;%s&#8221; archive' ), $tag->name ) ),
 
467
                                __( 'View' )
 
468
                        );
 
469
                }
439
470
 
440
471
                /**
441
472
                 * Filter the action links displayed for each term in the Tags list table.