Changes from branches/3.1/wp-admin/press-this.php at r18017 to trunk/wp-admin/press-this.php at r18283
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/press-this.php
r18017 r18283 241 241 var my_src = eval( 242 242 jQuery.ajax({ 243 244 243 type: "GET", 244 url: "<?php echo esc_url($_SERVER['PHP_SELF']); ?>", 245 245 cache : false, 246 246 async : false, 247 247 data: "ajax=photo_images&u=<?php echo urlencode($url); ?>", 248 248 dataType : "script" 249 249 }).responseText … … 252 252 var my_src = eval( 253 253 jQuery.ajax({ 254 255 254 type: "GET", 255 url: "<?php echo esc_url($_SERVER['PHP_SELF']); ?>", 256 256 cache : false, 257 257 async : false, 258 258 data: "ajax=photo_images&u=<?php echo urlencode($url); ?>", 259 259 dataType : "script" 260 260 }).responseText … … 313 313 return false; 314 314 } 315 jQuery('#extra-fields').html('<div class="postbox"><h2> Add Photos<small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul class="actions"><li><a href="#" id="photo-add-url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>');315 jQuery('#extra-fields').html('<div class="postbox"><h2><?php _e( 'Add Photos' ); ?> <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul class="actions"><li><a href="#" id="photo-add-url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>'); 316 316 jQuery('#img_container').html(strtoappend); 317 317 <?php break; … … 333 333 wp_enqueue_style( 'colors' ); 334 334 wp_enqueue_script( 'post' ); 335 wp_enqueue_script( 'editor' );336 335 ?> 337 336 <script type="text/javascript"> … … 348 347 do_action('admin_print_scripts'); 349 348 do_action('admin_head'); 350 351 if ( user_can_richedit() ) {352 wp_tiny_mce( true, array( 'height' => '370' ) );353 add_action( 'admin_print_footer_scripts', 'wp_tiny_mce_preload_dialogs', 30 );354 }355 349 ?> 356 350 <script type="text/javascript"> … … 373 367 if ( '' != text && tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden()) { 374 368 tinyMCE.execCommand('mceSetContent', false, tinyMCE.activeEditor.getContent({format : 'raw'}) + '<p>' + text + '</p>'); 375 tinyMCE.execCommand('mceCleanup');376 369 } else { 377 370 insert_plain_editor(text); … … 419 412 }); 420 413 jQuery('#photo-add-url').attr('href', '?ajax=photo_thickbox_url&height=200&width=500'); 421 tb_init('#extra-fields .thickbox');422 414 jQuery('#waiting').hide(); 423 415 jQuery('#extra-fields').show(); … … 450 442 window.resizeTo(720,540); 451 443 // set button actions 452 444 jQuery('#photo_button').click(function() { show('photo'); return false; }); 453 445 jQuery('#video_button').click(function() { show('video'); return false; }); 454 446 // auto select … … 470 462 </head> 471 463 <body class="press-this wp-admin"> 472 <div id="wphead"></div> 464 <?php 465 if ( user_can_richedit() ) { 466 wp_tiny_mce( true, array( 'height' => '370' ) ); 467 } 468 ?> 473 469 <form action="press-this.php?action=post" method="post"> 474 470 <div id="poststuff" class="metabox-holder"> 475 471 <div id="side-info-column"> 476 472 <div class="sleeve"> 477 <h1 id="viewsite"><a href="<?php echo get_option('home'); ?>/" target="_blank"><?php bloginfo('name'); ?> › <?php _e('Press This') ?></a></span></h1>478 479 473 <?php wp_nonce_field('press-this') ?> 480 474 <input type="hidden" name="post_type" id="post_type" value="text"/> … … 486 480 <div class="photolist"></div> 487 481 488 <div id="submitdiv" class="stuffbox"> 482 <div id="submitdiv" class="postbox"> 483 <div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>"><br /></div> 484 <h3 class="hndle"><?php _e('Press This') ?></h3> 489 485 <div class="inside"> 490 <p >486 <p id="publishing-actions"> 491 487 <?php 492 488 submit_button( __( 'Save Draft' ), 'button', 'draft', false, array( 'id' => 'save' ) ); … … 568 564 </div> 569 565 570 <div id="tagsdiv-post_tag" class=" stuffbox">566 <div id="tagsdiv-post_tag" class="postbox"> 571 567 <div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>"> 572 568 <br/> … … 585 581 <div class="tagchecklist"></div> 586 582 </div> 587 <p class="tagcloud-link"><a href="#titlediv" class="tagcloud-link" id="link-post_tag"><?php _e('Choose from the most used tags in Post Tags'); ?></a></p>583 <p class="tagcloud-link"><a href="#titlediv" class="tagcloud-link" id="link-post_tag"><?php _e('Choose from the most used tags'); ?></a></p> 588 584 </div> 589 585 </div> … … 591 587 </div> 592 588 <div class="posting"> 589 590 <div id="wphead"> 591 <img id="header-logo" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" alt="" width="16" height="16" /> 592 <h1 id="site-heading"> 593 <a href="<?php echo get_option('home'); ?>/" target="_blank"> 594 <span id="site-title"><?php bloginfo('name'); ?></span> 595 </a> 596 </h1> 597 </div> 598 593 599 <?php if ( isset($posted) && intval($posted) ) { $post_ID = intval($posted); ?> 594 600 <div id="message" class="updated"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="<?php echo get_edit_post_link( $post_ID ); ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit Post'); ?></a> | <a href="#" onclick="window.close();"><?php _e('Close Window'); ?></a></p></div> … … 604 610 605 611 <div class="postdivrich"> 606 <ul id="actions" class="actions"> 607 608 <li id="photo_button"> 609 Add: <?php if ( current_user_can('upload_files') ) { ?><a title="<?php _e('Insert an Image'); ?>" href="#"> 610 <img alt="<?php _e('Insert an Image'); ?>" src="<?php echo esc_url( admin_url( 'images/media-button-image.gif?ver=20100531' ) ); ?>"/></a> 611 <?php } ?> 612 </li> 613 <li id="video_button"> 614 <a title="<?php _e('Embed a Video'); ?>" href="#"><img alt="<?php _e('Embed a Video'); ?>" src="<?php echo esc_url( admin_url( 'images/media-button-video.gif?ver=20100531' ) ); ?>"/></a> 615 </li> 616 <?php if ( user_can_richedit() ) { ?> 617 <li id="switcher"> 618 <?php wp_print_scripts( 'quicktags' ); ?> 619 <?php add_filter('the_editor_content', 'wp_richedit_pre'); ?> 612 <div id="editor-toolbar"> 613 <?php if ( user_can_richedit() ) : 614 wp_print_scripts( 'quicktags' ); 615 add_filter('the_editor_content', 'wp_richedit_pre'); ?> 620 616 <a id="edButtonHTML" onclick="switchEditors.go('content', 'html');"><?php _e('HTML'); ?></a> 621 617 <a id="edButtonPreview" class="active" onclick="switchEditors.go('content', 'tinymce');"><?php _e('Visual'); ?></a> 622 618 <div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('content')" /></div> 623 </li> 624 <?php } ?> 625 </ul> 619 <?php endif; ?> 620 621 <div id="media-buttons"> 622 <?php 623 _e( 'Add:' ); 624 625 if ( current_user_can('upload_files') ) : ?> 626 <a id="photo_button" title="<?php _e('Insert an Image'); ?>" href="#"> 627 <img alt="<?php _e('Insert an Image'); ?>" src="<?php echo esc_url( admin_url( 'images/media-button-image.gif?ver=20100531' ) ); ?>"/></a><?php 628 endif; 629 ?><a id="video_button" title="<?php _e('Embed a Video'); ?>" href="#"><img alt="<?php _e('Embed a Video'); ?>" src="<?php echo esc_url( admin_url( 'images/media-button-video.gif?ver=20100531' ) ); ?>"/></a> 630 </div> 631 </div> 626 632 <div id="quicktags"></div> 627 633 <div class="editor-container">
Note: See TracChangeset
for help on using the changeset viewer.