Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Restrict path doesn't work with more than one path #124

Open
reekes opened this issue Nov 11, 2016 · 3 comments
Open

Restrict path doesn't work with more than one path #124

reekes opened this issue Nov 11, 2016 · 3 comments

Comments

@reekes
Copy link

reekes commented Nov 11, 2016

The "Restrict path" option shows an example of using two paths separated by a comma. This isn't working for me no matter how I tried.

Looking at the code I can see the lines in toc.php simply comparing the REQUEST_URI with the restrict_path. It's not iterating over the comma separated list of restricted paths.

Either the example in the comment is wrong and this is only intended to support one restrict path, or the code needs to iterate over the list of paths. The later is much more preferable and useful!

@shazahm1
Copy link

@reekes

Another user of the plugin noticed this about a year ago, they posted a solution which worked. Here's the link. Maybe it'll help you:

https://wordpress.org/support/topic/restrict-path-logic-does-not-work-correctly/

@reekes
Copy link
Author

reekes commented Nov 15, 2016

Yes, that's the bug and that's the fix! Can someone update the plugin and release it?

If I make that change to the code on my site it will get overwritten in the next update.

Or, should I switch to Easy Table of Contents? ;)

@shazahm1
Copy link

@reekes

This is not anything I can update. I just noticed your post due to an alert I have setup for my projects. You can surely try Easy Table of Contents. Honestly, I haven't really tested the restrict path option. It should work. Let me know if it does not, that I can fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants