1 | <?php |
||
17 | class Affiliate { |
||
18 | |||
19 | /** |
||
20 | * Class instance |
||
21 | * |
||
22 | * @since 6.9.0 |
||
23 | * |
||
24 | * @var Affiliate This class instance. |
||
25 | **/ |
||
26 | private static $instance = null; |
||
27 | |||
28 | /** |
||
29 | * Jetpack_Affiliate constructor. |
||
30 | */ |
||
31 | private function __construct() { |
||
36 | |||
37 | /** |
||
38 | * Initializes the class or returns the singleton |
||
39 | * |
||
40 | * @since 6.9.0 |
||
41 | * |
||
42 | * @return Affiliate | false |
||
43 | */ |
||
44 | public static function init() { |
||
50 | |||
51 | /** |
||
52 | * Returns the affiliate code from database after filtering it. |
||
53 | * |
||
54 | * @since 6.9.0 |
||
55 | * |
||
56 | * @return string The affiliate code. |
||
57 | */ |
||
58 | public function get_affiliate_code() { |
||
68 | |||
69 | /** |
||
70 | * Returns the passed URL with the affiliate code added as a URL query arg. |
||
71 | * |
||
72 | * @since 6.9.0 |
||
73 | * |
||
74 | * @param string $url The URL where the code will be added. |
||
75 | * |
||
76 | * @return string The passed URL with the code added. |
||
77 | */ |
||
78 | public function add_code_as_query_arg( $url ) { |
||
85 | } |
||
86 | |||
88 |