芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/wpforms-lite/src/Integrations/LiteConnect/RefreshAccessTokenTask.php
hooks(); } /** * Initialize the hooks. * * @since 1.7.4 */ private function hooks() { // Process the tasks as needed. add_action( self::LITE_CONNECT_TASK, [ $this, 'process' ] ); } /** * Creates a task to refresh the Lite Connect access token via Action Scheduler. * * @since 1.7.4 */ public function create() { $action_id = wpforms()->get( 'tasks' ) ->create( self::LITE_CONNECT_TASK ) ->once( time() + 6 * DAY_IN_SECONDS ) ->register(); if ( $action_id === null ) { wpforms_log( 'Lite Connect: error creating the AS task', [ 'task' => self::LITE_CONNECT_TASK, ], [ 'type' => [ 'error' ] ] ); } } /** * Process the task to regenerate the access token. * * @since 1.7.4 */ public function process() { $this->get_access_token( $this->get_site_key(), true ); } }