Skip to content

Fixes routes on sites in subfolders - #34

Merged
roborourke merged 6 commits into
humanmade:masterfrom
leogermani:patch-1
Jul 22, 2021
Merged

roborourke merged 6 commits into
humanmade:masterfrom
leogermani:patch-1

Conversation

@leogermani

Copy link
Copy Markdown
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

@roborourke roborourke left a comment

Copy link
Copy Markdown
Contributor

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!

Comment thread Restsplain.php Outdated
Comment thread Restsplain.php Outdated

if ( get_query_var( 'restsplain', false ) ) {
return get_default_docs_base();
return $subdir_install . get_default_docs_base();

Copy link
Copy Markdown
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.

Comment thread Restsplain.php Outdated
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>

@roborourke roborourke left a comment

Copy link
Copy Markdown
Contributor

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