Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup global postdata for OpenPub item #34

Merged
merged 2 commits into from
Mar 13, 2025
Merged

Conversation

eyalacato
Copy link
Contributor

@mvdhoek1 we hebben deze feature via een PR toegevoegd aan de PDC Base plugin en hebben dit ook nodig voor de OpenPub base plugin

Copy link
Contributor

@mvdhoek1 mvdhoek1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Na de laatste toevoeging zal ik hem mergen.

@@ -225,6 +225,9 @@ public static function getGlobalFields(): array
*/
public function transform(WP_Post $post)
{
$GLOBALS['post'] = $post;
setup_postdata($post);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kun je nog boven return $data; het volgende plaatsen wp_reset_postdata();? (regel 242)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvdhoek1 ik heb het toegevoegd

@mvdhoek1 mvdhoek1 merged commit 27e4b2f into master Mar 13, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants