Ticket #2188: 2188.diff

File 2188.diff, 2.1 KB (added by davidhouse, 6 years ago)
  • wp-includes/classes.php

     
    225225                if ('' != $qv['comments_popup']) { 
    226226                        $this->is_comments_popup = true; 
    227227                } 
     228                 
     229                //if we're previewing inside the write screen 
     230                if ('' != $qv['preview']) { 
     231                        $this->is_preview = true; 
     232                } 
    228233 
    229234                if (strstr($_SERVER['PHP_SELF'], 'wp-admin/')) { 
    230235                        $this->is_admin = true; 
     
    14471452} 
    14481453 
    14491454class WP { 
    1450         var $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 's', 'search', 'exact', 'sentence', 'debug', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id'); 
     1455        var $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 's', 'search', 'exact', 'sentence', 'debug', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview'); 
    14511456 
    14521457        var $private_query_vars = array('posts_per_page', 'posts_per_archive_page', 'what_to_show', 'showposts', 'nopaging', 'show_post_type'); 
    14531458 
  • wp-admin/post.php

     
    8282        ?> 
    8383        <div id='preview' class='wrap'> 
    8484        <h2 id="preview-post"><?php _e('Post Preview (updated when post is saved)'); ?> <small class="quickjump"><a href="#write-post"><?php _e('edit &uarr;'); ?></a></small></h2> 
    85                 <iframe src="<?php the_permalink(); ?>" width="100%" height="600" ></iframe> 
     85                <iframe src="<?php the_permalink(); ?>?preview=true" width="100%" height="600" ></iframe> 
    8686        </div> 
    8787        <?php 
    8888        break;