GRAYBYTE WORDPRESS FILE MANAGER6520

Server IP : 162.213.255.40 / Your IP : 216.73.216.114
System : Linux server146.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF

HOME

/home/hellrfbn/public_html/wp-content/updraft/plugins-old/optinmonster/OMAPI/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/hellrfbn/public_html/wp-content/updraft/plugins-old/optinmonster/OMAPI//Partners.php
<?php
/**
 * Partners class.
 *
 * @since 2.0.0
 *
 * @package OMAPI
 * @author  Justin Sternberg
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * The Partners class.
 *
 * @since 2.0.0
 */
class OMAPI_Partners {

	/**
	 * The OM landing page url.
	 *
	 * @since 1.8.4
	 */
	const LANDING_URL = 'https://optinmonster.com/wp/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard';

	/**
	 * The SaS affiliate url.
	 *
	 * @since 2.0.0
	 */
	const SAS_URL = 'https://www.shareasale.com/r.cfm?u=%1$s&b=601672&m=49337&afftrack=&urllink=optinmonster.com';

	/**
	 * Get the SAS Partner ID.
	 *
	 * 3 ways to specify an ID, ordered by highest to lowest priority:
	 *  - add_filter( 'optinmonster_sas_id', function() { return 1234; } );
	 *  - define( 'OPTINMONSTER_SAS_ID', 1234 );
	 *  - get_option( 'optinmonster_sas_id' ); (with the option being in the
	 *    wp_options table) If an ID is present, returns the affiliate link
	 *    with the affiliate ID.
	 *
	 * @since  2.0.0
	 *
	 * @return string
	 */
	public static function get_sas_id() {
		$sas_id = '';

		// Check if sas ID is a constant.
		if ( defined( 'OPTINMONSTER_SAS_ID' ) ) {
			$sas_id = OPTINMONSTER_SAS_ID;
		}

		// Now run any filters that may be on the sas ID.
		$sas_id = apply_filters( 'optinmonster_sas_id', $sas_id );

		/**
		 * If we still don't have a sas ID by this point
		 * check the DB for an option
		 */
		if ( empty( $sas_id ) ) {
			$sas_id = get_option( 'optinmonster_sas_id', $sas_id );
		}

		return $sas_id;
	}

	/**
	 * Get the trial Partner ID.
	 *
	 * 3 ways to specify an ID, ordered by highest to lowest priority:
	 *  - add_filter( 'optinmonster_trial_id', function() { return 1234; } );
	 *  - define( 'OPTINMONSTER_TRIAL_ID', 1234 );
	 *  - get_option( 'optinmonster_trial_id' ); (with the option being in the
	 *    wp_options table) If an ID is present, returns the affiliate link
	 *    with the affiliate ID.
	 *
	 * @since  2.0.0
	 *
	 * @return string
	 */
	public static function get_trial_id() {
		$trial_id = '';

		// Check if trial ID is a constant.
		if ( defined( 'OPTINMONSTER_TRIAL_ID' ) ) {
			$trial_id = OPTINMONSTER_TRIAL_ID;
		}

		// Now run any filters that may be on the trial ID.
		$trial_id = apply_filters( 'optinmonster_trial_id', $trial_id );

		/**
		 * If we still don't have a trial ID by this point
		 * check the DB for an option
		 */
		if ( empty( $trial_id ) ) {
			$trial_id = get_option( 'optinmonster_trial_id', $trial_id );
		}

		return $trial_id;
	}

	/**
	 * Get the affiliate url for given id.
	 *
	 * @since  1.8.4
	 *
	 * @param  mixed $partner_id The Partner ID.
	 *
	 * @return string            The affilaite url.
	 */
	protected static function get_affiliate_url( $partner_id ) {
		return sprintf( self::SAS_URL, rawurlencode( trim( $partner_id ) ) );
	}

