From 650cc45dda24194dfdbb1fc063ec1729ac02714b Mon Sep 17 00:00:00 2001 From: Paulo Trentin Date: Tue, 26 Aug 2025 13:58:29 -0700 Subject: [PATCH 1/2] Add GlobalVariableOverride standard doc --- .../WP/GlobalVariablesOverrideStandard.xml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 WordPress/Docs/WP/GlobalVariablesOverrideStandard.xml diff --git a/WordPress/Docs/WP/GlobalVariablesOverrideStandard.xml b/WordPress/Docs/WP/GlobalVariablesOverrideStandard.xml new file mode 100644 index 0000000000..aeaa7df7d0 --- /dev/null +++ b/WordPress/Docs/WP/GlobalVariablesOverrideStandard.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + global $wp_query; +$wp_query = new WP_Query( $args ); + ]]> + + + + + 'value' ); + ]]> + + + $GLOBALS['wp_query'] = new WP_Query( $args ); + ]]> + + + From 1c545ee7070d7c3f6f88b4e0365adcda7a3db704 Mon Sep 17 00:00:00 2001 From: Paulo Trentin Date: Tue, 26 Aug 2025 15:16:11 -0700 Subject: [PATCH 2/2] Improved doc body following review's suggestions --- .../WP/GlobalVariablesOverrideStandard.xml | 27 +++++++------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/WordPress/Docs/WP/GlobalVariablesOverrideStandard.xml b/WordPress/Docs/WP/GlobalVariablesOverrideStandard.xml index aeaa7df7d0..e72f42aafc 100644 --- a/WordPress/Docs/WP/GlobalVariablesOverrideStandard.xml +++ b/WordPress/Docs/WP/GlobalVariablesOverrideStandard.xml @@ -5,36 +5,27 @@ > $my_query = new WP_Query( $args ); + + +$GLOBALS['my_data'] = "some data"; ]]> global $wp_query; -$wp_query = new WP_Query( $args ); - ]]> - - - - - 'value' ); - ]]> - - - $GLOBALS['wp_query'] = new WP_Query( $args ); +$wp_query = new WP_Query( $args ); + +$GLOBALS['wp_query'] = new WP_Query( $args ); ]]>