PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.2
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.2
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 3.5.1 All 200 releases
← All changes | includes/Admin/WPMLSupport.php +6 -0 4.5.44.9.2 View file →
@@ -6,8 +6,13 @@
6 6 if ( ! defined( 'ABSPATH' ) ) {
7 7 exit;
8 8 }
9 9
10 +// This class integrates with WPML's documented hook API (wpml_post_language_details,
11 +// wpml_element_trid, wpml_get_element_translations, etc.). Those hook names are owned
12 +// by WPML and must be used verbatim, so the plugin-prefix rule does not apply here.
13 +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
14 +
10 15 /**
11 16 * Helpers for round-tripping WPML language data through BetterDocs
12 17 * export / import. WPML stores per-post language data in `icl_translations`,
13 18 * which the regular WXR / CSV export doesn't touch — so without this layer
@@ -190,8 +195,9 @@
190 195 'name' => $slug,
191 196 'post_type' => $post_type,
192 197 'post_status' => 'any',
193 198 'posts_per_page' => 1,
199 + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.SuppressFilters_suppress_filters -- intentional: bypass WPML's own query filters to resolve the untranslated source post and avoid recursion in the WPML support layer.
194 200 'suppress_filters' => true,
195 201 ] );
196 202 return ! empty( $posts ) ? $posts[0] : null;
197 203 }