From 8253a544165198b0ed0a341626789bb96f0800fa Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 1 Aug 2014 00:55:15 +0000 Subject: [PATCH] PressThis: when the Text editor is the default, run the initial textarea content through pre_wpautop() to convert the paragraph tags. Fixes #29081. Built from https://develop.svn.wordpress.org/trunk@29334 git-svn-id: http://core.svn.wordpress.org/trunk@29114 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/press-this.php | 8 ++++++++ wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index 6822941d2d..5daa2f9bbd 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -439,6 +439,8 @@ var photostorage = false; } } jQuery(document).ready(function($) { + var $contnet = $( '#content' ); + // Resize screen. window.resizeTo(760,580); @@ -460,6 +462,12 @@ var photostorage = false; $('#tagsdiv-post_tag, #categorydiv').children('h3, .handlediv').click(function(){ $(this).siblings('.inside').toggle(); }); + + if ( $( '#wp-content-wrap' ).hasClass( 'html-active' ) && window.switchEditors && + ( tinyMCEPreInit.mceInit.content && tinyMCEPreInit.mceInit.content.wpautop ) ) { + // The Text editor is default, run the initial content through pre_wpautop() to convert the paragraphs + $contnet.text( window.switchEditors.pre_wpautop( $contnet.text() ) ); + } }); diff --git a/wp-includes/version.php b/wp-includes/version.php index 4c1df53527..4368750bde 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.0-beta2-20140731'; +$wp_version = '4.0-beta2-20140801'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.