Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r6256 r5637  
    33
    44wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
    5 
    6 if ( ! current_user_can('manage_links') )
    7     wp_die( __('You do not have sufficient permissions to edit the links for this blog.') );
    85
    96if ('' != $_POST['deletebookmarks'])
     
    1714
    1815switch ($action) {
    19     case 'deletebookmarks' :
     16        case 'deletebookmarks' :
    2017        check_admin_referer('bulk-bookmarks');
     18
     19        // check the current user's level first.
     20        if (!current_user_can('manage_links'))
     21            wp_die(__('Cheatin’ uh?'));
    2122
    2223        //for each link id (in $linkcheck[]) change category to selected value
     
    4142        check_admin_referer('bulk-bookmarks');
    4243
     44        // check the current user's level first.
     45        if (!current_user_can('manage_links'))
     46            wp_die(__('Cheatin’ uh?'));
     47
    4348        //for each link id (in $linkcheck[]) change category to selected value
    4449        if (count($linkcheck) == 0) {
     
    5964        add_link();
    6065
    61         wp_redirect( wp_get_referer() . '?added=true' );
     66        wp_redirect(wp_get_referer().'?added=true');
    6267        exit;
    6368        break;
     
    7782        check_admin_referer('delete-bookmark_' . $link_id);
    7883
     84        if (!current_user_can('manage_links'))
     85            wp_die(__('Cheatin’ uh?'));
     86
    7987        wp_delete_link($link_id);
    8088
     
    9098        $submenu_file = 'link-manager.php';
    9199        $title = __('Edit Link');
     100        include_once ('admin-header.php');
     101        if (!current_user_can('manage_links'))
     102            wp_die(__('You do not have sufficient permissions to edit the links for this blog.'));
    92103
    93104        $link_id = (int) $_GET['link_id'];
     
    96107            wp_die(__('Link not found.'));
    97108
    98         include_once ('admin-header.php');
    99109        include ('edit-link-form.php');
    100         include ('admin-footer.php');
    101110        break;
    102111
     
    104113        break;
    105114}
     115
     116include ('admin-footer.php');
    106117?>
Note: See TracChangeset for help on using the changeset viewer.