WordPress.org

Make WordPress Core

Changeset 10915


Ignore:
Timestamp:
04/12/09 17:32:03 (6 years ago)
Author:
ryan
Message:

Use stylesheet directory when deleting a theme so we don't accidentally delete a parent theme. Props ionfish. fixes #9519

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/themes.php

    r10823 r10915  
    192192    $actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . attribute_escape(sprintf(__('Preview "%s"'), $theme_name)) . '">' . __('Preview') . '</a>'; 
    193193    if ( current_user_can('update_themes') ) 
    194         $actions[] = '<a class="submitdelete deletion" href="' . wp_nonce_url("themes.php?action=delete&amp;template=$template", 'delete-theme_' . $template) . '" onclick="' . "if ( confirm('" . js_escape(sprintf( __("You are about to delete this theme '%s'\n  'Cancel' to stop, 'OK' to delete."), $theme_name )) . "') ) {return true;}return false;" . '">' . __('Delete') . '</a>'; 
     194        $actions[] = '<a class="submitdelete deletion" href="' . wp_nonce_url("themes.php?action=delete&amp;template=$stylesheet", 'delete-theme_' . $stylesheet) . '" onclick="' . "if ( confirm('" . js_escape(sprintf( __("You are about to delete this theme '%s'\n  'Cancel' to stop, 'OK' to delete."), $theme_name )) . "') ) {return true;}return false;" . '">' . __('Delete') . '</a>'; 
    195195    $actions = apply_filters('theme_action_links', $actions, $themes[$theme_name]); 
    196196 
Note: See TracChangeset for help on using the changeset viewer.