Server IP : 15.235.198.142 / Your IP : 216.73.216.190 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/kiwigrass_LIVE/wp-content/plugins/wpforms-lite/includes/functions/ |
Upload File : |
<?php /** * Helper functions to work with Providers API. * * @since 1.8.0 */ /** * Get an array of all the active provider addons. * * @since 1.4.7 * * @return array */ function wpforms_get_providers_available() { return (array) apply_filters( 'wpforms_providers_available', [] ); } /** * Get options for all providers. * * @since 1.4.7 * * @param string $provider Define a single provider to get options for this one only. * * @return array */ function wpforms_get_providers_options( $provider = '' ) { $options = get_option( 'wpforms_providers', [] ); $provider = sanitize_key( $provider ); $data = $options; if ( ! empty( $provider ) && isset( $options[ $provider ] ) ) { $data = $options[ $provider ]; } return (array) apply_filters( 'wpforms_get_providers_options', $data, $provider ); } /** * Update options for all providers. * * @since 1.4.7 * * @param string $provider Provider slug. * @param array|false $options If false is passed - provider will be removed. Otherwise saved. * @param string $key Optional key to identify which connection to update. If empty - generate a new one. */ function wpforms_update_providers_options( $provider, $options, $key = '' ) { $providers = wpforms_get_providers_options(); $id = ! empty( $key ) ? $key : uniqid(); $provider = sanitize_key( $provider ); if ( $options ) { $providers[ $provider ][ $id ] = (array) $options; } else { unset( $providers[ $provider ] ); } update_option( 'wpforms_providers', $providers ); }