]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/load-scripts.php
WordPress 3.7.2-scripts
[autoinstalls/wordpress.git] / wp-admin / load-scripts.php
index 95a0c0ccf7a70cc9c2de711b778a15a7c77af202..8dfe3b18ad37487d470942348a212451d8e22108 100644 (file)
@@ -21,7 +21,6 @@ function __() {}
  */
 function _x() {}
 
-
 /**
  * @ignore
  */
@@ -52,6 +51,11 @@ function is_lighttpd_before_150() {}
  */
 function add_action() {}
 
+/**
+ * @ignore
+ */
+function did_action() {}
+
 /**
  * @ignore
  */
@@ -92,6 +96,13 @@ function includes_url() {}
  */
 function wp_guess_url() {}
 
+if ( ! function_exists( 'json_encode' ) ) :
+/**
+ * @ignore
+ */
+function json_encode() {}
+endif;
+
 function get_file($path) {
 
        if ( function_exists('realpath') )
@@ -103,8 +114,12 @@ function get_file($path) {
        return @file_get_contents($path);
 }
 
-$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $_GET['load'] );
-$load = explode(',', $load);
+$load = $_GET['load'];
+if ( is_array( $load ) )
+       $load = implode( '', $load );
+
+$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
+$load = array_unique( explode( ',', $load ) );
 
 if ( empty($load) )
        exit;
@@ -114,7 +129,7 @@ require(ABSPATH . WPINC . '/version.php');
 
 $compress = ( isset($_GET['c']) && $_GET['c'] );
 $force_gzip = ( $compress && 'gzip' == $_GET['c'] );
-$expires_offset = 31536000;
+$expires_offset = 31536000; // 1 year
 $out = '';
 
 $wp_scripts = new WP_Scripts();