Changeset 35924
- Timestamp:
- 12/14/2015 04:06:55 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php
r35241 r35924 400 400 if ( ! $allowed ) { 401 401 if ( ! $theme->errors() ) { 402 $actions['enable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=enable&theme=' . $theme_key . '&paged=' . $page . '&s=' . $s, 'enable-theme_' . $stylesheet ) ) . '" title="' . esc_attr__('Enable this theme') . '" class="edit">' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . '</a>'; 402 $url = add_query_arg( array( 403 'action' => 'enable', 404 'theme' => $theme_key, 405 'paged' => $page, 406 's' => $s, 407 ), $url ); 408 409 if ( $this->is_site_themes ) { 410 /* translators: %s: theme name */ 411 $aria_label = sprintf( __( 'Enable %s' ), $theme->display( 'Name' ) ); 412 } else { 413 /* translators: %s: theme name */ 414 $aria_label = sprintf( __( 'Network Enable %s' ), $theme->display( 'Name' ) ); 415 } 416 417 $actions['enable'] = sprintf( '<a href="%s" class="edit" aria-label="%s">%s</a>', 418 esc_url( wp_nonce_url( $url, 'enable-theme_' . $stylesheet ) ), 419 esc_attr( $aria_label ), 420 ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) 421 ); 403 422 } 404 423 } else { 405 $actions['disable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=disable&theme=' . $theme_key . '&paged=' . $page . '&s=' . $s, 'disable-theme_' . $stylesheet ) ) . '" title="' . esc_attr__('Disable this theme') . '">' . ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . '</a>'; 424 $url = add_query_arg( array( 425 'action' => 'disable', 426 'theme' => $theme_key, 427 'paged' => $page, 428 's' => $s, 429 ), $url ); 430 431 if ( $this->is_site_themes ) { 432 /* translators: %s: theme name */ 433 $aria_label = sprintf( __( 'Disable %s' ), $theme->display( 'Name' ) ); 434 } else { 435 /* translators: %s: theme name */ 436 $aria_label = sprintf( __( 'Network Disable %s' ), $theme->display( 'Name' ) ); 437 } 438 439 $actions['disable'] = sprintf( '<a href="%s" aria-label="%s">%s</a>', 440 esc_url( wp_nonce_url( $url, 'disable-theme_' . $stylesheet ) ), 441 esc_attr( $aria_label ), 442 ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) 443 ); 406 444 } 407 445 408 446 if ( current_user_can('edit_themes') ) { 409 $actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . $theme_key ) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>'; 447 $url = add_query_arg( array( 448 'theme' => $theme_key, 449 ), 'theme-editor.php' ); 450 451 /* translators: %s: theme name */ 452 $aria_label = sprintf( __( 'Open %s in the Theme Editor' ), $theme->display( 'Name' ) ); 453 454 $actions['edit'] = sprintf( '<a href="%s" class="edit" aria-label="%s">%s</a>', 455 esc_url( $url ), 456 esc_attr( $aria_label ), 457 __( 'Edit' ) 458 ); 410 459 } 411 460 412 461 if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) { 413 $actions['delete'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=delete-selected&checked[]=' . $theme_key . '&theme_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-themes' ) ) . '" title="' . esc_attr__( 'Delete this theme' ) . '" class="delete">' . __( 'Delete' ) . '</a>'; 462 $url = add_query_arg( array( 463 'action' => 'delete-selected', 464 'checked[]' => $theme_key, 465 'theme_status' => $context, 466 'paged' => $page, 467 's' => $s, 468 ), 'themes.php' ); 469 470 /* translators: %s: theme name */ 471 $aria_label = sprintf( __( 'Delete %s' ), $theme->display( 'Name' ) ); 472 473 $actions['delete'] = sprintf( '<a href="%s" class="delete" aria-label="%s">%s</a>', 474 esc_url( wp_nonce_url( $url, 'bulk-themes' ) ), 475 esc_attr( $aria_label ), 476 __( 'Delete' ) 477 ); 414 478 } 415 479 /** … … 496 560 497 561 if ( $theme->get('ThemeURI') ) { 498 $theme_meta[] = '<a href="' . $theme->display('ThemeURI') . '" title="' . esc_attr__( 'Visit theme homepage' ) . '">' . __( 'Visit Theme Site' ) . '</a>'; 562 /* translators: %s: theme name */ 563 $aria_label = sprintf( __( 'Visit %s homepage' ), $theme->display( 'Name' ) ); 564 565 $theme_meta[] = sprintf( '<a href="%s" aria-label="%s">%s</a>', 566 $theme->display( 'ThemeURI' ), 567 esc_attr( $aria_label ), 568 __( 'Visit Theme Site' ) 569 ); 499 570 } 500 571 /**
Note: See TracChangeset
for help on using the changeset viewer.