Changes from trunk/wp-admin/press-this.php at r17254 to branches/3.0/wp-admin/press-this.php at r15366
- File:
-
- 1 edited
-
branches/3.0/wp-admin/press-this.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-admin/press-this.php
r17254 r15366 7 7 */ 8 8 9 define('IFRAME_REQUEST' , true);10 11 9 /** WordPress Administration Bootstrap */ 12 10 require_once('./admin.php'); 13 14 11 header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 15 12 … … 28 25 function press_it() { 29 26 // define some basic variables 30 $quick = array();31 27 $quick['post_status'] = 'draft'; // set as draft first 32 28 $quick['post_category'] = isset($_POST['post_category']) ? $_POST['post_category'] : null; … … 64 60 wp_die($upload); 65 61 } else { 66 // Post formats67 if ( current_theme_supports( 'post-formats' ) && isset( $_POST['post_format'] ) ) {68 $post_formats = get_theme_support( 'post-formats' );69 if ( is_array( $post_formats ) ) {70 $post_formats = $post_formats[0];71 if ( in_array( $_POST['post_format'], $post_formats ) )72 set_post_format( $post_ID, $_POST['post_format'] );73 elseif ( '0' == $_POST['post_format'] )74 set_post_format( $post_ID, false );75 }76 }77 78 62 $quick['ID'] = $post_ID; 79 63 wp_update_post($quick); … … 127 111 <h2><label for="embed-code"><?php _e('Embed Code') ?></label></h2> 128 112 <div class="inside"> 129 <textarea name="embed-code" id="embed-code" rows="8" cols="40"><?php echo esc_textarea( $selection ); ?></textarea>113 <textarea name="embed-code" id="embed-code" rows="8" cols="40"><?php echo wp_htmledit_pre( $selection ); ?></textarea> 130 114 <p id="options"><a href="#" class="select button"><?php _e('Insert Video'); ?></a> <a href="#" class="close button"><?php _e('Cancel'); ?></a></p> 131 115 </div> … … 334 318 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();}}}; 335 319 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() ?>'}; 336 var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-this' , isRtl = <?php echo (int) is_rtl(); ?>;320 var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-this'; 337 321 var photostorage = false; 338 322 //]]> … … 344 328 do_action('admin_head'); 345 329 346 if ( user_can_richedit() ) {330 if ( user_can_richedit() ) 347 331 wp_tiny_mce( true, array( 'height' => '370' ) ); 348 add_action( 'admin_print_footer_scripts', 'wp_tiny_mce_preload_dialogs', 30 );349 }350 332 ?> 351 333 <script type="text/javascript"> … … 482 464 483 465 <div id="submitdiv" class="stuffbox"> 466 <div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>"> 467 <br/> 468 </div> 469 <h3><?php _e('Publish') ?></h3> 484 470 <div class="inside"> 485 471 <p> 486 <?php 487 submit_button( __( 'Save Draft' ), 'button', 'draft', false, array( 'id' => 'save' ) ); 488 if ( current_user_can('publish_posts') ) { 489 submit_button( __( 'Publish' ), 'primary', 'publish', false ); 490 } else { 491 echo '<br /><br />'; 492 submit_button( __( 'Submit for Review' ), 'primary', 'review', false ); 493 } ?> 472 <input class="button" type="submit" name="draft" value="<?php esc_attr_e('Save Draft') ?>" id="save" /> 473 <?php if ( current_user_can('publish_posts') ) { ?> 474 <input class="button-primary" type="submit" name="publish" value="<?php esc_attr_e('Publish') ?>" id="publish" /> 475 <?php } else { ?> 476 <br /><br /><input class="button-primary" type="submit" name="review" value="<?php esc_attr_e('Submit for Review') ?>" id="review" /> 477 <?php } ?> 494 478 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" id="saving" style="display:none;" /> 495 479 </p> 496 <?php if ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) :497 $post_formats = get_theme_support( 'post-formats' );498 if ( is_array( $post_formats[0] ) ) :499 $default_format = get_option( 'default_post_format', '0' );500 ?>501 <p>502 <label for="post_format"><?php _e( 'Post Format:' ); ?>503 <select name="post_format" id="post_format">504 <option value="0"><?php _e( 'Standard' ); ?></option>505 <?php foreach ( $post_formats[0] as $format ): ?>506 <option<?php selected( $default_format, $format ); ?> value="<?php echo esc_attr( $format ); ?>"> <?php echo esc_html( get_post_format_string( $format ) ); ?></option>507 <?php endforeach; ?>508 </select></label>509 </p>510 <?php endif; endif; ?>511 480 </div> 512 481 </div>
Note: See TracChangeset
for help on using the changeset viewer.