Shelob9/headless-mode

[Feature] Allow WordPress default front-end selectively

Shelob9 opened this issue · 3 comments

Problem

This plugin is "all in". There is no way to say all posts of post type X can use a WordPress theme, but everything else redirect to front-end, or to allow a certain page/ post to be allowed.

If a plugin adds a custom rewrite rule, it is probably blocked, which may be bad.

Solution

Add a filter that is the final decider of if request is blocked or not.

Add a UI that allows for a adding paths to allow. Should be able to use * paths:

  • /blog/hi-roy -> Allow https://site.com/blog/hi-roy
  • /products/shirts/* -> Matches anything starting with https://site.com/products/shirts/

Mockup - I made this by using the inspector to mock up using the page for the simple 301 redirects plugin on calderaforms.com

headless-mode

Hey! We're now using this plugin on wpcampus.org. We definitely need a filter to help determine who gets access to the front end so will be adding a PR for the filter.

https://github.com/Shelob9/headless-mode/blob/master/headless-mode.php#L84

Benunc commented

@bamadesigner do you still have this need? I vaguely remember a PR that was merged that might have fixed this, but I am not confident, nor have I poked around much.

@Benunc Yes, I believe this line is the filter that was requested: https://github.com/Shelob9/headless-mode/blob/master/headless-mode.php#L96

This was the PR: #13

I believe you can consider this closed.