- Timestamp:
- 09/04/2012 10:35:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-ms-themes-list-table.php
r21752 r21755 278 278 ); 279 279 280 $theme_key = $theme->get_stylesheet(); 280 $stylesheet = $theme->get_stylesheet(); 281 $theme_key = urlencode( $stylesheet ); 281 282 282 283 if ( ! $allowed ) { 283 284 if ( ! $theme->errors() ) 284 $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>';285 $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>'; 285 286 } else { 286 $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>';287 $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>'; 287 288 } 288 289 289 290 if ( current_user_can('edit_themes') ) 290 $actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . urlencode( $theme_key )) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>';291 292 if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $ theme_key != get_option( 'stylesheet' ) && $theme_key!= get_option( 'template' ) )291 $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>'; 292 293 if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) 293 294 $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>'; 294 295 295 $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $ theme_key, $theme, $context );296 $actions = apply_filters( "theme_action_links_$ theme_key", $actions, $theme_key, $theme, $context );296 $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $stylesheet, $theme, $context ); 297 $actions = apply_filters( "theme_action_links_$stylesheet", $actions, $stylesheet, $theme, $context ); 297 298 298 299 $class = ! $allowed ? 'inactive' : 'active'; 299 300 $checkbox_id = "checkbox_" . md5( $theme->get('Name') ); 300 $checkbox = "<input type='checkbox' name='checked[]' value='" . esc_attr( $ theme_key) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $theme->display('Name') . "</label>";301 $checkbox = "<input type='checkbox' name='checked[]' value='" . esc_attr( $stylesheet ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $theme->display('Name') . "</label>"; 301 302 302 303 $id = sanitize_html_class( $theme->get_stylesheet() ); … … 342 343 $theme_meta[] = '<a href="' . $theme->display('ThemeURI') . '" title="' . esc_attr__( 'Visit theme homepage' ) . '">' . __( 'Visit Theme Site' ) . '</a>'; 343 344 344 $theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $ theme_key, $theme, $status );345 $theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $stylesheet, $theme, $status ); 345 346 echo implode( ' | ', $theme_meta ); 346 347 … … 350 351 default: 351 352 echo "<td class='$column_name column-$column_name'$style>"; 352 do_action( 'manage_themes_custom_column', $column_name, $ theme_key, $theme );353 do_action( 'manage_themes_custom_column', $column_name, $stylesheet, $theme ); 353 354 echo "</td>"; 354 355 } … … 358 359 359 360 if ( $this->is_site_themes ) 360 remove_action( "after_theme_row_$ theme_key", 'wp_theme_update_row' );361 do_action( 'after_theme_row', $ theme_key, $theme, $status );362 do_action( "after_theme_row_$ theme_key", $theme_key, $theme, $status );361 remove_action( "after_theme_row_$stylesheet", 'wp_theme_update_row' ); 362 do_action( 'after_theme_row', $stylesheet, $theme, $status ); 363 do_action( "after_theme_row_$stylesheet", $stylesheet, $theme, $status ); 363 364 } 364 365 }
Note: See TracChangeset
for help on using the changeset viewer.