	/**
	 * Get the partner url.
	 *
	 * Not used directly, but parsed for query args.
	 *
	 * @since  2.0.0
	 *
	 * @return boolean
	 */
	protected static function get_partner_url() {
		$id   = self::get_trial_id();
		$type = 'trial';
		if ( empty( $id ) ) {
			$id   = self::get_sas_id();
			$type = 'sas';
		}

		// Return the regular WP landing page by default.
		$url = self::LANDING_URL;

		// Return the trial link if we have a trial ID.
		if ( ! empty( $id ) ) {
			$url = self::get_affiliate_url( $id );
		}

		return apply_filters(
			'optin_monster_action_link',
			$url,
			array(
				'type' => $type,
				'id'   => $id,
			)
		);
	}

	/**
	 * Returns partner url, if it exists.
	 *
	 * Not used directly, but parsed for query args.
	 *
	 * @since  2.0.0
	 *
	 * @return string|boolean
	 */
	public static function has_partner_url() {
		$url = self::get_partner_url();

		return false === strpos( $url, 'optinmonster.com/wp' )
			? $url
			: false;
	}

	/**
	 * Get the Partner ID.
	 *
	 * @since  2.0.0
	 * @since 2.15.0 Fallback to parsing the partner url for the ID.
	 *
	 * @return string
	 */
	public static function get_id() {
		$id = self::get_trial_id();
		if ( empty( $id ) ) {
			$id = self::get_sas_id();
		}

		if ( empty( $id ) ) {

			// Try to get the ID from the partner url.
			$url = self::has_partner_url();
			if ( $url ) {
				$parsed = wp_parse_url( $url );
				if (
					! empty( $parsed['host'] )
					// Only get the ID if it's a shareasale url.
					&& false !== stripos( $parsed['host'], 'shareasale.com' )
					&& ! empty( $parsed['query'] )
				) {
					$args = wp_parse_args( $parsed['query'] );
					if ( ! empty( $args['u'] ) ) {
						$id = $args['u'];
					}
				}
			}
		}

		return $id;
	}

	/**
	 * Get the referrer, if stored.
	 *
	 * @since 2.10.0
	 *
	 * @return string  Referrer
	 */
	public static function referred_by() {
		return sanitize_text_field( get_option( 'optinmonster_referred_by', '' ) );
	}

}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
EasyDigitalDownloads
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
Elementor
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
Integrations
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
MemberPress
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
Plugins
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
Promos
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
Rules
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
Shortcodes
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
WPForms
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
WooCommerce
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
.htaccess
0.41 KB
July 23 2025 07:38:28
hellrfbn / hellrfbn
0644
Actions.php
6.183 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Ajax.php
1.459 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Api.php
13.006 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
ApiAuth.php
2.405 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
ApiKey.php
5.083 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
AssetLoader.php
5.587 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
BaseRestApi.php
5.91 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Blocks.php
12.7 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
ClassicEditor.php
6.919 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
ConstantContact.php
7.424 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Debug.php
4.349 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
EasyDigitalDownloads.php
9.329 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Elementor.php
5.364 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Inserter.php
11.291 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
InstallSkin.php
1.354 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
InstallSkinCompat.php
1.362 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
MailPoet.php
13.359 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
MemberPress.php
4.117 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Menu.php
14.82 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Notifications.php
18.448 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
OmuApi.php
4.025 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Output.php
23.859 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Pages.php
16.629 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Partners.php
4.692 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Plugins.php
24.339 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Promos.php
1.105 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Refresh.php
5.55 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
RestApi.php
36.425 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
RevenueAttribution.php
2.966 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Review.php
1.447 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Rules.php
23.44 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Save.php
10.798 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Shortcode.php
3.582 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Sites.php
8.354 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Support.php
8.248 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Type.php
2.438 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Urls.php
8.979 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Utils.php
5.198 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Validate.php
9.063 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
WPForms.php
2.604 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Widget.php
6.496 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
WooCommerce.php
19.576 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
Wordfence.php
5.475 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644
WpErrorException.php
0.697 KB
July 02 2024 06:02:38
hellrfbn / hellrfbn
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF