2008-05-15 18:57:14 -04:00
|
|
|
<?php
|
2008-08-11 16:26:31 -04:00
|
|
|
/**
|
2008-09-05 14:53:32 -04:00
|
|
|
* Defines the Gears manifest file for Google Gears offline storage.
|
2008-08-11 16:26:31 -04:00
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Administration
|
|
|
|
*/
|
2008-05-15 18:57:14 -04:00
|
|
|
|
2009-04-20 14:18:39 -04:00
|
|
|
/**
|
2009-04-15 15:55:41 -04:00
|
|
|
* Disable error reporting
|
2009-04-20 14:18:39 -04:00
|
|
|
*
|
2009-04-15 15:55:41 -04:00
|
|
|
* Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging
|
|
|
|
*/
|
|
|
|
error_reporting(0);
|
|
|
|
|
2008-08-11 16:26:31 -04:00
|
|
|
/** Set ABSPATH for execution */
|
2009-04-04 23:32:49 -04:00
|
|
|
define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' );
|
|
|
|
define( 'WPINC', 'wp-includes' );
|
2008-05-15 18:57:14 -04:00
|
|
|
|
2009-04-24 06:48:08 -04:00
|
|
|
require(ABSPATH . '/wp-admin/includes/manifest.php');
|
2008-05-15 18:57:14 -04:00
|
|
|
|
2009-04-24 06:48:08 -04:00
|
|
|
$man_version = '';
|
2008-05-15 18:57:14 -04:00
|
|
|
|
2009-04-24 06:48:08 -04:00
|
|
|
$files = get_manifest($man_version);
|
2008-05-22 11:27:28 -04:00
|
|
|
|
|
|
|
$man_version = md5($man_version);
|
2008-05-15 18:57:14 -04:00
|
|
|
|
2008-05-16 12:25:33 -04:00
|
|
|
header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
|
|
|
|
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
|
|
|
|
header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
|
|
|
|
header( 'Pragma: no-cache' );
|
2008-05-22 11:27:28 -04:00
|
|
|
header( 'Content-Type: application/x-javascript; charset=UTF-8' );
|
2008-05-15 18:57:14 -04:00
|
|
|
?>
|
|
|
|
{
|
|
|
|
"betaManifestVersion" : 1,
|
2008-12-01 16:32:51 -05:00
|
|
|
"version" : "<?php echo $man_version; ?>_20081201",
|
2008-05-15 18:57:14 -04:00
|
|
|
"entries" : [
|
2009-04-24 06:48:08 -04:00
|
|
|
<?php
|
|
|
|
$entries = '';
|
|
|
|
|
|
|
|
foreach ( $files as $file ) {
|
|
|
|
// If version is not set, just output the file
|
|
|
|
if ( !isset($file[1]) )
|
|
|
|
$entries .= '{ "url" : "' . $file[0] . '" },' . "\n";
|
|
|
|
// If ver is set but ignoreQuery is not, output file with ver tacked on
|
|
|
|
elseif ( !isset($file[2]) )
|
|
|
|
$entries .= '{ "url" : "' . $file[0] . '?ver=' . $file[1] . '" },' . "\n";
|
|
|
|
// Output url, src, and ignoreQuery
|
|
|
|
else
|
|
|
|
$entries .= '{ "url" : "' . $file[0] . '", "src" : "' . $file[0] . '?ver=' . $file[1] . '", "ignoreQuery" : true },' . "\n";
|
|
|
|
}
|
2008-11-30 05:22:16 -05:00
|
|
|
|
2009-04-24 06:48:08 -04:00
|
|
|
echo trim( trim($entries), ',' );
|
|
|
|
?>
|
2008-07-31 00:01:30 -04:00
|
|
|
|
2008-05-15 18:57:14 -04:00
|
|
|
]}
|