✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server366.web-hosting.com ​🇻​♯➤ 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 67.223.118.204 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/builxejc/public_html/wp-content/plugins/wordpress-popup/inc//hustle-providers-admin.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
 * Hustle_Providers_Admin
 *
 * @package Hustle
 */

/**
 * Class Hustle_Providers_Admin
 * This class handles the global "Integrations" page view.
 *
 * @since 4.0
 */
class Hustle_Providers_Admin extends Hustle_Admin_Page_Abstract {

	/**
	 * Init
	 */
	public function init() {

		$this->page = 'hustle_integrations';

		/* translators: Plugin name */
		$this->page_title = sprintf( __( '%s Integrations', 'hustle' ), Opt_In_Utils::get_plugin_name() );

		$this->page_menu_title = __( 'Integrations', 'hustle' );

		$this->page_capability = 'hustle_edit_integrations';

		$this->page_template_path = 'admin/integrations';
	}

	/**
	 * Get the arguments used when rendering the main page.
	 *
	 * @since 4.0.1
	 * @return array
	 */
	public function get_page_template_args() {
		$accessibility = Hustle_Settings_Admin::get_hustle_settings( 'accessibility' );
		return array(
			'accessibility' => $accessibility,
			'sui'           => $this->get_sui_summary_config(),
		);
	}

	/**
	 * Register js variables.
	 * Used for when an integration comes back from an external redirect.
	 * For example, when doing oAuth with Hubspot.
	 *
	 * @since 4.3.1
	 *
	 * @return array
	 */
	protected function get_vars_to_localize() {
		$current_array = parent::get_vars_to_localize();

		$current_array['integration_redirect'] = $this->grab_integration_external_redirect();
		$current_array['integrations_url']     = add_query_arg( 'page', Hustle_Data::INTEGRATIONS_PAGE, admin_url( 'admin.php' ) );
		$current_array['integrations_migrate'] = $this->grab_integration_external_redirect_migration();

		// Also defined wizards.
		$current_array['providers_action_nonce'] = wp_create_nonce( 'hustle_provider_action' );
		$current_array['fetching_list']          = esc_html__( 'Fetching integration list…', 'hustle' );

		return $current_array;
	}

	/**
	 * Attach back the addon after its external redirect.
	 * Return an array provided by the provider for handling
	 * the user's experience after coming back from the redirect.
	 *
	 * @since 4.0.2
	 * @return array
	 */
	private function grab_integration_external_redirect() {

		$response  = array();
		$action    = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_SPECIAL_CHARS );
		$migration = filter_input( INPUT_GET, 'migration', FILTER_VALIDATE_BOOLEAN );

		// handle migration elsewhere.
		if ( 'external-redirect' === $action && true !== $migration ) {

			$nonce = filter_input( INPUT_GET, 'nonce' );

			if ( $nonce && wp_verify_nonce( $nonce, 'hustle_provider_external_redirect' ) ) {

				$slug = filter_input( INPUT_GET, 'slug', FILTER_SANITIZE_SPECIAL_CHARS );

				$provider = Hustle_Provider_Utils::get_provider_by_slug( $slug );

				if ( $provider instanceof Hustle_Provider_Abstract ) {

					$response = $provider->process_external_redirect();
					if ( ! empty( $response ) ) {
						$response['slug'] = $slug;
					}
				}
			} else {

				$response = array(
					'action'  => 'notification',
					'status'  => 'error',
					'message' => esc_html__( "You're not allowed to do this request.", 'hustle' ),
				);
			}
		}

