WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r5057 r5159  
    5353    if($post->post_status == 'draft') {
    5454        wp_enqueue_script('prototype');
     55        wp_enqueue_script('interface');
    5556        wp_enqueue_script('autosave');
    5657    }
     
    6162
    6263    include('edit-page-form.php');
    63     ?>
    64     <div id='preview' class='wrap'>
    65     <h2 id="preview-post"><?php _e('Page Preview (updated when page is saved)'); ?></h2>
    66         <iframe src="<?php echo clean_url(apply_filters('preview_page_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe>
    67     </div>
    68     <?php
    6964    break;
    7065
     
    107102
    108103        if ( isset($_POST['save']) )
    109             $location = "page.php?action=edit&post=$page_ID";       
     104            $location = "page.php?action=edit&post=$page_ID";
    110105    } else {
    111106        if ($_POST['save']) {
     
    148143
    149144    $sendback = wp_get_referer();
    150     if (strstr($sendback, 'page.php')) $sendback = get_option('siteurl') .'/wp-admin/page.php';
    151     elseif (strstr($sendback, 'attachments.php')) $sendback = get_option('siteurl') .'/wp-admin/attachments.php';
     145    if (strpos($sendback, 'page.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/page.php';
     146    elseif (strpos($sendback, 'attachments.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/attachments.php';
    152147    $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
    153148    wp_redirect($sendback);
Note: See TracChangeset for help on using the changeset viewer.