PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / 2.7.2
Search Atlas SEO – OTTO AI SEO Automation for WordPress v2.7.2
2.7.1 2.7.2 2.7.0 2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 All 141 releases
metasync / templates / template-metasync-blank.php

template-metasync-blank.php in Search Atlas SEO – OTTO AI SEO Automation for WordPress 2.7.2, at templates/template-metasync-blank.php

69 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // If this file is called directly, abort before emitting any document output.
3 if (!defined('ABSPATH')) {
4 exit;
5 }
6 ?>
7 <!DOCTYPE html>
8 <html <?php language_attributes(); ?>>
9 <head>
10 <meta charset="<?php bloginfo('charset'); ?>" />
11 <?php
12 wp_head();
13 ?>
14
15 </head>
16 <?php
17 $post_id = get_the_ID();
18 $css_links = get_post_meta($post_id, 'css_links', true);
19 $inline_css = get_post_meta($post_id, 'inline_css', true);
20 $js_links = get_post_meta($post_id, 'js_links', true);
21
22 $decode_meta_list = static function ($value) {
23 if (is_array($value)) {
24 return $value;
25 }
26 if (!is_string($value) || '' === $value) {
27 return array();
28 }
29
30 $decoded = json_decode($value, true);
31 return is_array($decoded) ? $decoded : array();
32 };
33
34 foreach ($decode_meta_list($css_links) as $css_link) {
35 if (is_string($css_link) && filter_var($css_link, FILTER_VALIDATE_URL) && 0 === strpos($css_link, 'http')) {
36 // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet -- Dynamic per-post CSS URLs from the user's page settings (css_links meta) must print in <head> of this bare custom-page template; enqueueing after wp_head() would relocate them to the footer.
37 echo '<link href="' . esc_url($css_link) . '" rel="stylesheet"/>';
38 }
39 }
40
41 foreach ($decode_meta_list($inline_css) as $css) {
42 if (is_string($css)) {
43 // SECURITY FIX: Sanitize CSS to prevent XSS.
44 $sanitized_css = wp_strip_all_tags($css);
45 echo '<style>' . esc_html($sanitized_css) . '</style>';
46 }
47 }
48
49 foreach ($decode_meta_list($js_links) as $js_link) {
50 if (is_string($js_link) && filter_var($js_link, FILTER_VALIDATE_URL) && 0 === strpos($js_link, 'http')) {
51 // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript -- Dynamic per-post JS URLs from the user's page settings (js_links meta) must print in <head> of this bare custom-page template; enqueueing after wp_head() would relocate them to the footer.
52 echo '<script src="' . esc_url($js_link) . '"></script>';
53 }
54 }
55 ?>
56
57 <body class="text-gray-800 font-sans leading-normal gradient-bg postid-<?php echo esc_attr($post_id); ?>">
58 <?php
59 $content = apply_filters('the_content', get_the_content());
60 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- the_content() passthrough in a blank page template; escaping would corrupt the document
61 echo $content;
62 ?>
63 </body>
64 <?php
65 wp_footer();
66 ?>
67
68 </html>
69