Server IP : 170.150.155.74 / Your IP : 13.58.16.208 Web Server : Apache/2.4.53 (Debian) System : Linux b22bf132354b 5.4.0-162-generic #179-Ubuntu SMP Mon Aug 14 08:51:31 UTC 2023 x86_64 User : www-data ( 33) PHP Version : 7.4.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/plugins/wordpress-seo/src/wrappers/ |
Upload File : |
<?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(); } }