PHP 8.2.31
Preview: class-providers.php Size: 1.84 KB
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/wpforms-lite/includes/class-providers.php

<?php

// phpcs:disable Generic.Commenting.DocComment.MissingShort
/** @noinspection PhpIllegalPsrClassPathInspection */
/** @noinspection AutoloadingIssuesInspection */
// phpcs:enable Generic.Commenting.DocComment.MissingShort

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

use WPForms\Integrations\ConstantContact\V3\ConstantContact;

/**
 * Load the providers.
 *
 * @since 1.3.6
 */
class WPForms_Providers {

	/**
	 * Primary class constructor.
	 *
	 * @since 1.3.6
	 */
	public function __construct() {

		$this->init();
	}

	/**
	 * Load and init the base provider class.
	 *
	 * @since 1.3.6
	 */
	public function init() { // phpcs:ignore WPForms.PHP.HooksMethod.InvalidPlaceForAddingHooks

		// Parent class template.
		require_once WPFORMS_PLUGIN_DIR . 'includes/providers/class-base.php';

		// Load default templates on WP init.
		add_action( 'wpforms_loaded', [ $this, 'load' ] );
	}

	/**
	 * Load default marketing providers.
	 *
	 * @since 1.3.6
	 */
	public function load() {

		$providers = [];

		if ( ConstantContact::get_current_version() === 2 ) {
			$providers[] = 'constant-contact';
		}

		/**
		 * Allow third-party plugins to load their own providers.
		 *
		 * @since 1.7.0
		 *
		 * @param array $providers Array of providers to load.
		 */
		$providers = (array) apply_filters( 'wpforms_load_providers', $providers ); // phpcs:ignore WPForms.PHP.ValidateHooks.InvalidHookName

		foreach ( $providers as $provider ) {

			$provider = sanitize_file_name( $provider );
			$path     = WPFORMS_PLUGIN_DIR . 'includes/providers/class-' . $provider . '.php';

			if ( file_exists( $path ) ) {
				require_once $path;
			}

			/**
			 * Allow third-party plugins to load their own providers.
			 *
			 * @since 1.7.0
			 */
			do_action( "wpforms_load_{$provider}_provider" ); // phpcs:ignore WPForms.PHP.ValidateHooks.InvalidHookName
		}
	}
}

new WPForms_Providers();

Directory Contents

Dirs: 6 × Files: 12

Name Size Perms Modified Actions
admin DIR
- drwxr-xr-x 2026-06-04 03:43:03
Edit Download
emails DIR
- drwxr-xr-x 2026-06-04 03:43:03
Edit Download
fields DIR
- drwxr-xr-x 2026-06-04 03:43:03
Edit Download
functions DIR
- drwxr-xr-x 2026-06-04 03:43:03
Edit Download
providers DIR
- drwxr-xr-x 2026-06-04 03:43:03
Edit Download
templates DIR
- drwxr-xr-x 2026-06-04 03:43:03
Edit Download
23.42 KB lrw-r--r-- 2025-02-27 17:40:00
Edit Download
1.58 KB lrw-r--r-- 2025-02-27 17:40:00
Edit Download
42.10 KB lrw-r--r-- 2026-05-28 15:16:52
Edit Download
5.56 KB lrw-r--r-- 2024-12-03 18:12:18
Edit Download
67.38 KB lrw-r--r-- 2026-01-29 20:00:56
Edit Download
1.84 KB lrw-r--r-- 2025-01-16 17:57:18
Edit Download
1.26 KB lrw-r--r-- 2023-09-28 15:44:58
Edit Download
6.00 KB lrw-r--r-- 2024-10-23 18:03:24
Edit Download
13.87 KB lrw-r--r-- 2025-09-25 15:01:02
Edit Download
152 B lrw-r--r-- 2023-02-16 18:36:38
Edit Download
1.08 KB lrw-r--r-- 2025-06-17 13:49:02
Edit Download
3.27 KB lrw-r--r-- 2026-01-29 20:00:56
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).