| Server IP : 43.130.17.34 / Your IP : 216.73.217.6 Web Server : nginx/1.28.0 System : Linux VM-4-12-opencloudos 6.6.92-34.1.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 25 21:32:13 CST 2025 x86_64 User : www ( 1000) PHP Version : 8.0.26 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/yespkg.com/wp-content/plugins/bb-plugin/classes/ |
Upload File : |
<?php
/**
* Base class for third party services.
*
* @since 1.5.4
*/
abstract class FLBuilderService {
/**
* The ID for this service such as aweber or mailchimp.
*
* @since 1.5.4
* @var string $id
*/
public $id = '';
/**
* Test the API connection.
*
* @since 1.5.4
* @param array $fields
* @return array{
* @type bool|string $error The error message or false if no error.
* @type array $data An array of data used to make the connection.
* }
*/
abstract public function connect( $fields = array() );
/**
* Renders the markup for the connection settings.
*
* @since 1.5.4
* @return string The connection settings markup.
*/
abstract public function render_connect_settings();
/**
* Render the markup for service specific fields.
*
* @since 1.5.4
* @param string $account The name of the saved account.
* @param object $settings Saved module settings.
* @return array {
* @type bool|string $error The error message or false if no error.
* @type string $html The field markup.
* }
*/
abstract public function render_fields( $account, $settings );
/**
* Get the saved data for a specific account.
*
* @since 1.5.4
* @param string $account The account name.
* @return array|bool The account data or false if it doesn't exist.
*/
public function get_account_data( $account )
{
$saved_services = FLBuilderModel::get_services();
if ( isset( $saved_services[ $this->id ] ) && isset( $saved_services[ $this->id ][ $account ] ) ) {
return $saved_services[ $this->id ][ $account ];
}
return false;
}
}