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

Fixes routes on sites in subfolders #34

Merged
merged 6 commits into from
Jul 22, 2021
Merged

Conversation

leogermani
Copy link
Contributor

Fixes #23

Testing instructions

  • Test the plugin in a normal installation (not in a subfolder) and confirm routes are still working
  • Create an installation in a subfolder of your webserver and confirm routes are still working.

Check #23 for more details

Copy link
Contributor

@roborourke roborourke left a comment

Choose a reason for hiding this comment

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

Made a couple of notes - the slash handling can be improved a bit because I didn't do a great job of it the first time around!

Restsplain.php Outdated Show resolved Hide resolved
Restsplain.php Outdated
if ( get_query_var( 'restsplain', false ) ) {
return get_default_docs_base();
return $subdir_install . get_default_docs_base();
Copy link
Contributor

Choose a reason for hiding this comment

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

Realised that get_default_docs_base() should probably check it starts with a slash 🤔 Don't worry about that for this PR, just a note to myself.

Restsplain.php Outdated Show resolved Hide resolved
leogermani and others added 3 commits July 21, 2021 15:52
Co-authored-by: Robert O'Rourke <rob@humanmade.com>
Co-authored-by: Robert O'Rourke <rob@humanmade.com>
Copy link
Contributor

@roborourke roborourke left a comment

Choose a reason for hiding this comment

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

Nice one 😄

@roborourke roborourke merged commit d032248 into humanmade:master Jul 22, 2021
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.

Problem (and solution) for sites in subdirectory
2 participants