| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | +defined( 'ABSPATH' ) || exit; | |
| 2 | 3 | |
| 3 | 4 | class PostXOxygenElement extends OxyEl { |
| 4 | 5 | |
| 5 | 6 | function init() { |
| @@ -34,10 +35,10 @@ | ||
| 34 | 35 | function render( $options, $defaults, $content ) { |
| 35 | 36 | $templates = $options['templates']; |
| 36 | 37 | |
| 37 | 38 | if ( $templates ) { |
| 38 | - if ( isset( $_GET['action'] ) && strpos( sanitize_key( $_GET['action'] ), 'oxy_render_oxy' ) !== false ) { | |
| 39 | - echo ultimate_post()->build_css_for_inline_print( $templates, true ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 39 | + if ( isset( $_GET['action'] ) && strpos( sanitize_key( $_GET['action'] ), 'oxy_render_oxy' ) !== false ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only Oxygen editor detection. | |
| 40 | + echo ultimate_post()->build_css_for_inline_print( $templates, true ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- <style> tag from build_css_for_inline_print(): integer post ID, CSS passed through wp_strip_all_tags(). | |
| 40 | 41 | } |
| 41 | 42 | |
| 42 | 43 | $args = array( |
| 43 | 44 | 'p' => $templates, |
| @@ -50,9 +51,9 @@ | ||
| 50 | 51 | the_content(); |
| 51 | 52 | } |
| 52 | 53 | wp_reset_postdata(); |
| 53 | 54 | } |
| 54 | - } elseif ( isset( $_GET['action'] ) && strpos( sanitize_key( $_GET['action'] ), 'oxy_render_oxy' ) !== false ) { | |
| 55 | + } elseif ( isset( $_GET['action'] ) && strpos( sanitize_key( $_GET['action'] ), 'oxy_render_oxy' ) !== false ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only Oxygen editor detection. | |
| 55 | 56 | // @codingStandardsIgnoreLine |
| 56 | 57 | echo '<p style="text-align:center;">' . sprintf( esc_html__( 'Pick a Template from your saved ones. Or create a template from: %s.', 'ultimate-post' ) . ' ', '<strong><i>' . esc_html__( 'Dashboard > PostX > Saved Templates', 'ultimate-post' ) . '</i></strong>' ) . '</p>'; |
| 57 | 58 | } |
| 58 | 59 | } |