@@ 583-588 (lines=6) @@ | ||
580 | ||
581 | // If this is a customizer preview, render the style directly to the preview after autosave. |
|
582 | // phpcs:ignore WordPress.Security.NonceVerification.Recommended |
|
583 | if ( is_customize_preview() && ! empty( $_GET['customize_autosaved'] ) ) { |
|
584 | // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet |
|
585 | echo '<link rel="stylesheet" id="jetpack-block-' . esc_attr( $type ) . '" href="' . esc_attr( $view_style ) . '?ver=' . esc_attr( $style_version ) . '" media="all">'; |
|
586 | } else { |
|
587 | wp_enqueue_style( 'jetpack-block-' . $type, $view_style, array(), $style_version ); |
|
588 | } |
|
589 | } |
|
590 | ||
591 | } |
|
@@ 625-629 (lines=5) @@ | ||
622 | ||
623 | // If this is a customizer preview, render the script directly to the preview after autosave. |
|
624 | // phpcs:ignore WordPress.Security.NonceVerification.Recommended |
|
625 | if ( is_customize_preview() && ! empty( $_GET['customize_autosaved'] ) ) { |
|
626 | echo '<script id="jetpack-block-' . esc_attr( $type ) . '" src="' . esc_attr( $view_script ) . '?ver=' . esc_attr( $script_version ) . '"></script>'; |
|
627 | } else { |
|
628 | wp_enqueue_script( 'jetpack-block-' . $type, $view_script, $script_dependencies, $script_version, false ); |
|
629 | } |
|
630 | } |
|
631 | ||
632 | wp_localize_script( |