Skip to content

Commit

Permalink
make latest_timestamp public
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Schreiber committed Apr 23, 2018
1 parent e97fff1 commit 279af0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion liveblog.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ final class WPCOM_Liveblog {
public static $is_rest_api_call = false;
public static $auto_archive_days = null;
public static $auto_archive_expiry_key = 'liveblog_autoarchive_expiry_date';
public static $latest_timestamp = false;


/** Load Methods **********************************************************/
Expand Down Expand Up @@ -987,6 +988,8 @@ public static function enqueue_scripts() {
self::add_default_plupload_settings();
}

self::$latest_timestamp = self::$entry_query->get_latest_timestamp();

wp_localize_script(
self::KEY, 'liveblog_settings',
apply_filters(
Expand All @@ -1004,7 +1007,7 @@ public static function enqueue_scripts() {
'image_nonce' => wp_create_nonce( 'media-form' ),
'default_image_size' => apply_filters( 'liveblog_default_image_size', self::DEFAULT_IMAGE_SIZE ),

'latest_entry_timestamp' => self::$entry_query->get_latest_timestamp(),
'latest_entry_timestamp' => self::$latest_timestamp,
'latest_entry_id' => self::$entry_query->get_latest_id(),
'timestamp' => time(),
'utc_offset' => get_option( 'gmt_offset' ) * 60, // in minutes
Expand Down

0 comments on commit 279af0f

Please sign in to comment.