| @@ 86-106 (lines=21) @@ | ||
| 83 | /** |
|
| 84 | * Enqueue JavaScript files. |
|
| 85 | */ |
|
| 86 | public function enqueue_banner_scripts() { |
|
| 87 | wp_enqueue_script( |
|
| 88 | 'jetpack-wizard-banner-js', |
|
| 89 | Assets::get_file_url_for_environment( |
|
| 90 | '_inc/build/jetpack-wizard-banner.min.js', |
|
| 91 | '_inc/jetpack-wizard-banner.js' |
|
| 92 | ), |
|
| 93 | array( 'jquery' ), |
|
| 94 | JETPACK__VERSION, |
|
| 95 | true |
|
| 96 | ); |
|
| 97 | ||
| 98 | wp_localize_script( |
|
| 99 | 'jetpack-wizard-banner-js', |
|
| 100 | 'jp_banner', |
|
| 101 | array( |
|
| 102 | 'ajax_url' => admin_url( 'admin-ajax.php' ), |
|
| 103 | 'wizardBannerNonce' => wp_create_nonce( 'jp-wizard-banner-nonce' ), |
|
| 104 | ) |
|
| 105 | ); |
|
| 106 | } |
|
| 107 | ||
| 108 | /** |
|
| 109 | * Include the needed styles |
|
| @@ 129-149 (lines=21) @@ | ||
| 126 | * |
|
| 127 | * @since 4.4.0 |
|
| 128 | */ |
|
| 129 | public static function enqueue_banner_scripts() { |
|
| 130 | wp_enqueue_script( |
|
| 131 | 'jetpack-connection-banner-js', |
|
| 132 | Assets::get_file_url_for_environment( |
|
| 133 | '_inc/build/jetpack-connection-banner.min.js', |
|
| 134 | '_inc/jetpack-connection-banner.js' |
|
| 135 | ), |
|
| 136 | array( 'jquery' ), |
|
| 137 | JETPACK__VERSION, |
|
| 138 | true |
|
| 139 | ); |
|
| 140 | ||
| 141 | wp_localize_script( |
|
| 142 | 'jetpack-connection-banner-js', |
|
| 143 | 'jp_banner', |
|
| 144 | array( |
|
| 145 | 'ajax_url' => admin_url( 'admin-ajax.php' ), |
|
| 146 | 'connectionBannerNonce' => wp_create_nonce( 'jp-connection-banner-nonce' ), |
|
| 147 | ) |
|
| 148 | ); |
|
| 149 | } |
|
| 150 | ||
| 151 | /** |
|
| 152 | * Enqueues JavaScript and CSS for new connect-in-place flow. |
|