- Timestamp:
- 12/21/2010 04:50:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-ms-themes-list-table.php
r17050 r17101 232 232 if ( 'disabled' != $status ) 233 233 $actions['disable-selected'] = $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ); 234 if ( current_user_can( 'update_themes' ) && !$this->is_site_themes ) 235 $actions['update-selected'] = __( 'Update' ); 236 234 if ( ! $this->is_site_themes ) { 235 if ( current_user_can( 'delete_themes' ) ) 236 $actions['delete-selected'] = __( 'Delete' ); 237 if ( current_user_can( 'update_themes' ) ) 238 $actions['update-selected'] = __( 'Update' ); 239 } 237 240 return $actions; 238 241 } … … 266 269 'enable' => '', 267 270 'disable' => '', 268 'edit' => '' 271 'edit' => '', 272 'delete' => '' 269 273 ); 270 274 … … 272 276 273 277 if ( empty( $theme['enabled'] ) ) 274 $actions['enable'] = '<a href="' . wp_nonce_url($url . 'action=enable&theme=' . $theme_key . '&paged=' . $page . '&s=' . $s, 'enable-theme_' . $theme_key) . '" title="' .__('Enable this theme') . '" class="edit">' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . '</a>';278 $actions['enable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=enable&theme=' . $theme_key . '&paged=' . $page . '&s=' . $s, 'enable-theme_' . $theme_key) ) . '" title="' . esc_attr__('Enable this theme') . '" class="edit">' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . '</a>'; 275 279 else 276 $actions['disable'] = '<a href="' . wp_nonce_url($url . 'action=disable&theme=' . $theme_key . '&paged=' . $page . '&s=' . $s, 'disable-theme_' . $theme_key) . '" title="' .__('Disable this theme') . '">' . ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . '</a>';280 $actions['disable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=disable&theme=' . $theme_key . '&paged=' . $page . '&s=' . $s, 'disable-theme_' . $theme_key) ) . '" title="' . esc_attr__('Disable this theme') . '">' . ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . '</a>'; 277 281 278 282 if ( current_user_can('edit_themes') ) 279 $actions['edit'] = '<a href="theme-editor.php?theme=' . $theme['Name'] . '" title="' . __('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>'; 283 $actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . $theme['Name'] ) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>'; 284 285 if ( empty( $theme['enabled'] ) && current_user_can( 'delete_themes' ) && ! $this->is_site_themes ) 286 $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>'; 280 287 281 288 $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme_key, $theme, $context ); 282 289 $actions = apply_filters( "theme_action_links_$theme_key", $actions, $theme_key, $theme, $context ); 283 290 284 291 $class = empty( $theme['enabled'] ) ? 'inactive' : 'active'; 285 292 $checkbox_id = md5($theme['Name']) . "_checkbox"; … … 320 327 $author = $theme['Author']; 321 328 if ( !empty( $theme['Author URI'] ) ) 322 $author = '<a href="' . $theme['Author URI'] . '" title="' . __( 'Visit author homepage' ) . '">' . $theme['Author'] . '</a>';329 $author = '<a href="' . $theme['Author URI'] . '" title="' . esc_attr__( 'Visit author homepage' ) . '">' . $theme['Author'] . '</a>'; 323 330 $theme_meta[] = sprintf( __( 'By %s' ), $author ); 324 331 } 325 332 if ( !empty( $theme['Theme URI'] ) ) 326 $theme_meta[] = '<a href="' . $theme['Theme URI'] . '" title="' . __( 'Visit theme homepage' ) . '">' . __( 'Visit Theme Site' ) . '</a>';333 $theme_meta[] = '<a href="' . $theme['Theme URI'] . '" title="' . esc_attr__( 'Visit theme homepage' ) . '">' . __( 'Visit Theme Site' ) . '</a>'; 327 334 328 335 $theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $theme_key, $theme, $status );
Note: See TracChangeset
for help on using the changeset viewer.