]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/press-this.php
WordPress 3.7.2-scripts
[autoinstalls/wordpress.git] / wp-admin / press-this.php
index 6542fa31e85975e2ea019053c8ccf122a2c255f7..5e9e2596112d5afd2927f2a4e855dcb30ab84021 100644 (file)
@@ -9,7 +9,7 @@
 define('IFRAME_REQUEST' , true);
 
 /** WordPress Administration Bootstrap */
-require_once('./admin.php');
+require_once( dirname( __FILE__ ) . '/admin.php' );
 
 header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
 
@@ -91,11 +91,11 @@ if ( isset($_REQUEST['action']) && 'post' == $_REQUEST['action'] ) {
 }
 
 // Set Variables
-$title = isset( $_GET['t'] ) ? trim( strip_tags( html_entity_decode( stripslashes( $_GET['t'] ) , ENT_QUOTES) ) ) : '';
+$title = isset( $_GET['t'] ) ? trim( strip_tags( html_entity_decode( wp_unslash( $_GET['t'] ) , ENT_QUOTES) ) ) : '';
 
 $selection = '';
 if ( !empty($_GET['s']) ) {
-       $selection = str_replace(''', "'", stripslashes($_GET['s']));
+       $selection = str_replace(''', "'", wp_unslash($_GET['s']));
        $selection = trim( htmlspecialchars( html_entity_decode($selection, ENT_QUOTES) ) );
 }
 
@@ -303,16 +303,19 @@ die;
 <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', 'relative' ); ?>', pagenow = 'press-this', isRtl = <?php echo (int) is_rtl(); ?>;
 var photostorage = false;
 //]]>
 </script>
 
 <?php
-       do_action('admin_print_styles');
-       do_action('admin_print_scripts');
-       do_action('admin_head');
+       do_action( 'admin_enqueue_scripts', 'press-this.php' );
+       do_action( 'admin_print_styles-press-this.php' );
+       do_action( 'admin_print_styles' );
+       do_action( 'admin_print_scripts-press-this.php' );
+       do_action( 'admin_print_scripts' );
+       do_action( 'admin_head-press-this.php' );
+       do_action( 'admin_head' );
 ?>
        <script type="text/javascript">
        var wpActiveEditor = 'content';
@@ -477,7 +480,7 @@ $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace(
                                        <p>
                                                <label for="post_format"><?php _e( 'Post Format:' ); ?>
                                                <select name="post_format" id="post_format">
-                                                       <option value="0"><?php _ex( 'Standard', 'Post format' ); ?></option>
+                                                       <option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
                                                <?php foreach ( $post_formats[0] as $format ): ?>
                                                        <option<?php selected( $default_format, $format ); ?> value="<?php echo esc_attr( $format ); ?>"> <?php echo esc_html( get_post_format_string( $format ) ); ?></option>
                                                <?php endforeach; ?>
@@ -586,7 +589,7 @@ $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace(
                        </div>
                </div>
 
-               <div id="waiting" style="display: none"><span class="spinner"></span> <span><?php esc_html_e( 'Loading...' ); ?></span></div>
+               <div id="waiting" style="display: none"><span class="spinner"></span> <span><?php esc_html_e( 'Loading&hellip;' ); ?></span></div>
 
                <div id="extra-fields" style="display: none"></div>