Fix Press This tags input, fixes #8743

git-svn-id: https://develop.svn.wordpress.org/trunk@10374 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-01-18 00:56:15 +00:00
parent ffd66244c7
commit aae58c3556
4 changed files with 17 additions and 3 deletions

View File

@ -212,6 +212,10 @@ var commentsBox, tagCloud;
jQuery(document).ready( function($) { jQuery(document).ready( function($) {
var categoryTabs, newCat, newCatParent = false, newCatParentOption = false, noSyncChecks = false, syncChecks, catAddAfter, dotabkey = true, stamp = $('#timestamp').html(), visibility = $('#post-visibility-display').html(), sticky = ''; var categoryTabs, newCat, newCatParent = false, newCatParentOption = false, noSyncChecks = false, syncChecks, catAddAfter, dotabkey = true, stamp = $('#timestamp').html(), visibility = $('#post-visibility-display').html(), sticky = '';
// for Press This
if ( typeof autosave != 'function' )
autosave = function(){};
// postboxes // postboxes
postboxes.add_postbox_toggles('post'); postboxes.add_postbox_toggles('post');

File diff suppressed because one or more lines are too long

View File

@ -55,7 +55,7 @@ function press_it() {
// define some basic variables // define some basic variables
$quick['post_status'] = 'draft'; // set as draft first $quick['post_status'] = 'draft'; // set as draft first
$quick['post_category'] = $_REQUEST['post_category']; $quick['post_category'] = $_REQUEST['post_category'];
$quick['tags_input'] = $_REQUEST['tags_input']; $quick['tax_input'] = $_REQUEST['tax_input'];
$quick['post_title'] = $_REQUEST['title']; $quick['post_title'] = $_REQUEST['title'];
$quick['post_content'] = ''; $quick['post_content'] = '';
@ -338,7 +338,16 @@ die;
wp_enqueue_style( 'colors' ); wp_enqueue_style( 'colors' );
wp_enqueue_script( 'post' ); wp_enqueue_script( 'post' );
wp_enqueue_script('editor'); wp_enqueue_script('editor');
?>
<script type="text/javascript">
//<![CDATA[
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'};
var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
//]]>
</script>
<?php
do_action('admin_print_styles'); do_action('admin_print_styles');
do_action('admin_print_scripts'); do_action('admin_print_scripts');
do_action('admin_head'); do_action('admin_head');
@ -549,5 +558,6 @@ die;
</div> </div>
</form> </form>
<?php do_action('admin_print_footer_scripts'); ?> <?php do_action('admin_print_footer_scripts'); ?>
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
</body> </body>
</html> </html>

View File

@ -249,7 +249,7 @@ function wp_default_scripts( &$scripts ) {
'l10n_print_after' => 'try{convertEntities(slugL10n);}catch(e){};' 'l10n_print_after' => 'try{convertEntities(slugL10n);}catch(e){};'
) ); ) );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20090102' ); $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20090117' );
$scripts->add_data( 'post', 'group', 1 ); $scripts->add_data( 'post', 'group', 1 );
$scripts->localize( 'post', 'postL10n', array( $scripts->localize( 'post', 'postL10n', array(
'tagsUsed' => __('Tags used on this post:'), 'tagsUsed' => __('Tags used on this post:'),