Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| Jetpack_Pre_Connection_JITMs | n/a |
0 / 0 |
n/a |
0 / 0 |
5 | n/a |
0 / 0 |
|||
| get_raw_messages | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
| generate_description_with_tos | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
| maybe_get_raw_partnership_messages | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
| generate_admin_url | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
| add_pre_connection_jitms | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
| 1 | <?php |
| 2 | /** |
| 3 | * Jetpack's Pre-Connection JITMs class. |
| 4 | * |
| 5 | * @deprecated 13.3 |
| 6 | * |
| 7 | * @package jetpack |
| 8 | */ |
| 9 | |
| 10 | use Automattic\Jetpack\Redirect; |
| 11 | |
| 12 | /** |
| 13 | * Jetpack's Pre-Connection JITMs. These can be displayed with the JITM package. |
| 14 | * |
| 15 | * @deprecated 13.3 |
| 16 | */ |
| 17 | class Jetpack_Pre_Connection_JITMs { |
| 18 | |
| 19 | /** |
| 20 | * Returns all the pre-connection messages. |
| 21 | * |
| 22 | * @deprecated 13.3 |
| 23 | * |
| 24 | * @return array An array containing the pre-connection JITM messages. |
| 25 | */ |
| 26 | private function get_raw_messages() { |
| 27 | _deprecated_function( __METHOD__, 'jetpack-13.3' ); |
| 28 | return array(); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Generate a description text with links to ToS documents. |
| 33 | * |
| 34 | * Those messages must mention the ToS agreement message, |
| 35 | * but do not use the standard message defined in jetpack_render_tos_blurb. |
| 36 | * Instead, they use their own custom messages. |
| 37 | * |
| 38 | * @deprecated 13.3 |
| 39 | * |
| 40 | * @param string $description Description string with placeholders. |
| 41 | * |
| 42 | * @return string |
| 43 | */ |
| 44 | private function generate_description_with_tos( $description ) { |
| 45 | return sprintf( |
| 46 | wp_kses( |
| 47 | $description, |
| 48 | array( |
| 49 | 'a' => array( |
| 50 | 'href' => array(), |
| 51 | 'target' => array(), |
| 52 | 'rel' => array(), |
| 53 | ), |
| 54 | 'strong' => true, |
| 55 | ) |
| 56 | ), |
| 57 | esc_url( Redirect::get_url( 'wpcom-tos' ) ), |
| 58 | esc_url( Redirect::get_url( 'jetpack-support-what-data-does-jetpack-sync' ) ) |
| 59 | ); |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Returns partnership related pre-connection messages. |
| 64 | * |
| 65 | * @since 10.4 |
| 66 | * |
| 67 | * @deprecated 13.3 |
| 68 | * |
| 69 | * @return array An array containing the pre-connection JITM messages. |
| 70 | */ |
| 71 | private function maybe_get_raw_partnership_messages() { |
| 72 | _deprecated_function( __METHOD__, 'jetpack-13.3' ); |
| 73 | return array(); |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Adds the input query arguments to the admin url. |
| 78 | * |
| 79 | * @deprecated 13.3 |
| 80 | * |
| 81 | * @param array $args The query arguments. |
| 82 | * |
| 83 | * @return string The admin url. |
| 84 | */ |
| 85 | private function generate_admin_url( $args ) { |
| 86 | $url = add_query_arg( $args, admin_url( 'admin.php' ) ); |
| 87 | return $url; |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * Add the Jetpack pre-connection JITMs to the list of pre-connection JITM messages. |
| 92 | * |
| 93 | * @deprecated 13.3 |
| 94 | * |
| 95 | * @param array $pre_connection_messages An array of pre-connection JITMs. |
| 96 | * |
| 97 | * @return array The array of pre-connection JITMs. |
| 98 | */ |
| 99 | public function add_pre_connection_jitms( $pre_connection_messages ) { |
| 100 | _deprecated_function( __METHOD__, 'jetpack-13.3' ); |
| 101 | return $pre_connection_messages; |
| 102 | } |
| 103 | } |