| Server IP : 3.93.235.159 / Your IP : 216.73.216.140 Web Server : Apache System : Linux ip-172-26-0-169 5.10.0-46-cloud-amd64 #1 SMP Debian 5.10.262-1 (2026-07-31) x86_64 User : bitnami ( 1000) PHP Version : 8.2.9 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/send-app/core/integrations/options/ |
Upload File : |
<?php
namespace Send_App\Core\Integrations\Options;
use Send_App\Core\Options_Utils;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Disabled_Forms_Option {
const PREFIX_OPTION_NAME = 'send_app_disabled_forms_';
public static function get_all( $integration ): array {
return Options_Utils::get_option( self::PREFIX_OPTION_NAME . $integration, [] );
}
public static function add( string $form_id, string $integration ): void {
$disabled_forms = self::get_all( $integration );
if ( ! in_array( $form_id, $disabled_forms, true ) ) {
$disabled_forms[] = $form_id;
Options_Utils::update_option( self::PREFIX_OPTION_NAME . $integration, $disabled_forms );
do_action( "send_app/form/{$integration}/integration/disabled" );
}
}
public static function remove( string $form_id, string $integration ): void {
$disabled_forms = self::get_all( $integration );
$disabled_forms = array_diff( $disabled_forms, [ $form_id ] );
Options_Utils::update_option( self::PREFIX_OPTION_NAME . $integration, $disabled_forms );
do_action( "send_app/form/{$integration}/integration/enabled" );
}
}