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

Add stubs for WordPress 5.2.0 - 5.3.0 #18

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

paulthewalton
Copy link

Brings stubs up to date with latest WP version (5.3.0 "Kirk", released 12 Nov 2019).

Includes stubs for interim versions:

  • 5.2.0
  • 5.2.1
  • 5.2.2
  • 5.2.3
  • 5.2.4

@@ -13,7 +13,7 @@ FILE="wordpress-stubs.php"

# Shim the global $wpdb declaration, since it's actually set up inside a
# function call.
echo $'\n/**\n * WordPress database abstraction object.\n * @var wpdb\n */\n$wpdb = null;' >> $FILE
echo $'\nnamespace {\n\t/**\n\t * WordPress database abstraction object.\n\t * @var wpdb\n\t */\n\t$wpdb = \\null;\n}' >> $FILE
Copy link
Author

@paulthewalton paulthewalton Dec 11, 2019

Choose a reason for hiding this comment

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

The $wpdb shim needed to be wrapped in a global namespace declaration as of WP 5.2.0, due to the minimum PHP version bump up to 5.6.20 and the introduction of namespaces.

@szepeviktor
Copy link
Contributor

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