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