golden hour
/var/www/html/wp-content/plugins/the-events-calendar/common/src/Tribe
⬆️ Go Up
Upload
File/Folder
Size
Actions
Abstract_Deactivation.php
1.65 KB
Del
OK
Abstract_Plugin_Register.php
1.25 KB
Del
OK
Admin
-
Del
OK
Ajax
-
Del
OK
App_Shop.php
9.87 KB
Del
OK
Asset
-
Del
OK
Assets.php
24.69 KB
Del
OK
Assets_Pipeline.php
1.7 KB
Del
OK
Autoloader.php
8.31 KB
Del
OK
Cache.php
18.13 KB
Del
OK
Cache_Listener.php
5.92 KB
Del
OK
Changelog_Reader.php
1.5 KB
Del
OK
Container.php
11.36 KB
Del
OK
Context
-
Del
OK
Context.php
48.65 KB
Del
OK
Cost_Utils.php
16.44 KB
Del
OK
Credits.php
2.9 KB
Del
OK
Customizer
-
Del
OK
Customizer.php
25.29 KB
Del
OK
DB_Lock.php
10.04 KB
Del
OK
Data.php
5.21 KB
Del
OK
Date_Utils.php
48.59 KB
Del
OK
Db.php
876 B
Del
OK
Debug.php
1.54 KB
Del
OK
Debug_Bar
-
Del
OK
Dependency.php
16.47 KB
Del
OK
Deprecation.php
4.84 KB
Del
OK
Dialog
-
Del
OK
Documentation
-
Del
OK
Duplicate
-
Del
OK
Editor
-
Del
OK
Editor.php
6.58 KB
Del
OK
Error.php
4.51 KB
Del
OK
Exception.php
2.08 KB
Del
OK
Extension.php
13 KB
Del
OK
Extension_Loader.php
3.96 KB
Del
OK
Feature_Detection.php
7.51 KB
Del
OK
Field.php
22.38 KB
Del
OK
Field_Conditional.php
2.37 KB
Del
OK
Freemius.php
1.34 KB
Del
OK
Image
-
Del
OK
JSON_LD
-
Del
OK
Languages
-
Del
OK
Log
-
Del
OK
Log.php
11.33 KB
Del
OK
Main.php
23.13 KB
Del
OK
Meta
-
Del
OK
Models
-
Del
OK
Notices.php
1.49 KB
Del
OK
PUE
-
Del
OK
Plugin_Meta_Links.php
3.45 KB
Del
OK
Plugins.php
5.32 KB
Del
OK
Plugins_API.php
12.2 KB
Del
OK
Post_History.php
2.96 KB
Del
OK
Post_Transient.php
5.76 KB
Del
OK
Process
-
Del
OK
Promise.php
9.04 KB
Del
OK
Promoter
-
Del
OK
REST
-
Del
OK
Repository
-
Del
OK
Repository.php
100.06 KB
Del
OK
Rewrite.php
34.63 KB
Del
OK
Service_Providers
-
Del
OK
Settings.php
23.81 KB
Del
OK
Settings_Manager.php
9.78 KB
Del
OK
Settings_Tab.php
6.93 KB
Del
OK
Shortcode
-
Del
OK
Simple_Table.php
4.01 KB
Del
OK
Support
-
Del
OK
Support.php
14.43 KB
Del
OK
Tabbed_View
-
Del
OK
Tabbed_View.php
8.1 KB
Del
OK
Template.php
43.65 KB
Del
OK
Template_Factory.php
5.45 KB
Del
OK
Template_Part_Cache.php
2.74 KB
Del
OK
Templates.php
1.79 KB
Del
OK
Terms.php
1.51 KB
Del
OK
Timezones.php
18.21 KB
Del
OK
Tooltip
-
Del
OK
Tracker.php
12.51 KB
Del
OK
Traits
-
Del
OK
Updater.php
3.78 KB
Del
OK
Utils
-
Del
OK
Validate.php
16.54 KB
Del
OK
Validator
-
Del
OK
View_Helpers.php
9.64 KB
Del
OK
Widget
-
Del
OK
Edit: Post_Transient.php
<?php /** * A Class to handle Transients for posts, useful for caching complex structures * It uses the same logic as WordPress Transient, but instead of options it will * use the Post Meta as the table * * @since 4.1 */ class Tribe__Post_Transient { /** * Get (and instantiate, if necessary) the instance of the class * * @since 4.1 * @static * @return self * */ public static function instance() { return tribe( 'post-transient' ); } /** * Fetches the Transient Data * * @since 4.1 * * @param int $post_id The Post ID, can also be a WP_Post * @param string $transient Post Meta to Fetch * * @return mixed Value stored on the Post Transient. */ public function get( $post_id, $transient ) { global $_wp_using_ext_object_cache; if ( is_numeric( $post_id ) ) { $post_id = (int) $post_id; } else { $post = get_post( $post_id ); $post_id = $post->ID; } if ( has_filter( 'tribe_pre_post_meta_transient_' . $transient ) ) { /** * Attach an action before getting the new Transient * * @since 4.1 * * @param int $post_id Post ID * @param string $transient The Post Meta Key */ $pre = apply_filters( 'tribe_pre_post_meta_transient_' . $transient, $post_id, $transient ); if ( false !== $pre ) { return $pre; } } if ( $_wp_using_ext_object_cache ) { $value = wp_cache_get( "tribe_{$transient}-{$post_id}", "tribe_post_meta_transient-{$post_id}" ); } else { $meta_timeout = '_transient_timeout_' . $transient; $meta = '_transient_' . $transient; $value = get_post_meta( $post_id, $meta, false ); // if there aren't any values, communicate that it did not fetch data from post transient if ( ! is_array( $value ) || 0 === count( $value ) ) { return false; } // grab the first value, because that's all we care about $value = current( $value ); if ( $value && ! defined( 'WP_INSTALLING' ) ) { if ( get_post_meta( $post_id, $meta_timeout, true ) < time() ) { $this->delete( $post_id, $transient ); return false; } } } /** * Attach an action after getting the new Transient * * @since 4.1 * * @param int $post_id Post ID * @param string $transient The Post Meta Key */ return has_filter( 'tribe_post_meta_transient_' . $transient ) ? apply_filters( 'tribe_post_meta_transient_' . $transient, $value, $post_id ) : $value; } /** * Delete a post meta transient. * * @since 4.1 * * @param int $post_id The Post ID, can also be a WP_Post. * @param string $transient Post Meta to Delete. * @param string $value Only delete if the value Matches. * * @return boolean If we were able to delete the transient. */ public function delete( $post_id, $transient, $value = null ) { global $_wp_using_ext_object_cache; if ( is_numeric( $post_id ) ) { $post_id = (int) $post_id; } else { $post = get_post( $post_id ); $post_id = $post->ID; } /** * Use this to pre attach an action to deleting a Post Transient * * @since 4.1 * * @param int $post_id Post ID * @param string $transient The Post Meta Key */ do_action( 'tribe_delete_post_meta_transient_' . $transient, $post_id, $transient ); if ( $_wp_using_ext_object_cache ) { $result = wp_cache_delete( "tribe_{$transient}-{$post_id}", "tribe_post_meta_transient-{$post_id}" ); } else { $meta_timeout = '_transient_timeout_' . $transient; $meta = '_transient_' . $transient; $result = delete_post_meta( $post_id, $meta, $value ); if ( $result ) { delete_post_meta( $post_id, $meta_timeout, $value ); } } if ( $result ) { /** * Use this to attach an Action to when the Transient is deleted * * @since 4.1 * * @param int $post_id Post ID * @param string $transient The Post Meta Key */ do_action( 'tribe_deleted_post_meta_transient', $transient, $post_id, $transient ); } return $result; } /** * Sets a new value for the Transient. * * @since 4.1 * * @param int $post_id The Post ID, can also be a WP_Post. * @param string $transient Post Meta to set. * @param string $value Only delete if the value Matches. * @param int $expiration How long this transient will be valid, in seconds. * * @return int|false Meta ID on success, false on failure. */ public function set( $post_id, $transient, $value, $expiration = 0 ) { global $_wp_using_ext_object_cache; if ( is_numeric( $post_id ) ) { $post_id = (int) $post_id; } else { $post = get_post( $post_id ); $post_id = $post->ID; } $this->delete( $post_id, $transient ); /** * Attach an action before setting the new Transient * * @since 4.1 * * @param int $post_id Post ID * @param string $transient The Post Meta Key */ if ( has_filter( 'tribe_pre_set_post_meta_transient_' . $transient ) ) { $value = apply_filters( 'tribe_pre_set_post_meta_transient_' . $transient, $value, $post_id, $transient ); } if ( $_wp_using_ext_object_cache ) { $result = wp_cache_set( "tribe_{$transient}-{$post_id}", $value, "tribe_post_meta_transient-{$post_id}", $expiration ); } else { $meta_timeout = '_transient_timeout_' . $transient; $meta = '_transient_' . $transient; if ( $expiration ) { add_post_meta( $post_id, $meta_timeout, time() + $expiration, true ); } $result = add_post_meta( $post_id, $meta, $value, true ); } if ( $result ) { /** * Attach an action after setting the new Transient * * @since 4.1 * * @param int $post_id Post ID * @param string $transient The Post Meta Key */ do_action( 'tribe_set_post_meta_transient_' . $transient, $post_id, $transient ); } return $result; } }
Save