Make WordPress Core


Ignore:
Timestamp:
07/05/2006 10:00:03 PM (18 years ago)
Author:
ryan
Message:

Use wp_die(). Props filosofo. fixes #2914

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/inline-uploading.php

    r3983 r3985  
    66
    77if (!current_user_can('upload_files'))
    8     die(__('You do not have permission to upload files.'));
     8    wp_die(__('You do not have permission to upload files.'));
    99
    1010wp_reset_vars(array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment'));
     
    2323
    2424if ( !current_user_can('edit_post', (int) $attachment) )
    25     die(__('You are not allowed to delete this attachment.').' <a href="'.basename(__FILE__)."?post=$post&amp;all=$all&amp;action=upload\">".__('Go back').'</a>');
     25    wp_die(__('You are not allowed to delete this attachment.').' <a href="'.basename(__FILE__)."?post=$post&amp;all=$all&amp;action=upload\">".__('Go back').'</a>');
    2626
    2727wp_delete_attachment($attachment);
     
    3939
    4040if ( isset($file['error']) )
    41     die($file['error'] . '<br /><a href="' . basename(__FILE__) . '?action=upload&post=' . $post . '">'.__('Back to Image Uploading').'</a>');
     41    wp_die($file['error'] . '<br /><a href="' . basename(__FILE__) . '?action=upload&post=' . $post . '">'.__('Back to Image Uploading').'</a>');
    4242
    4343$url = $file['url'];
     
    277277
    278278default:
    279 die(__('This script was not meant to be called directly.'));
     279wp_die(__('This script was not meant to be called directly.'));
    280280}
    281281
Note: See TracChangeset for help on using the changeset viewer.