Changeset 8446
- Timestamp:
- 07/24/2008 10:40:54 PM (16 years ago)
- Location:
- branches/crazyhorse/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/crazyhorse/wp-admin/includes/dashboard.php
r8443 r8446 309 309 echo $after_title; 310 310 311 if ( ( 'post' === strtolower( $_SERVER['REQUEST_METHOD'] ) ) && 'post-quickpress-save-cont' === $_POST['action'] ) { 312 $post = get_post_to_edit( $_POST['post_ID'] ); 313 } else { 314 $_REQUEST = array(); // hack 315 $post = get_default_post_to_edit(); 316 } 311 317 ?> 312 318 … … 314 320 <h3 id="quick-post-title"><label for="title"><?php _e('Title') ?></label></h3> 315 321 <div class="input-text-wrap"> 316 <input type="text" name="post_title" id="title" autocomplete="off" />322 <input type="text" name="post_title" id="title" autocomplete="off" value="<?php echo attribute_escape( $post->post_title ); ?>" /> 317 323 </div> 318 324 319 325 <h3><label for="content"><?php _e('Post') ?></label></h3> 320 326 <div class="textarea-wrap"> 321 <textarea name="content" id="quickpress-content" class="mceEditor" rows="3" cols="15">< /textarea>327 <textarea name="content" id="quickpress-content" class="mceEditor" rows="3" cols="15"><?php echo $post->post_content; ?></textarea> 322 328 </div> 323 329 324 330 <h3><label for="tags-input"><?php _e('Tags') ?></label></h3> 325 331 <div class="input-text-wrap"> 326 <input type="text" name="tags_input" id="tags-input" />332 <input type="text" name="tags_input" id="tags-input" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /> 327 333 </div> 328 334 <p class='field-tip'><?php _e('Separate tags with commas'); ?></p> … … 330 336 <p class="submit"> 331 337 <input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" /> 338 <input type="hidden" name="quickpress_post_ID" value="<?php echo (int) $post->ID; ?>" /> 332 339 <?php wp_nonce_field('add-post'); ?> 333 340 <input type="submit" name="save" id="save-post" class="button" value="<?php _e('Save'); ?>" /> 341 <input type="submit" name="save-cont" id="save-cont" class="button" value="<?php _e('Save and Continue'); ?>" /> 334 342 <input type="submit" name="publish" id="publish" accesskey="p" class="button button-highlighted" value="<?php _e('Publish'); ?>" /> 335 343 </p> … … 398 406 399 407 $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } ); 408 $('#save-cont').click( function() { act.val( 'post-quickpress-save-cont' ); } ); 400 409 }; 401 410 jQuery( quickPressLoad ); -
branches/crazyhorse/wp-admin/post.php
r8371 r8446 62 62 case 'post-quickpress-publish': 63 63 case 'post-quickpress-save': 64 case 'post-quickpress-save-cont': 64 65 check_admin_referer('add-post'); 65 66 … … 67 68 $_POST['publish'] = 'publish'; // tell write_post() to publish 68 69 69 $post_ID = 'postajaxpost' == $action ? edit_post() : write_post(); 70 if ( !empty( $_POST['quickpress_post_ID'] ) ) { 71 $_POST['post_ID'] = (int) $_POST['quickpress_post_ID']; 72 $post_ID = edit_post(); 73 } else { 74 $post_ID = 'postajaxpost' == $action ? edit_post() : write_post(); 75 } 70 76 71 77 if ( 0 === strpos( $action, 'post-quickpress' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.