PluginProbe ʕ •ᴥ•ʔ
WPForms – Easy Form Builder for WordPress – Contact Forms, Payment Forms, Surveys, & More / 1.10.1
WPForms – Easy Form Builder for WordPress – Contact Forms, Payment Forms, Surveys, & More v1.10.1
1.10.1.1 1.10.1 1.10.0.5 trunk 1.1.4 1.1.4.2 1.1.5 1.1.5.1 1.1.6 1.1.6.1 1.1.7 1.1.7.1 1.1.7.2 1.1.8 1.1.8.1 1.1.8.2 1.1.8.3 1.1.8.4 1.10.0.1 1.10.0.2 1.10.0.3 1.10.0.4 1.2.0 1.2.0.1 1.2.1 1.2.2 1.2.2.1 1.2.2.2 1.2.3 1.2.3.1 1.2.3.2 1.2.4 1.2.4.1 1.2.5 1.2.5.1 1.2.6 1.2.7 1.2.8 1.2.8.1 1.2.9 1.3.0 1.3.1 1.3.1.1 1.3.1.2 1.3.2 1.3.3 1.3.5 1.3.6 1.3.6.1 1.3.6.2 1.3.7.2 1.3.7.3 1.3.7.4 1.3.8 1.3.9.1 1.4.0.1 1.4.1.1 1.4.2 1.4.2.1 1.4.2.2 1.4.3 1.4.4 1.4.4.1 1.4.5 1.4.5.1 1.4.5.2 1.4.5.3 1.4.6 1.4.7.1 1.4.7.2 1.4.8.1 1.4.9 1.5.0.1 1.5.0.3 1.5.0.4 1.5.1 1.5.1.1 1.5.1.3 1.5.2.1 1.5.2.2 1.5.2.3 1.5.3 1.5.3.1 1.5.4.1 1.5.4.2 1.5.5 1.5.5.1 1.5.6 1.5.6.2 1.5.7 1.5.8.2 1.5.9.1 1.5.9.4 1.5.9.5 1.6.0.1 1.6.0.2 1.6.1 1.6.2.2 1.6.2.3 1.6.3.1 1.6.4 1.6.4.1 1.6.5 1.6.6 1.6.7 1.6.7.1 1.6.7.2 1.6.7.3 1.6.8 1.6.8.1 1.6.9 1.7.0 1.7.1.1 1.7.1.2 1.7.2 1.7.2.1 1.7.3 1.7.4 1.7.4.1 1.7.4.2 1.7.5.1 1.7.5.2 1.7.5.3 1.7.5.5 1.7.6 1.7.7 1.7.7.1 1.7.7.2 1.7.8 1.7.9 1.7.9.1 1.8.0.1 1.8.0.2 1.8.1.1 1.8.1.2 1.8.1.3 1.8.2.1 1.8.2.2 1.8.2.3 1.8.3 1.8.3.1 1.8.4 1.8.4.1 1.8.5.2 1.8.5.3 1.8.5.4 1.8.6.2 1.8.6.3 1.8.6.4 1.8.7.2 1.8.8.2 1.8.8.3 1.8.9.1 1.8.9.2 1.8.9.4 1.8.9.5 1.8.9.6 1.9.0.1 1.9.0.2 1.9.0.3 1.9.0.4 1.9.1.1 1.9.1.2 1.9.1.3 1.9.1.4 1.9.1.5 1.9.1.6 1.9.2.1 1.9.2.2 1.9.2.3 1.9.3.1 1.9.3.2 1.9.4.1 1.9.4.2 1.9.5 1.9.5.1 1.9.5.2 1.9.6 1.9.6.1 1.9.6.2 1.9.7.1 1.9.7.2 1.9.7.3 1.9.8.1 1.9.8.2 1.9.8.4 1.9.8.7 1.9.9.2 1.9.9.3 1.9.9.4
wpforms-lite / src / Providers / Providers.php
wpforms-lite / src / Providers Last commit date
Provider 2 months ago Providers.php 3 years ago
Providers.php
73 lines
1 <?php
2
3 namespace WPForms\Providers;
4
5 /**
6 * Class Providers gives ability to track/load all providers.
7 *
8 * @since 1.4.7
9 * @since 1.7.3 Renamed from `Loader` to `Providers`.
10 */
11 class Providers {
12
13 /**
14 * Get the instance of a class and store it in itself.
15 * Later we will be able to use this class as `$providers_loader = \WPForms\Providers\Providers::get_instance();`.
16 *
17 * @since 1.4.7
18 */
19 public static function get_instance() {
20
21 static $instance;
22
23 if ( ! $instance ) {
24 $instance = new Providers();
25 }
26
27 return $instance;
28 }
29
30 /**
31 * Loader constructor.
32 *
33 * @since 1.4.7
34 */
35 public function __construct() {
36 }
37
38 /**
39 * Register a provider.
40 *
41 * @since 1.4.7
42 *
43 * @param \WPForms\Providers\Provider\Core $provider The core class of a single provider.
44 */
45 public function register( Provider\Core $provider ) {
46
47 add_filter( 'wpforms_providers_available', [ $provider, 'register_provider' ] );
48
49 // WPForms > Settings > Integrations page.
50 $integration = $provider->get_page_integrations();
51
52 if ( $integration !== null ) {
53 add_action( 'wpforms_settings_providers', [ $integration, 'display' ], $provider::PRIORITY, 2 );
54 }
55
56 // Editing Single Form > Form Builder.
57 $form_builder = $provider->get_form_builder();
58
59 if ( $form_builder !== null ) {
60 add_action( 'wpforms_providers_panel_sidebar', [ $form_builder, 'display_sidebar' ], $provider::PRIORITY );
61 add_action( 'wpforms_providers_panel_content', [ $form_builder, 'display_content' ], $provider::PRIORITY );
62 }
63
64 // Process entry submission.
65 $process = $provider->get_process();
66
67 if ( $process !== null ) {
68 add_action( 'wpforms_process_complete', [ $process, 'process' ], 5, 4 );
69 }
70 }
71
72 }
73