PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.3.65
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.3.65
11.3.75 11.3.73 11.3.71 11.3.70 11.3.69 11.3.64 11.3.65 11.3.62 11.3.61 11.3.56 11.3.58 11.0.31 11.0.52 11.0.54 11.0.56 11.0.58 11.0.7 11.1.10 11.1.11 11.1.13 11.1.14 11.1.15 11.1.2 11.1.20 11.1.21 All 73 releases
leadin / public / admin / class-impact.php

class-impact.php in HubSpot All-In-One Marketing – Forms, Popups, Live Chat 11.3.65, at public/admin/class-impact.php

49 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Leadin\admin;
4
5 if ( ! defined( 'ABSPATH' ) ) exit;
6
7 use Leadin\data\Filters;
8
9 const IR_CLICK_ID = 'irclickid';
10 const MPID = 'mpid';
11
12 /**
13 * Class containing the logic to get Impact affiliate information when necessary
14 */
15 class Impact {
16 /**
17 * Apply leadin_impact_code filter.
18 */
19 public static function get_affiliate_link() {
20 return Filters::apply_impact_code_filters();
21 }
22
23 /**
24 * Get impact properties from query parameters.
25 */
26 public static function get_params() {
27 $params = array();
28
29 // phpcs:disable WordPress.Security.NonceVerification.Recommended
30 if ( isset( $_GET['leadin_irclickid'] ) ) {
31 $params[ IR_CLICK_ID ] = sanitize_text_field( \wp_unslash( $_GET['leadin_irclickid'] ) );
32 }
33
34 if ( isset( $_GET['leadin_mpid'] ) ) {
35 $params[ MPID ] = sanitize_text_field( \wp_unslash( $_GET['leadin_mpid'] ) );
36 }
37 // phpcs:enable
38
39 return $params;
40 }
41
42 /**
43 * Return true if the function `get_params` returns both irclickid and mpid.
44 */
45 public static function has_params() {
46 return 2 === \count( self::get_params() );
47 }
48 }
49