update plugins

This commit is contained in:
Tony Volpe
2024-06-17 14:42:23 -04:00
parent a00f379f7f
commit 38e314323c
9467 changed files with 2032414 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
<?php
namespace Yoast\WP\SEO\Wrappers;
use WP_Query;
/**
* Wrapper for WP_Query.
*/
class WP_Query_Wrapper {
/**
* Returns the global WP_Query object.
*
* @return WP_Query The WP_Query object.
*/
public function get_query() {
return $GLOBALS['wp_query'];
}
/**
* Returns the global main WP_Query object.
*
* @return WP_Query The WP_Query object.
*/
public function get_main_query() {
return $GLOBALS['wp_the_query'];
}
/**
* Sets the global WP_Query object.
*
* @param WP_Query $wp_query The WP Query.
*
* @return void
*/
public function set_query( WP_Query $wp_query ) {
// phpcs:ignore WordPress.WP.GlobalVariablesOverride -- This is a deliberate action.
$GLOBALS['wp_query'] = $wp_query;
}
/**
* Resets the global WP_Query object.
*
* @return void
*/
public function reset_query() {
\wp_reset_query();
}
}