amp-wp
amp-wp copied to clipboard
Incorrect use of $query->get_posts(), resulting in double request processing
Bug Description
The WP_Query() constructor calls $this->get_posts() inside __constructor() and it is the longest method in the class and the next time it is called it does not return the result but rebuilds the entire query. The plugin uses this methog in 5 places.
Expected Behaviour
The same as before but avoiding unnecessary data processing and requests.
Screenshots
No response
PHP Version
No response
Plugin Version
2.5.3
AMP plugin template mode
Standard
WordPress Version
6.5
Site Health
No response
Gutenberg Version
No response
OS(s) Affected
No response
Browser(s) Affected
No response
Device(s) Affected
No response
Acceptance Criteria
No response
Implementation Brief
No response
QA Testing Instructions
No response
Demo
No response
Changelog Entry
No response