		return $response;
	}

	/**
	 * Attach back the addon after its external redirect for migration.
	 * Return an array provided by the provider for handling
	 * the user's experience after coming back from the redirect.
	 *
	 * @since 4.0.3
	 * @return array
	 */
	private function grab_integration_external_redirect_migration() {

		$response  = array();
		$action    = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_SPECIAL_CHARS );
		$migration = filter_input( INPUT_GET, 'migration', FILTER_VALIDATE_BOOLEAN );
		$provider  = esc_html( filter_input( INPUT_GET, 'show_provider_migration', FILTER_SANITIZE_SPECIAL_CHARS ) );
		$multi_id  = esc_html( filter_input( INPUT_GET, 'integration_id', FILTER_SANITIZE_SPECIAL_CHARS ) );

		if ( ! empty( $provider ) ) {
			$response['provider_modal'] = $provider;
		}

		if ( ! empty( $multi_id ) ) {
			$response['integration_id'] = $multi_id;
		}

		if ( 'reauth_provider' === $action ) {
			$response['reauth'] = true;
		}

		if ( 'migrate_provider_data' === $action && ! empty( $provider ) ) {
			$nonce = filter_input( INPUT_GET, 'nonce' );

			if ( $nonce && wp_verify_nonce( $nonce, 'hustle_provider_migrate' ) ) {

				$provider_instance = Hustle_Provider_Utils::get_provider_by_slug( $provider );

				if (
					$provider_instance instanceof Hustle_Provider_Abstract &&
					method_exists( $provider_instance, 'process_data_migration' )
				) {
					$result = $provider_instance->process_data_migration();

					if ( is_wp_error( $result ) ) {
						$response['migration_notificaiton'] = array(
							'action'  => 'notification',
							'status'  => 'error',
							'message' => $result->get_error_message(),
						);
					} else {
						$response['migration_notificaiton'] = array(
							'action'  => 'notification',
							'status'  => 'success',
							'slug'    => $provider,
							'message' => /* translators: integration type */ sprintf( esc_html__( '%s integration successfully migrated to the new API version.', 'hustle' ), '<strong>' . esc_html( ucfirst( $provider ) ) . '</strong>' ),
						);
					}
				}
			} else {
				return array(
					'action'  => 'notification',
					'status'  => 'error',
					'message' => esc_html__( "You're not allowed to do this request.", 'hustle' ),
				);
			}
		}

		if ( 'external-redirect' === $action && true === $migration ) {

			$nonce = filter_input( INPUT_GET, 'nonce' );

			if ( $nonce && wp_verify_nonce( $nonce, 'hustle_provider_external_redirect' ) ) {

				$slug = esc_html( filter_input( INPUT_GET, 'slug', FILTER_SANITIZE_SPECIAL_CHARS ) );

				$response['migration_notificaiton'] = array(
					'action' => 'notification',
					'status' => 'success',
					'slug'   => $slug,
				);

				if ( 'constantcontact' === $slug ) {
					$response['migration_notificaiton']['message'] = /* translators: integration type */ sprintf( esc_html__( '%s integration successfully migrated to the v3.0 API version.', 'hustle' ), '<strong>' . esc_html__( 'Constant Contact', 'hustle' ) . '</strong>' );
				}

				if ( 'infusionsoft' === $slug ) {
					$response['migration_notificaiton']['message'] = /* translators: integration type */ sprintf( esc_html__( '%s integration successfully migrated to use the REST API.', 'hustle' ), '<strong>' . esc_html__( 'Keap', 'hustle' ) . '</strong>' );
				}
				if ( 'convertkit' === $slug ) {
					$response['migration_notificaiton']['message'] = /* translators: integration type */ sprintf( esc_html__( '%s integration successfully migrated to use the latest API version.', 'hustle' ), '<strong>' . esc_html__( 'ConvertKit', 'hustle' ) . '</strong>' );
				}
			} else {

				$response = array(
					'action'  => 'notification',
					'status'  => 'error',
					'message' => esc_html__( "You're not allowed to do this request.", 'hustle' ),
				);
			}
		}

		return $response;
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
9 Jun 2026 8.38 AM
builxejc / builxejc
0755
display-conditions
--
9 Jun 2026 8.38 AM
builxejc / builxejc
0755
front
--
9 Jun 2026 8.38 AM
builxejc / builxejc
0755
helpers
--
9 Jun 2026 8.38 AM
builxejc / builxejc
0755
metas
--
9 Jun 2026 8.38 AM
builxejc / builxejc
0755
multisite
--
9 Jun 2026 8.38 AM
builxejc / builxejc
0755
palettes
--
9 Jun 2026 8.38 AM
builxejc / builxejc
0755
provider
--
9 Jun 2026 8.38 AM
builxejc / builxejc
0755
providers
--
9 Jun 2026 8.38 AM
builxejc / builxejc
0755
templates
--
9 Jun 2026 8.38 AM
builxejc / builxejc
0755
update
--
9 Jun 2026 8.38 AM
builxejc / builxejc
0755
class-hustle-admin-page-abstract.php
17.655 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
class-hustle-auth-token.php
2.666 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
class-hustle-condition-factory.php
0.964 KB
26 May 2020 3.58 PM
builxejc / builxejc
0644
class-hustle-cross-sell.php
1.597 KB
15 Sep 2025 10.29 AM
builxejc / builxejc
0644
class-hustle-dashboard-admin.php
15.469 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
class-hustle-data.php
3.123 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
class-hustle-db.php
8.669 KB
12 Oct 2023 2.01 PM
builxejc / builxejc
0644
class-hustle-installer.php
1.258 KB
3 Jan 2022 12.51 PM
builxejc / builxejc
0644
class-hustle-meta.php
1.9 KB
6 Apr 2023 4.20 PM
builxejc / builxejc
0644
class-hustle-module-admin.php
9.39 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
class-hustle-module-collection.php
12.108 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
class-hustle-module-fields.php
0.436 KB
18 Mar 2026 9.34 PM
builxejc / builxejc
0644
class-hustle-module-page-abstract.php
43.598 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
class-hustle-module-validator.php
2.074 KB
18 Mar 2026 9.34 PM
builxejc / builxejc
0644
class-hustle-notifications.php
29.269 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
class-hustle-settings-admin.php
16.863 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
class-hustle-wp-dashboard-page.php
16.575 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
class-opt-in.php
2.35 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
hustle-background-conversion-log.php
2.701 KB
18 Mar 2026 9.34 PM
builxejc / builxejc
0644
hustle-deletion.php
7.746 KB
18 Mar 2026 9.34 PM
builxejc / builxejc
0644
hustle-embedded-admin.php
0.712 KB
13 Oct 2022 9.51 AM
builxejc / builxejc
0644
hustle-entries-admin.php
29.812 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
hustle-entry-model.php
32.216 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
hustle-general-data-protection.php
11.44 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
hustle-init.php
1.382 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
hustle-mail.php
6.206 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
hustle-migration.php
55.115 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
hustle-model.php
34.073 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
hustle-module-model.php
30.92 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
hustle-module-widget-legacy.php
4.953 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
hustle-module-widget.php
3.903 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
hustle-modules-common-admin-ajax.php
32.168 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
hustle-popup-admin.php
0.639 KB
13 Oct 2022 9.51 AM
builxejc / builxejc
0644
hustle-providers-admin.php
6.822 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
hustle-providers.php
16.267 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
hustle-settings-admin-ajax.php
24.727 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
hustle-settings-page.php
5.03 KB
17 Apr 2023 3.18 PM
builxejc / builxejc
0644
hustle-slidein-admin.php
0.651 KB
13 Oct 2022 9.51 AM
builxejc / builxejc
0644
hustle-sshare-admin.php
2.503 KB
13 Oct 2022 9.51 AM
builxejc / builxejc
0644
hustle-sshare-model.php
21.675 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
hustle-tracking-model.php
25.706 KB
18 Mar 2026 9.34 PM
builxejc / builxejc
0644
interface-hustle-auth-provider.php
0.509 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
opt-in-geo.php
13.099 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644
opt-in-utils.php
41.588 KB
25 May 2026 1.17 PM
builxejc / builxejc
0644
opt-in-wpmudev-api.php
3.985 KB
26 Jan 2026 12.22 PM
builxejc / builxejc
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF