WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r5057 r5159  
    4848    $post_ID = $p = (int) $_GET['post'];
    4949    $post = get_post($post_ID);
    50    
     50
    5151    if ( 'page' == $post->post_type ) {
    5252        wp_redirect("page.php?action=edit&post=$post_ID");
     
    6767    include('edit-form-advanced.php');
    6868
    69     ?>
    70     <div id='preview' class='wrap'>
    71     <h2 id="preview-post"><?php _e('Post Preview (updated when post is saved)'); ?></h2>
    72         <iframe src="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe>
    73     </div>
    74     <?php
    7569    break;
    7670
     
    120114            $referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
    121115        $referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
    122    
     116
    123117        if ($_POST['save']) {
    124118            $location = "post.php?action=edit&post=$post_ID";
     
    161155
    162156    $sendback = wp_get_referer();
    163     if (strstr($sendback, 'post.php')) $sendback = get_option('siteurl') .'/wp-admin/post-new.php';
    164     elseif (strstr($sendback, 'attachments.php')) $sendback = get_option('siteurl') .'/wp-admin/attachments.php';
     157    if (strpos($sendback, 'post.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/post-new.php';
     158    elseif (strpos($sendback, 'attachments.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/attachments.php';
    165159    $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
    166160    wp_redirect($sendback);
Note: See TracChangeset for help on using the changeset viewer.