PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.3
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.3
4.9.3 4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 All 201 releases
← All changes | includes/Editors/BlockEditor/Blocks/ArticleSummary.php +4 -3 4.5.3 → 4.9.3 View file →
@@ -77,11 +77,12 @@
77 77 *
78 78 * @return bool
79 79 */
80 80 private function is_editor_mode() {
81 - // Check if we're in Gutenberg editor
82 - return defined( 'REST_REQUEST' ) && REST_REQUEST &&
83 - isset( $_REQUEST['context'] ) && $_REQUEST['context'] === 'edit';
81 + // Check if we're in Gutenberg editor.
82 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- REST request context check; nonce verified by REST cookie auth.
83 + $context = isset( $_REQUEST['context'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['context'] ) ) : '';
84 + return defined( 'REST_REQUEST' ) && REST_REQUEST && 'edit' === $context;
84 85 }
85 86
86 87 /**
87 88 * Get view parameters for the template