PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.7.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.7.0
2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 1.0.2 1.1.0 All 49 releases
← All changes | includes/admin/class-bulk-action-manager.php +12 -10 1.10.02.7.0 View file →
@@ -53,9 +53,9 @@
53 53 return $this->inject_bulk_actions($bulk_actions, $post_type);
54 54 });
55 55 }
56 56
57 - add_action('admin_footer', [$this, 'bulk_action_footer_script']);
57 + add_action('admin_enqueue_scripts', [$this, 'bulk_action_footer_script']);
58 58 }
59 59
60 60 /**
61 61 * Inject ThinkRank bulk actions
@@ -90,10 +90,14 @@
90 90 return array_merge($bulk_actions, $new_actions);
91 91 }
92 92
93 93 /**
94 - * Footer Script to Disable Separator
95 - *
94 + * Disable the "separator" bulk action option on post-list screens.
95 + *
96 + * Registered on admin_enqueue_scripts and attached as an inline script to the
97 + * core jQuery handle (rather than echoing a raw <script> in admin_footer) so it
98 + * passes Plugin Check's inline-script rule.
99 + *
96 100 * @since 1.1.0
97 101 * @return void
98 102 */
99 103 public function bulk_action_footer_script(): void {
@@ -102,13 +106,11 @@
102 106 if (!$screen || $screen->base !== 'edit') {
103 107 return;
104 108 }
105 109
106 -?>
107 - <script>
108 - jQuery(document).ready(function($) {
109 - $('option[value="thinkrank_separator"]').attr('disabled', 'disabled');
110 - });
111 - </script>
112 -<?php
110 + wp_enqueue_script('jquery');
111 + wp_add_inline_script(
112 + 'jquery',
113 + 'jQuery(function($){ $(\'option[value="thinkrank_separator"]\').prop(\'disabled\', true); });'
114 + );
113 115 }
114 116 }