2008-05-16 00:57:14 +02:00
|
|
|
<?php
|
2008-08-11 22:26:31 +02:00
|
|
|
/**
|
2008-09-05 20:53:32 +02:00
|
|
|
* Defines the Gears manifest file for Google Gears offline storage.
|
2008-08-11 22:26:31 +02:00
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Administration
|
|
|
|
*/
|
2008-05-16 00:57:14 +02:00
|
|
|
|
2009-04-20 20:18:39 +02:00
|
|
|
/**
|
2009-04-15 21:55:41 +02:00
|
|
|
* Disable error reporting
|
2009-04-20 20:18:39 +02:00
|
|
|
*
|
2009-04-15 21:55:41 +02:00
|
|
|
* Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging
|
|
|
|
*/
|
|
|
|
error_reporting(0);
|
|
|
|
|
2008-08-11 22:26:31 +02:00
|
|
|
/** Set ABSPATH for execution */
|
2009-04-05 05:32:49 +02:00
|
|
|
define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' );
|
2008-05-16 00:57:14 +02:00
|
|
|
|
2009-04-24 12:48:08 +02:00
|
|
|
require(ABSPATH . '/wp-admin/includes/manifest.php');
|
2008-05-16 00:57:14 +02:00
|
|
|
|
2009-05-18 22:29:26 +02:00
|
|
|
$files = get_manifest();
|
2008-05-16 00:57:14 +02:00
|
|
|
|
2008-05-16 18:25:33 +02: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 17:27:28 +02:00
|
|
|
header( 'Content-Type: application/x-javascript; charset=UTF-8' );
|
2008-05-16 00:57:14 +02:00
|
|
|
?>
|
|
|
|
{
|
|
|
|
"betaManifestVersion" : 1,
|
2009-05-18 22:29:26 +02:00
|
|
|
"version" : "<?php echo $man_version; ?>",
|
2008-05-16 00:57:14 +02:00
|
|
|
"entries" : [
|
2009-04-24 12:48:08 +02:00
|
|
|
<?php
|
|
|
|
$entries = '';
|
|
|
|
|
|
|
|
foreach ( $files as $file ) {
|
2010-05-30 10:45:50 +02:00
|
|
|
// Set ignoreQuery, defaulting to true
|
|
|
|
$ignore_query = ( isset($file[2]) && !$file[2] ) ? '' : ', "ignoreQuery" : true ';
|
|
|
|
|
2009-04-24 12:48:08 +02:00
|
|
|
// If version is not set, just output the file
|
|
|
|
if ( !isset($file[1]) )
|
2010-05-30 10:45:50 +02:00
|
|
|
$entries .= '{ "url" : "' . $file[0] . '"' . $ignore_query . ' }' . "\n";
|
|
|
|
// Output url and src
|
2009-04-24 12:48:08 +02:00
|
|
|
else
|
2010-05-30 10:45:50 +02:00
|
|
|
$entries .= '{ "url" : "' . $file[0] . '", "src" : "' . $file[0] . '?' . $file[1] . '"' . $ignore_query . ' },' . "\n";
|
2009-04-24 12:48:08 +02:00
|
|
|
}
|
2008-11-30 11:22:16 +01:00
|
|
|
|
2009-04-24 12:48:08 +02:00
|
|
|
echo trim( trim($entries), ',' );
|
|
|
|
?>
|
2008-07-31 06:01:30 +02:00
|
|
|
|
2008-05-16 00:57:14 +02:00
|
|
|
]}
|