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

Declare $wp_version; #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Declare $wp_version; #15

wants to merge 1 commit into from

Conversation

nickbuddendotcom
Copy link

At least on my local server, version_compare() doesn't work if I don't declare global $wp_version.

At least on my local server, version_compare() doesn't work if I don't declare global $wp_version.
@MatthewRuddy
Copy link
Owner

If you've just included the file containing the resizing code (such as in your theme's functions.php file), it should be fine. Provided the code isn't within a function, class, etc, it should be in the global namespace and not require any declaring of $wp_version.

@aristath
Copy link

I've had that error too on one of my installations and declaring $wp_version can't do any harm...
Better safe than sorry!

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.

3 participants