Make WordPress Core


Ignore:
Timestamp:
09/22/2008 10:04:10 PM (17 years ago)
Author:
ryan
Message:

Press This updates from noel. see #7732

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/press-this.php

    r8903 r8959  
    249249                img_attr += ' style="width: ' + w + 'px; height: ' + h + 'px;"';
    250250            }
    251             if (!skip) strtoappend += '<a href="?ajax=photo_thickbox&amp;i=' + img.src + '&amp;u=<?php echo $url; ?>&amp;height=400&amp;width=500" title="" class="thickbox"><img src="' + img.src + '" ' + img_attr + '/></a>';
     251            if (!skip) strtoappend += '<a href="?ajax=photo_thickbox&amp;i=' + encodeURI(img.src) + '&amp;u=<?php echo $url; ?>&amp;height=400&amp;width=500" title="" class="thickbox"><img src="' + img.src + '" ' + img_attr + '/></a>';
    252252        }
    253253
     
    258258                jQuery('.photolist').append('<input name="photo_src[' + length + ']" value="' + img +'" type="hidden"/>');
    259259                jQuery('.photolist').append('<input name="photo_description[' + length + ']" value="' + desc +'" type="hidden"/>');
    260                 append_editor("\n\n" + '<p><img src="' + img +'" alt="' + desc + '" class="aligncenter"/></p>');
     260                append_editor("\n\n" + '<p style="text-align: center;"><a href="<?php echo urlencode($url); ?>"><img src="' + img +'" alt="' + desc + '" /></a></p>');
    261261            }
    262262            tinyMCE.activeEditor.resizeToContent();
     
    431431
    432432    jQuery(document).ready(function() {
     433        top.resizeTo(700-screen.width+screen.availWidth,680-screen.height+screen.availHeight);
    433434        jQuery('#photo_button').click(function() { show('photo'); return false; });
    434435        jQuery('#video_button').click(function() { show('video'); return false; });
     
    451452</div>
    452453
    453 <?php
    454 if ( isset($posted) && intval($posted) ) {
    455     $post_ID = intval($posted);
    456 ?>
    457 <div id="message" class="updated fade"><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>
    458 <?php
    459 }
    460 ?>
    461454<form action="press-this.php?action=post" method="post">
    462455    <?php wp_nonce_field('press-this') ?>
    463456    <input type="hidden" name="post_type" id="post_type" value="text"/>
    464457   
    465     <div id="poststuff">
     458    <div id="poststuff">   
    466459    <div id="side-info-column">
    467460        <div class="sleeve">
     
    515508   
    516509        <div class="posting">
     510            <?php
     511            if ( isset($posted) && intval($posted) ) {
     512                $post_ID = intval($posted);
     513            ?>
     514            <div id="message" class="updated fade"><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>
     515            <?php
     516            }
     517            ?>
     518           
    517519            <h2 id="title"><label for="post_title"><?php _e('Title') ?></label></h2>
    518520            <div class="titlewrap">
Note: See TracChangeset for help on using the changeset viewer.