| @@ -23,9 +23,9 @@ | ||
| 23 | 23 | $id = is_numeric( $id ) ? (float) $id : false; |
| 24 | 24 | |
| 25 | 25 | if ( $id ) { |
| 26 | 26 | if ( class_exists( 'SitePress' ) ) { |
| 27 | - $id = apply_filters( 'wpml_object_id', $id, 'ultp_templates', true ); | |
| 27 | + $id = apply_filters( 'wpml_object_id', $id, 'ultp_templates', true ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- WPML hook. | |
| 28 | 28 | } |
| 29 | 29 | $content = ''; |
| 30 | 30 | $pre_content = ''; |
| 31 | 31 | $content_post = get_post( $id ); |
| @@ -38,14 +38,14 @@ | ||
| 38 | 38 | 'css' => '', |
| 39 | 39 | ) |
| 40 | 40 | ); |
| 41 | 41 | // Breakdance builder support for its shortcode render |
| 42 | - $current_url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url( $_SERVER['REQUEST_URI'] ) : ''; | |
| 43 | - if ( ! empty( $_GET['_breakdance_doing_ajax'] ) || | |
| 42 | + $current_url = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : ''; | |
| 43 | + if ( ! empty( $_GET['_breakdance_doing_ajax'] ) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only Breakdance editor detection. | |
| 44 | 44 | strpos( $current_url, 'bricks/v1/render_element' ) !== false |
| 45 | 45 | ) { |
| 46 | 46 | |
| 47 | - if ( ! empty( $_GET['_breakdance_doing_ajax'] ) && get_template() == 'bricks' ) { | |
| 47 | + if ( ! empty( $_GET['_breakdance_doing_ajax'] ) && get_template() == 'bricks' ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only Breakdance editor detection. | |
| 48 | 48 | get_header(); |
| 49 | 49 | } |
| 50 | 50 | $pre_content .= ultimate_post()->build_css_for_inline_print( $id, true ); |
| 51 | 51 | } |