allow global variable override for EventPrime
All checks were successful
PHP Code Checker / PHP Code Checker (pull_request) Successful in 49s
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Successful in 1m5s
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Successful in 1m9s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m7s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m11s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m4s

This commit is contained in:
André Menrath 2024-11-25 19:10:57 +01:00
parent aa353c3795
commit ed236a70c5

View file

@ -205,8 +205,7 @@ final class EventPrime extends Event_Plugin {
if ( $activitypub_template ) { if ( $activitypub_template ) {
global $post; global $post;
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited $post = get_post( $post_id ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
$post = get_post( $post_id );
// Ensure WordPress functions use the new post data. // Ensure WordPress functions use the new post data.
setup_postdata( $post ); setup_postdata( $post );