| @@ 1019-1033 (lines=15) @@ | ||
| 1016 | * @action wp_enqueue_script |
|
| 1017 | * @return null |
|
| 1018 | */ |
|
| 1019 | public function action_wp_enqueue_scripts() { |
|
| 1020 | if ( Jetpack_AMP_Support::is_amp_request() ) { |
|
| 1021 | return; |
|
| 1022 | } |
|
| 1023 | wp_enqueue_script( |
|
| 1024 | 'jetpack-photon', |
|
| 1025 | Jetpack::get_file_url_for_environment( |
|
| 1026 | '_inc/build/photon/photon.min.js', |
|
| 1027 | 'modules/photon/photon.js' |
|
| 1028 | ), |
|
| 1029 | array( 'jquery' ), |
|
| 1030 | 20130122, |
|
| 1031 | true |
|
| 1032 | ); |
|
| 1033 | } |
|
| 1034 | ||
| 1035 | /** |
|
| 1036 | * Determine if image_downsize should utilize Photon via REST API. |
|
| @@ 342-356 (lines=15) @@ | ||
| 339 | return implode( ' ', $string ); |
|
| 340 | } |
|
| 341 | ||
| 342 | public function enqueue_assets() { |
|
| 343 | if ( Jetpack_AMP_Support::is_amp_request() ) { |
|
| 344 | return; |
|
| 345 | } |
|
| 346 | wp_enqueue_script( |
|
| 347 | 'jetpack-lazy-images', |
|
| 348 | Jetpack::get_file_url_for_environment( |
|
| 349 | '_inc/build/lazy-images/js/lazy-images.min.js', |
|
| 350 | 'modules/lazy-images/js/lazy-images.js' |
|
| 351 | ), |
|
| 352 | array( 'jquery' ), |
|
| 353 | JETPACK__VERSION, |
|
| 354 | true |
|
| 355 | ); |
|
| 356 | } |
|
| 357 | } |
|
| 358 | ||