source: trunk/www.guidonia.net/wp/wp-admin/gears-manifest.php@ 44

Last change on this file since 44 was 44, checked in by luciano, 15 years ago
File size: 1.4 KB
Line 
1<?php
2/**
3 * Defines the Gears manifest file for Google Gears offline storage.
4 *
5 * @package WordPress
6 * @subpackage Administration
7 */
8
9/**
10 * Disable error reporting
11 *
12 * Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging
13 */
14error_reporting(0);
15
16/** Set ABSPATH for execution */
17define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' );
18
19require(ABSPATH . '/wp-admin/includes/manifest.php');
20
21$files = get_manifest();
22
23header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' );
24header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
25header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
26header( 'Pragma: no-cache' );
27header( 'Content-Type: application/x-javascript; charset=UTF-8' );
28?>
29{
30"betaManifestVersion" : 1,
31"version" : "<?php echo $man_version; ?>",
32"entries" : [
33<?php
34$entries = '';
35
36foreach ( $files as $file ) {
37 // If version is not set, just output the file
38 if ( !isset($file[1]) )
39 $entries .= '{ "url" : "' . $file[0] . '" },' . "\n";
40 // If ver is set but ignoreQuery is not, output file with ver tacked on
41 elseif ( !isset($file[2]) )
42 $entries .= '{ "url" : "' . $file[0] . '?' . $file[1] . '" },' . "\n";
43 // Output url, src, and ignoreQuery
44 else
45 $entries .= '{ "url" : "' . $file[0] . '", "src" : "' . $file[0] . '?' . $file[1] . '", "ignoreQuery" : true },' . "\n";
46}
47
48echo trim( trim($entries), ',' );
49?>
50
51]}
Note: See TracBrowser for help on using the repository browser.