| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/Loader.php.tar |
www/wp-content/plugins/wordpress-seo/vendor_prefixed/wordproof/wordpress-sdk/app/Support/Loader.php 0000644 00000004502 15112162520 0033153 0 ustar 00 home/xbodynamge <?php
namespace YoastSEO_Vendor\WordProof\SDK\Support;
class Loader
{
protected $actions;
protected $filters;
public function __construct()
{
$this->actions = [];
$this->filters = [];
}
/**
* @param string $hook The name of the WordPress action that is being registered.
* @param object $component A reference to the instance of the object on which the action is defined.
* @param string $callback The name of the function definition on the $component.
* @param int $priority Optional. The priority at which the function should be fired. Default is 10.
* @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
*/
public function addAction($hook, $component, $callback, $priority = 10, $accepted_args = 1)
{
$this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args);
}
/**
* @param string $hook The name of the WordPress filter that is being registered.
* @param object $component A reference to the instance of the object on which the filter is defined.
* @param string $callback The name of the function definition on the $component.
* @param int $priority Optional. The priority at which the function should be fired. Default is 10.
* @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1
*/
public function addFilter($hook, $component, $callback, $priority = 10, $accepted_args = 1)
{
$this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args);
}
public function run()
{
foreach ($this->filters as $hook) {
\add_filter($hook['hook'], [$hook['component'], $hook['callback']], $hook['priority'], $hook['accepted_args']);
}
foreach ($this->actions as $hook) {
\add_action($hook['hook'], [$hook['component'], $hook['callback']], $hook['priority'], $hook['accepted_args']);
}
}
private function add($hooks, $hook, $component, $callback, $priority, $accepted_args)
{
$hooks[] = ['hook' => $hook, 'component' => $component, 'callback' => $callback, 'priority' => $priority, 'accepted_args' => $accepted_args];
return $hooks;
}
}
home/xbodynamge/lebauwcentre/wp-content/plugins/wpforms-lite/src/Admin/Loader.php 0000644 00000003311 15113415364 0024257 0 ustar 00 <?php
namespace WPForms\Admin;
/**
* Class Loader gives ability to track/load all admin modules.
*
* @package WPForms\Admin
* @author WPForms
* @since 1.5.0
* @license GPL-2.0+
* @copyright Copyright (c) 2018, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
*
* @since 1.5.0
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new self();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.5.0
*/
public function __construct() {
$core_class_names = array(
'DashboardWidget',
'Challenge',
'Builder\Education',
'Entries\PrintPreview',
);
$class_names = \apply_filters( 'wpforms_admin_classes_available', $core_class_names );
foreach ( $class_names as $class_name ) {
$this->register_class( $class_name );
}
}
/**
* Register a new class.
*
* @since 1.5.0
*
* @param string $class_name Class name to register.
*/
public function register_class( $class_name ) {
$class_name = \sanitize_text_field( $class_name );
// Load Lite class if exists.
if ( ! \wpforms()->pro && \class_exists( 'WPForms\Lite\Admin\\' . $class_name ) ) {
$class_name = 'WPForms\Lite\Admin\\' . $class_name;
new $class_name();
return;
}
// Load Pro class if exists.
if ( \wpforms()->pro && \class_exists( 'WPForms\Pro\Admin\\' . $class_name ) ) {
$class_name = 'WPForms\Pro\Admin\\' . $class_name;
new $class_name();
return;
}
// Load general class if neither Pro nor Lite class exists.
if ( \class_exists( __NAMESPACE__ . '\\' . $class_name ) ) {
$class_name = __NAMESPACE__ . '\\' . $class_name;
new $class_name();
}
}
}
home/xbodynamge/namtation/wp-content/plugins/wpforms-lite/src/Admin/Loader.php 0000644 00000003311 15113522205 0023562 0 ustar 00 <?php
namespace WPForms\Admin;
/**
* Class Loader gives ability to track/load all admin modules.
*
* @package WPForms\Admin
* @author WPForms
* @since 1.5.0
* @license GPL-2.0+
* @copyright Copyright (c) 2018, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
*
* @since 1.5.0
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new self();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.5.0
*/
public function __construct() {
$core_class_names = array(
'DashboardWidget',
'Challenge',
'Builder\Education',
'Entries\PrintPreview',
);
$class_names = \apply_filters( 'wpforms_admin_classes_available', $core_class_names );
foreach ( $class_names as $class_name ) {
$this->register_class( $class_name );
}
}
/**
* Register a new class.
*
* @since 1.5.0
*
* @param string $class_name Class name to register.
*/
public function register_class( $class_name ) {
$class_name = \sanitize_text_field( $class_name );
// Load Lite class if exists.
if ( ! \wpforms()->pro && \class_exists( 'WPForms\Lite\Admin\\' . $class_name ) ) {
$class_name = 'WPForms\Lite\Admin\\' . $class_name;
new $class_name();
return;
}
// Load Pro class if exists.
if ( \wpforms()->pro && \class_exists( 'WPForms\Pro\Admin\\' . $class_name ) ) {
$class_name = 'WPForms\Pro\Admin\\' . $class_name;
new $class_name();
return;
}
// Load general class if neither Pro nor Lite class exists.
if ( \class_exists( __NAMESPACE__ . '\\' . $class_name ) ) {
$class_name = __NAMESPACE__ . '\\' . $class_name;
new $class_name();
}
}
}
home/xbodynamge/lebauwcentre/wp-content/plugins/wpforms-lite/src/Forms/Loader.php 0000644 00000003176 15113673320 0024324 0 ustar 00 <?php
namespace WPForms\Forms;
/**
* Class Loader gives ability to track/load all forms modules.
*
* @package WPForms\Forms
* @author WPForms
* @since 1.5.1
* @license GPL-2.0+
* @copyright Copyright (c) 2019, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
*
* @since 1.5.1
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new self();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.5.1
*/
public function __construct() {
$core_class_names = array(
'Preview',
);
$class_names = \apply_filters( 'wpforms_forms_classes_available', $core_class_names );
foreach ( $class_names as $class_name ) {
$this->register_class( $class_name );
}
}
/**
* Register a new class.
*
* @since 1.5.1
*
* @param string $class_name Class name to register.
*/
public function register_class( $class_name ) {
$class_name = \sanitize_text_field( $class_name );
// Load Lite class if exists.
if ( ! \wpforms()->pro && \class_exists( 'WPForms\Lite\Forms\\' . $class_name ) ) {
$class_name = 'WPForms\Lite\Forms\\' . $class_name;
new $class_name();
return;
}
// Load Pro class if exists.
if ( \wpforms()->pro && \class_exists( 'WPForms\Pro\Forms\\' . $class_name ) ) {
$class_name = 'WPForms\Pro\Forms\\' . $class_name;
new $class_name();
return;
}
// Load general class if neither Pro nor Lite class exists.
if ( \class_exists( __NAMESPACE__ . '\\' . $class_name ) ) {
$class_name = __NAMESPACE__ . '\\' . $class_name;
new $class_name();
}
}
}
home/xbodynamge/namtation/wp-content/plugins/wpforms-lite/src/Forms/Loader.php 0000644 00000003176 15114012413 0023625 0 ustar 00 <?php
namespace WPForms\Forms;
/**
* Class Loader gives ability to track/load all forms modules.
*
* @package WPForms\Forms
* @author WPForms
* @since 1.5.1
* @license GPL-2.0+
* @copyright Copyright (c) 2019, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
*
* @since 1.5.1
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new self();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.5.1
*/
public function __construct() {
$core_class_names = array(
'Preview',
);
$class_names = \apply_filters( 'wpforms_forms_classes_available', $core_class_names );
foreach ( $class_names as $class_name ) {
$this->register_class( $class_name );
}
}
/**
* Register a new class.
*
* @since 1.5.1
*
* @param string $class_name Class name to register.
*/
public function register_class( $class_name ) {
$class_name = \sanitize_text_field( $class_name );
// Load Lite class if exists.
if ( ! \wpforms()->pro && \class_exists( 'WPForms\Lite\Forms\\' . $class_name ) ) {
$class_name = 'WPForms\Lite\Forms\\' . $class_name;
new $class_name();
return;
}
// Load Pro class if exists.
if ( \wpforms()->pro && \class_exists( 'WPForms\Pro\Forms\\' . $class_name ) ) {
$class_name = 'WPForms\Pro\Forms\\' . $class_name;
new $class_name();
return;
}
// Load general class if neither Pro nor Lite class exists.
if ( \class_exists( __NAMESPACE__ . '\\' . $class_name ) ) {
$class_name = __NAMESPACE__ . '\\' . $class_name;
new $class_name();
}
}
}
home/xbodynamge/crosstraining/wp-content/plugins/wpforms-lite/src/Providers/Loader.php 0000604 00000003405 15114112016 0025376 0 ustar 00 <?php
namespace WPForms\Providers;
/**
* Class Loader gives ability to track/load all providers.
*
* @package WPForms\Providers
* @author WPForms
* @since 1.4.7
* @license GPL-2.0+
* @copyright Copyright (c) 2018, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
* Later we will be able to use this class as $providers_loader = \WPForms\Providers\Loader::get_instance();
*
* @since 1.4.7
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new Loader();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.4.7
*/
public function __construct() {
}
/**
* Register a provider.
*
* @since 1.4.7
*
* @param \WPForms\Providers\Provider\Core $provider The core class of a single provider.
*/
public function register( Provider\Core $provider ) {
\add_filter( 'wpforms_providers_available', array( $provider, 'register_provider' ) );
// WPForms > Settings > Integrations page.
$integration = $provider->get_page_integrations();
if ( null !== $integration ) {
\add_action( 'wpforms_settings_providers', array( $integration, 'display' ), $provider::PRIORITY, 2 );
}
// Editing Single Form > Form Builder.
$form_builder = $provider->get_form_builder();
if ( null !== $form_builder ) {
\add_action( 'wpforms_providers_panel_sidebar', array( $form_builder, 'display_sidebar' ), $provider::PRIORITY );
\add_action( 'wpforms_providers_panel_content', array( $form_builder, 'display_content' ), $provider::PRIORITY );
}
// Process entry submission.
$process = $provider->get_process();
if ( null !== $process ) {
\add_action( 'wpforms_process_complete', array( $process, 'process' ), 5, 4 );
}
}
}
home/xbodynamge/dev/wp-content/plugins/wpforms-lite/src/Providers/Loader.php 0000644 00000003405 15114273736 0023314 0 ustar 00 <?php
namespace WPForms\Providers;
/**
* Class Loader gives ability to track/load all providers.
*
* @package WPForms\Providers
* @author WPForms
* @since 1.4.7
* @license GPL-2.0+
* @copyright Copyright (c) 2018, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
* Later we will be able to use this class as $providers_loader = \WPForms\Providers\Loader::get_instance();
*
* @since 1.4.7
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new Loader();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.4.7
*/
public function __construct() {
}
/**
* Register a provider.
*
* @since 1.4.7
*
* @param \WPForms\Providers\Provider\Core $provider The core class of a single provider.
*/
public function register( Provider\Core $provider ) {
\add_filter( 'wpforms_providers_available', array( $provider, 'register_provider' ) );
// WPForms > Settings > Integrations page.
$integration = $provider->get_page_integrations();
if ( null !== $integration ) {
\add_action( 'wpforms_settings_providers', array( $integration, 'display' ), $provider::PRIORITY, 2 );
}
// Editing Single Form > Form Builder.
$form_builder = $provider->get_form_builder();
if ( null !== $form_builder ) {
\add_action( 'wpforms_providers_panel_sidebar', array( $form_builder, 'display_sidebar' ), $provider::PRIORITY );
\add_action( 'wpforms_providers_panel_content', array( $form_builder, 'display_content' ), $provider::PRIORITY );
}
// Process entry submission.
$process = $provider->get_process();
if ( null !== $process ) {
\add_action( 'wpforms_process_complete', array( $process, 'process' ), 5, 4 );
}
}
}
home/xbodynamge/dev/wp-content/plugins/wpforms-lite/src/Admin/Loader.php 0000644 00000003226 15114275027 0022363 0 ustar 00 <?php
namespace WPForms\Admin;
/**
* Class Loader gives ability to track/load all admin modules.
*
* @package WPForms\Admin
* @author WPForms
* @since 1.5.0
* @license GPL-2.0+
* @copyright Copyright (c) 2018, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
*
* @since 1.5.0
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new self();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.5.0
*/
public function __construct() {
$core_class_names = array(
'DashboardWidget',
'Challenge',
);
$class_names = \apply_filters( 'wpforms_admin_classes_available', $core_class_names );
foreach ( $class_names as $class_name ) {
$this->register_class( $class_name );
}
}
/**
* Register a new class.
*
* @since 1.5.0
*
* @param string $class_name Class name to register.
*/
public function register_class( $class_name ) {
$class_name = \sanitize_text_field( $class_name );
// Load Lite class if exists.
if ( ! \wpforms()->pro && \class_exists( 'WPForms\Lite\Admin\\' . $class_name ) ) {
$class_name = 'WPForms\Lite\Admin\\' . $class_name;
new $class_name();
return;
}
// Load Pro class if exists.
if ( \wpforms()->pro && \class_exists( 'WPForms\Pro\Admin\\' . $class_name ) ) {
$class_name = 'WPForms\Pro\Admin\\' . $class_name;
new $class_name();
return;
}
// Load general class if neither Pro nor Lite class exists.
if ( \class_exists( __NAMESPACE__ . '\\' . $class_name ) ) {
$class_name = __NAMESPACE__ . '\\' . $class_name;
new $class_name();
}
}
}
home/xbodynamge/lebauwcentre/wp-content/plugins/wpforms-lite/src/Providers/Loader.php 0000644 00000003405 15114562451 0025211 0 ustar 00 <?php
namespace WPForms\Providers;
/**
* Class Loader gives ability to track/load all providers.
*
* @package WPForms\Providers
* @author WPForms
* @since 1.4.7
* @license GPL-2.0+
* @copyright Copyright (c) 2018, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
* Later we will be able to use this class as $providers_loader = \WPForms\Providers\Loader::get_instance();
*
* @since 1.4.7
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new Loader();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.4.7
*/
public function __construct() {
}
/**
* Register a provider.
*
* @since 1.4.7
*
* @param \WPForms\Providers\Provider\Core $provider The core class of a single provider.
*/
public function register( Provider\Core $provider ) {
\add_filter( 'wpforms_providers_available', array( $provider, 'register_provider' ) );
// WPForms > Settings > Integrations page.
$integration = $provider->get_page_integrations();
if ( null !== $integration ) {
\add_action( 'wpforms_settings_providers', array( $integration, 'display' ), $provider::PRIORITY, 2 );
}
// Editing Single Form > Form Builder.
$form_builder = $provider->get_form_builder();
if ( null !== $form_builder ) {
\add_action( 'wpforms_providers_panel_sidebar', array( $form_builder, 'display_sidebar' ), $provider::PRIORITY );
\add_action( 'wpforms_providers_panel_content', array( $form_builder, 'display_content' ), $provider::PRIORITY );
}
// Process entry submission.
$process = $provider->get_process();
if ( null !== $process ) {
\add_action( 'wpforms_process_complete', array( $process, 'process' ), 5, 4 );
}
}
}
home/xbodynamge/crosstraining/wp-content/plugins/wpforms-lite/src/Integrations/Loader.php 0000604 00000002234 15114564360 0026103 0 ustar 00 <?php
namespace WPForms\Integrations;
/**
* Class Loader gives ability to track/load all integrations.
*
* @package WPForms\Integrations
* @author WPForms
* @since 1.4.8
* @license GPL-2.0+
* @copyright Copyright (c) 2018, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
*
* @since 1.4.8
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new Loader();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.4.8
*/
public function __construct() {
$core_integrations = array(
new Gutenberg\FormSelector(),
new WPMailSMTP\Notifications(),
);
$integrations = \apply_filters( 'wpforms_integrations_available', $core_integrations );
foreach ( $integrations as $integration ) {
$this->load_integration( $integration );
}
}
/**
* Load an integration.
*
* @param IntegrationInterface $integration Instance of an integration class.
*
* @since 1.4.8
*/
protected function load_integration( IntegrationInterface $integration ) {
if ( $integration->allow_load() ) {
$integration->load();
}
}
}
home/xbodynamge/lebauwcentre/wp-content/plugins/wpforms-lite/src/Integrations/Loader.php 0000644 00000002234 15114644601 0025677 0 ustar 00 <?php
namespace WPForms\Integrations;
/**
* Class Loader gives ability to track/load all integrations.
*
* @package WPForms\Integrations
* @author WPForms
* @since 1.4.8
* @license GPL-2.0+
* @copyright Copyright (c) 2018, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
*
* @since 1.4.8
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new Loader();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.4.8
*/
public function __construct() {
$core_integrations = array(
new Gutenberg\FormSelector(),
new WPMailSMTP\Notifications(),
);
$integrations = \apply_filters( 'wpforms_integrations_available', $core_integrations );
foreach ( $integrations as $integration ) {
$this->load_integration( $integration );
}
}
/**
* Load an integration.
*
* @param IntegrationInterface $integration Instance of an integration class.
*
* @since 1.4.8
*/
protected function load_integration( IntegrationInterface $integration ) {
if ( $integration->allow_load() ) {
$integration->load();
}
}
}
home/xbodynamge/crosstraining/wp-content/plugins/wpforms-lite/src/Admin/Loader.php 0000604 00000003226 15114650542 0024465 0 ustar 00 <?php
namespace WPForms\Admin;
/**
* Class Loader gives ability to track/load all admin modules.
*
* @package WPForms\Admin
* @author WPForms
* @since 1.5.0
* @license GPL-2.0+
* @copyright Copyright (c) 2018, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
*
* @since 1.5.0
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new self();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.5.0
*/
public function __construct() {
$core_class_names = array(
'DashboardWidget',
'Challenge',
);
$class_names = \apply_filters( 'wpforms_admin_classes_available', $core_class_names );
foreach ( $class_names as $class_name ) {
$this->register_class( $class_name );
}
}
/**
* Register a new class.
*
* @since 1.5.0
*
* @param string $class_name Class name to register.
*/
public function register_class( $class_name ) {
$class_name = \sanitize_text_field( $class_name );
// Load Lite class if exists.
if ( ! \wpforms()->pro && \class_exists( 'WPForms\Lite\Admin\\' . $class_name ) ) {
$class_name = 'WPForms\Lite\Admin\\' . $class_name;
new $class_name();
return;
}
// Load Pro class if exists.
if ( \wpforms()->pro && \class_exists( 'WPForms\Pro\Admin\\' . $class_name ) ) {
$class_name = 'WPForms\Pro\Admin\\' . $class_name;
new $class_name();
return;
}
// Load general class if neither Pro nor Lite class exists.
if ( \class_exists( __NAMESPACE__ . '\\' . $class_name ) ) {
$class_name = __NAMESPACE__ . '\\' . $class_name;
new $class_name();
}
}
}
wp-content/plugins/wordpress-seo/vendor_prefixed/wordproof/wordpress-sdk/app/Support/Loader.php 0000644 00000004502 15114652165 0035227 0 ustar 00 home/xbodynamge/crosstraining <?php
namespace YoastSEO_Vendor\WordProof\SDK\Support;
class Loader
{
protected $actions;
protected $filters;
public function __construct()
{
$this->actions = [];
$this->filters = [];
}
/**
* @param string $hook The name of the WordPress action that is being registered.
* @param object $component A reference to the instance of the object on which the action is defined.
* @param string $callback The name of the function definition on the $component.
* @param int $priority Optional. The priority at which the function should be fired. Default is 10.
* @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
*/
public function addAction($hook, $component, $callback, $priority = 10, $accepted_args = 1)
{
$this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args);
}
/**
* @param string $hook The name of the WordPress filter that is being registered.
* @param object $component A reference to the instance of the object on which the filter is defined.
* @param string $callback The name of the function definition on the $component.
* @param int $priority Optional. The priority at which the function should be fired. Default is 10.
* @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1
*/
public function addFilter($hook, $component, $callback, $priority = 10, $accepted_args = 1)
{
$this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args);
}
public function run()
{
foreach ($this->filters as $hook) {
\add_filter($hook['hook'], [$hook['component'], $hook['callback']], $hook['priority'], $hook['accepted_args']);
}
foreach ($this->actions as $hook) {
\add_action($hook['hook'], [$hook['component'], $hook['callback']], $hook['priority'], $hook['accepted_args']);
}
}
private function add($hooks, $hook, $component, $callback, $priority, $accepted_args)
{
$hooks[] = ['hook' => $hook, 'component' => $component, 'callback' => $callback, 'priority' => $priority, 'accepted_args' => $accepted_args];
return $hooks;
}
}
home/xbodynamge/dev/wp-content/plugins/wpforms-lite/src/Integrations/Loader.php 0000644 00000002234 15114750054 0023775 0 ustar 00 <?php
namespace WPForms\Integrations;
/**
* Class Loader gives ability to track/load all integrations.
*
* @package WPForms\Integrations
* @author WPForms
* @since 1.4.8
* @license GPL-2.0+
* @copyright Copyright (c) 2018, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
*
* @since 1.4.8
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new Loader();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.4.8
*/
public function __construct() {
$core_integrations = array(
new Gutenberg\FormSelector(),
new WPMailSMTP\Notifications(),
);
$integrations = \apply_filters( 'wpforms_integrations_available', $core_integrations );
foreach ( $integrations as $integration ) {
$this->load_integration( $integration );
}
}
/**
* Load an integration.
*
* @param IntegrationInterface $integration Instance of an integration class.
*
* @since 1.4.8
*/
protected function load_integration( IntegrationInterface $integration ) {
if ( $integration->allow_load() ) {
$integration->load();
}
}
}
home/xbodynamge/namtation/wp-content/plugins/wpforms-lite/src/Providers/Loader.php 0000644 00000003405 15115010636 0024515 0 ustar 00 <?php
namespace WPForms\Providers;
/**
* Class Loader gives ability to track/load all providers.
*
* @package WPForms\Providers
* @author WPForms
* @since 1.4.7
* @license GPL-2.0+
* @copyright Copyright (c) 2018, WPForms LLC
*/
class Loader {
/**
* Get the instance of a class and store it in itself.
* Later we will be able to use this class as $providers_loader = \WPForms\Providers\Loader::get_instance();
*
* @since 1.4.7
*/
public static function get_instance() {
static $instance;
if ( ! $instance ) {
$instance = new Loader();
}
return $instance;
}
/**
* Loader constructor.
*
* @since 1.4.7
*/
public function __construct() {
}
/**
* Register a provider.
*
* @since 1.4.7
*
* @param \WPForms\Providers\Provider\Core $provider The core class of a single provider.
*/
public function register( Provider\Core $provider ) {
\add_filter( 'wpforms_providers_available', array( $provider, 'register_provider' ) );
// WPForms > Settings > Integrations page.
$integration = $provider->get_page_integrations();
if ( null !== $integration ) {
\add_action( 'wpforms_settings_providers', array( $integration, 'display' ), $provider::PRIORITY, 2 );
}
// Editing Single Form > Form Builder.
$form_builder = $provider->get_form_builder();
if ( null !== $form_builder ) {
\add_action( 'wpforms_providers_panel_sidebar', array( $form_builder, 'display_sidebar' ), $provider::PRIORITY );
\add_action( 'wpforms_providers_panel_content', array( $form_builder, 'display_content' ), $provider::PRIORITY );
}
// Process entry submission.
$process = $provider->get_process();
if ( null !== $process ) {
\add_action( 'wpforms_process_complete', array( $process, 'process' ), 5, 4 );
}
}
}
namtation/wp-content/plugins/themeisle-companion/vendor/codeinwp/themeisle-sdk/src/Loader.php 0000644 00000005001 15115102302 0031616 0 ustar 00 home/xbodynamge <?php
/**
* The main loader class for ThemeIsle SDK
*
* @package ThemeIsleSDK
* @subpackage Loader
* @copyright Copyright (c) 2017, Marius Cristea
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
* @since 1.0.0
*/
namespace ThemeisleSDK;
use ThemeisleSDK\Common\Module_Factory;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Singleton loader for ThemeIsle SDK.
*/
final class Loader {
/**
* Singleton instance.
*
* @var Loader instance The singleton instance
*/
private static $instance;
/**
* Current loader version.
*
* @var string $version The class version.
*/
private static $version = '2.0.0';
/**
* Holds registered products.
*
* @var array The products which use the SDK.
*/
private static $products = [];
/**
* Holds available modules to load.
*
* @var array The modules which SDK will be using.
*/
private static $available_modules = [
'dashboard_widget',
'rollback',
'uninstall_feedback',
'licenser',
'endpoint',
'notification',
'logger',
'translate',
'review',
'recommendation',
];
/**
* Initialize the sdk logic.
*/
public static function init() {
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Loader ) ) {
self::$instance = new Loader();
$modules = array_merge( self::$available_modules, apply_filters( 'themeisle_sdk_modules', [] ) );
foreach ( $modules as $key => $module ) {
if ( ! class_exists( 'ThemeisleSDK\\Modules\\' . ucwords( $module, '_' ) ) ) {
unset( $modules[ $key ] );
}
}
self::$available_modules = $modules;
}
}
/**
* Register product into SDK.
*
* @param string $base_file The product base file.
*
* @return Loader The singleton object.
*/
public static function add_product( $base_file ) {
if ( ! is_readable( $base_file ) ) {
return self::$instance;
}
$product = new Product( $base_file );
Module_Factory::attach( $product, self::get_modules() );
self::$products[ $product->get_slug() ] = $product;
return self::$instance;
}
/**
* Get all registered modules by the SDK.
*
* @return array Modules available.
*/
public static function get_modules() {
return self::$available_modules;
}
/**
* Get all products using the SDK.
*
* @return array Products available.
*/
public static function get_products() {
return self::$products;
}
/**
* Get the version of the SDK.
*
* @return string The version.
*/
public static function get_version() {
return self::$version;
}
}