PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / 2.7.1
Search Atlas SEO – OTTO AI SEO Automation for WordPress v2.7.1
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.1, at templates/template-metasync-blank.php

78 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <!DOCTYPE html>
2 <html <?php language_attributes(); ?>>
3 <head>
4 <meta charset="<?php bloginfo('charset'); ?>" />
5 <?php
6 // If this file is called directly, abort.
7 if (!defined('ABSPATH')) {
8 exit;
9 }
10 wp_head();
11 ?>
12
13 </head>
14 <?php
15 // get the post ID
16 $post_id = get_the_ID();
17 // get post meta data for css_links
18 $css_links = get_post_meta($post_id, 'css_links', true);
19 // get post meta data for inline_css
20 $inline_css = get_post_meta($post_id, 'inline_css', true);
21 // get post meta data for js_links
22 $js_links = get_post_meta($post_id, 'js_links', true);
23 // check if the key css_links exist
24 if($css_links!==''){
25 // Loop through all the css link
26 $decoded_css_links = json_decode($css_links);
27 if (is_array($decoded_css_links)) {
28 foreach ($decoded_css_links as $css_link) {
29 // SECURITY FIX: Validate and escape CSS URLs
30 if (filter_var($css_link, FILTER_VALIDATE_URL) && (strpos($css_link, 'http') === 0)) {
31 // 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.
32 echo '<link href="' . esc_url($css_link) . '" rel="stylesheet"/>';
33 }
34 }
35 }
36 }
37 // check if the key inline_css exist
38 if($inline_css!==''){
39 // Loop through all the inline css and print it
40 $decoded_inline_css = json_decode($inline_css);
41 if (is_array($decoded_inline_css)) {
42 foreach ($decoded_inline_css as $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 // check if the key js_links exist
50 $js_links_decoded = !empty($js_links) ? json_decode($js_links) : null;
51 if(is_array($js_links_decoded)){
52 // Loop through all the js link and print it script tags
53 $decoded_js_links = json_decode($js_links);
54 if (is_array($decoded_js_links)) {
55 foreach ($decoded_js_links as $js_link) {
56 // SECURITY FIX: Validate and escape JS URLs
57 if (filter_var($js_link, FILTER_VALIDATE_URL) && (strpos($js_link, 'http') === 0)) {
58 // 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.
59 echo '<script src="' . esc_url($js_link) . '"></script>';
60 }
61 }
62 }
63 }
64 ?>
65
66 <body class="text-gray-800 font-sans leading-normal gradient-bg postid-<?php echo esc_attr($post_id); ?>">
67 <?php
68 // get content of the post
69 $content = apply_filters('the_content', get_the_content());
70 echo $content;
71 ?>
72 </body>
73 <?php
74 wp_footer();
75
76 ?>
77
78 </html>