| @@ -45,24 +45,4 @@ | ||
| 45 | 45 | unset( $wp_to_buffer ); |
| 46 | 46 | |
| 47 | 47 | } |
| 48 | 48 | add_action( 'wp_to_buffer_media_cleanup_cron', 'wp_to_buffer_media_cleanup_cron' ); |
| 49 | - | |
| 50 | -/** | |
| 51 | - * Define the WP Cron function to refresh access tokens before they expire | |
| 52 | - * | |
| 53 | - * @since 6.2.0 | |
| 54 | - */ | |
| 55 | -function wp_to_buffer_refresh_token_cron() { | |
| 56 | - | |
| 57 | - // Initialise Plugin. | |
| 58 | - $wp_to_buffer = WP_To_Buffer::get_instance(); | |
| 59 | - $wp_to_buffer->initialize(); | |
| 60 | - | |
| 61 | - // Refresh any access tokens that are due to expire. | |
| 62 | - $wp_to_buffer->get_class( 'cron' )->refresh_token(); | |
| 63 | - | |
| 64 | - // Shutdown. | |
| 65 | - unset( $wp_to_buffer ); | |
| 66 | - | |
| 67 | -} | |
| 68 | -add_action( 'wp_to_buffer_refresh_token_cron', 'wp_to_buffer_refresh_token_cron' ); | |