Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Commit

Permalink
Remove wp-load.php and
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklenox committed Aug 12, 2014
1 parent 2dc795a commit 7c4d21b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 3 additions & 4 deletions manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
*
* The dynamic manifest file is constructed here
*/

/* Load WordPress */
include_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' );
$session = session_id();
if ( empty( $session ) ) session_start();

header( 'Content-Type: text/cache-manifest' );

echo 'CACHE MANIFEST
# version ' . get_option( '_wp_appcache_manifest_timestamp' ) . ' v1
# version ' . $_SESSION['wp_appcache_manifest_timestamp'] . ' v1
CACHE:
Expand Down
5 changes: 5 additions & 0 deletions wp-appcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ function wp_appcache_add_manifest() {
if ( ! is_user_logged_in() ) {
add_filter( 'language_attributes', 'wp_appcache_add_manifest_to_language_attributes' );

// Set the timestamp as a session variable
$session = session_id();
if ( empty( $session ) ) session_start();
$_SESSION['wp_appcache_manifest_timestamp'] = get_option( '_wp_appcache_manifest_timestamp' );

function wp_appcache_add_manifest_to_language_attributes( $output ) {
return $output . ' manifest="' . plugins_url( 'manifest.php', __FILE__ ) . '"';
}
Expand Down

0 comments on commit 7c4d21b

Please sign in to comment.