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

Bug when content dir is not wp-content #2

Closed
plaurent75 opened this issue May 25, 2017 · 1 comment
Closed

Bug when content dir is not wp-content #2

plaurent75 opened this issue May 25, 2017 · 1 comment
Assignees

Comments

@plaurent75
Copy link

Hi, the's an error in your method getBaseUrl()

As wordpress allow to change the name of the content dir, you should not use wp-content in this function, this directory is defined by WP_CONTENT_DIR :

$pos = strpos($dirFromFile, 'wp-content')+strlen('wp-content');

Should be :

$pos = strpos($dirFromFile, WP_CONTENT_DIR)+strlen(WP_CONTENT_DIR);

@loumray loumray self-assigned this Jul 27, 2017
@loumray
Copy link
Owner

loumray commented Jul 27, 2017

Hi!

Nice pickup, just fixed this in this commit e90ec21, thank you!

@loumray loumray closed this as completed Jul 27, 2017
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

No branches or pull requests

2 participants