Make WordPress Core


Ignore:
Timestamp:
07/03/2006 07:03:37 PM (19 years ago)
Author:
ryan
Message:

wp_reset_vars() from Sewar. fixes #2888

File:
1 edited

Legend:

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

    r3830 r3946  
    77
    88
    9 $wpvarstoreset = array('action', 'cat_id', 'linkurl', 'name', 'image',
     9wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image',
    1010                       'description', 'visible', 'target', 'category', 'link_id',
    1111                       'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel',
    12                        'notes', 'linkcheck[]');
    13 for ($i=0; $i<count($wpvarstoreset); $i += 1) {
    14     $wpvar = $wpvarstoreset[$i];
    15     if (!isset($$wpvar)) {
    16         if (empty($_POST["$wpvar"])) {
    17             if (empty($_GET["$wpvar"])) {
    18                 $$wpvar = '';
    19             } else {
    20                 $$wpvar = $_GET["$wpvar"];
    21             }
    22         } else {
    23             $$wpvar = $_POST["$wpvar"];
    24         }
    25     }
    26 }
     12                       'notes', 'linkcheck[]'));
    2713
    2814wp_enqueue_script( array('xfn', 'dbx-admin-key?pagenow=link.php') );
Note: See TracChangeset for help on using the changeset viewer.