1 | <?php |
||
17 | class Jetpack_Affiliate { |
||
18 | |||
19 | /** |
||
20 | * @since 6.9.0 |
||
21 | * @var Jetpack_Affiliate This class instance. |
||
22 | **/ |
||
23 | private static $instance = null; |
||
24 | |||
25 | private function __construct() { |
||
30 | |||
31 | /** |
||
32 | * Initializes the class or returns the singleton |
||
33 | * |
||
34 | * @since 6.9.0 |
||
35 | * |
||
36 | * @return Jetpack_Affiliate | false |
||
37 | */ |
||
38 | public static function init() { |
||
44 | |||
45 | /** |
||
46 | * Returns the affiliate code from database after filtering it. |
||
47 | * |
||
48 | * @since 6.9.0 |
||
49 | * |
||
50 | * @return string The affiliate code. |
||
51 | */ |
||
52 | public function get_affiliate_code() { |
||
62 | |||
63 | /** |
||
64 | * Returns the passed URL with the affiliate code added as a URL query arg. |
||
65 | * |
||
66 | * @since 6.9.0 |
||
67 | * |
||
68 | * @param string $url The URL where the code will be added. |
||
69 | * |
||
70 | * @return string The passed URL with the code added. |
||
71 | */ |
||
72 | public function add_code_as_query_arg( $url ) { |
||
78 | } |
||
79 | |||
81 |