Skip to content
6 changes: 3 additions & 3 deletions php/class-connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public function history( $days = 1 ) {
$return = array();
$history = get_option( self::META_KEYS['history'], array() );
$plan = ! empty( $this->usage['plan'] ) ? $this->usage['plan'] : $this->credentials['cloud_name'];
for ( $i = 1; $i <= $days; $i ++ ) {
for ( $i = 1; $i <= $days; $i++ ) {
$date = date_i18n( 'd-m-Y', strtotime( '- ' . $i . ' days' ) );
if ( ! isset( $history[ $plan ][ $date ] ) || is_wp_error( $history[ $plan ][ $date ] ) ) {
$history[ $plan ][ $date ] = $this->api->usage( $date );
Expand Down Expand Up @@ -696,7 +696,7 @@ public function setup() {
* Setup Status cron.
*/
protected function setup_status_cron() {
Cron::register_process( 'check_status', array( $this, 'check_status' ), HOUR_IN_SECONDS );
Cron::register_process( 'check_status', array( $this, 'check_status' ), DAY_IN_SECONDS );
}

/**
Expand All @@ -705,7 +705,7 @@ protected function setup_status_cron() {
* @return void
*/
protected function setup_rest_api_cron() {
Cron::register_process( 'rest_api', array( $this, 'check_rest_api_connectivity' ), HOUR_IN_SECONDS );
Cron::register_process( 'rest_api', array( $this, 'check_rest_api_connectivity' ), DAY_IN_SECONDS );
}

/**
Expand Down
6 changes: 5 additions & 1 deletion php/class-cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ public function add_settings( $settings ) {
array(
'type' => 'cron',
'slug' => 'tasks',
'default' => array(),
'default' => array(
'update_asset_paths' => 'on',
'rest_api' => 'on',
'check_status' => 'on',
),
'cron' => $this,
),
),
Expand Down
2 changes: 1 addition & 1 deletion php/class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ protected function setup_endpoints() {
* The Cloudinary Video Player version.
*/
if ( ! defined( 'CLOUDINARY_ENDPOINTS_VIDEO_PLAYER_VERSION' ) ) {
define( 'CLOUDINARY_ENDPOINTS_VIDEO_PLAYER_VERSION', '2.3.5' );
define( 'CLOUDINARY_ENDPOINTS_VIDEO_PLAYER_VERSION', '3.0.1' );
}
}

Expand Down
13 changes: 13 additions & 0 deletions php/relate/class-relationship.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,19 @@ public function __get( $key ) {
return $return;
}

/**
* Check the existence of a relationship data value.
*
* @param string $key The key.
*
* @return bool
*/
public function __isset( $key ) {
$data_cache = $this->get_data();

return isset( $data_cache[ $key ] );
}

/**
* Set the save on shutdown flag.
*/
Expand Down