@@ -348,7 +348,7 @@ public function get_gist_html( $url, array $args ) {
348
348
349
349
if ( empty ( $ html ) ) {
350
350
$ html = get_transient ( $ raw_key );
351
- $ transient_expire = 86400 ; // 60 * 60 * 24 = 1 day
351
+ $ transient_expire = DAY_IN_SECONDS ;
352
352
353
353
if ( $ html && $ this ->unknown () != $ html ) {
354
354
$ html = $ this ->process_gist_html ( $ html , $ args );
@@ -384,7 +384,7 @@ public function get_gist_html( $url, array $args ) {
384
384
$ html = $ this ->process_gist_html ( $ fallback , $ args );
385
385
386
386
// Cache the fallback for an hour.
387
- $ transient_expire = 3600 ; // 60 * 60 = 1 hour
387
+ $ transient_expire = HOUR_IN_SECONDS ;
388
388
389
389
$ this ->debug_log ( __ ( '<strong>Raw Source:</strong> Post Meta Fallback ' , 'gistpress ' ), $ shortcode_hash );
390
390
$ this ->debug_log ( __ ( '<strong>Output Source:</strong> Processed Raw Source ' , 'gistpress ' ), $ shortcode_hash );
@@ -679,9 +679,9 @@ protected function get_file_name( $sanitized_filename, $delimiter, $id ) {
679
679
680
680
if ( $ json && ! empty ( $ json ->files ) ) {
681
681
$ gist_files = $ json ->files ;
682
- set_transient ( $ transient_key , $ gist_files , 604800 ); // 60 * 60 * 24 * 7 = 1 week
682
+ set_transient ( $ transient_key , $ gist_files , WEEK_IN_SECONDS );
683
683
} else {
684
- set_transient ( $ transient_key , array (), 900 ); // 60 * 15 = 15 minutes
684
+ set_transient ( $ transient_key , array (), MINUTE_IN_SECONDS * 15 );
685
685
}
686
686
}
687
687
0 commit comments