Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Should use a WP plugin to integrate with sandstorm rather than a fork #4

Open
yuvipanda opened this issue Jun 21, 2015 · 5 comments
Open

Comments

@yuvipanda
Copy link

WP is notorios for being insecure when left unupdated, and updating is hard when using forks :) Switch this to use a WP plugin than a fork.

@ocdtrekkie
Copy link

Likely a good suggestion, but a counter thought is: What happens if you're running WordPress in Sandstorm and you disable your Sandstorm integration plugin and can no longer authenticate?

@dwrensha
Copy link
Owner

WP is notorious for being insecure when left unupdated

This is less of a problem on Sandstorm. The WordPress Sandstorm app only exposes static content to the outside world, disallows outgoing network requests, and is tightly sandboxed from the rest of your machine. There's a lot less to fear than with a standard WordPress install.

Switch this to use a WP plugin than a fork.

Much of the Sandstorm integration is already in a plugin. In fact, it's a must use plugin, so @ocdtrekkie's concern does not apply. I agree that it would be awesome if I didn't need to maintain a fork, but there are some obstacles:

  1. I don't know how we would handle automatic database initialization from a plugin. In principle, we could sidestep this issue by initializing the database statically.
  2. There are a few places (e.g. here and here) where the WordPress code really does need to be modified to place nicely with Sandstorm.

@fabacab
Copy link

fabacab commented Apr 25, 2016

There are a few places (e.g. here and here) where the WordPress code really does need to be modified to place nicely with Sandstorm.

Some of these issues could be resolved by getting a little fancy with PHP's output buffering. You could ob_start() during your plugin's init and then during a WP shutdown hook you could ob_get_contents(), replace the target attributes to your liking with WP's links_add_target() function, and then print your modified output.

I know that won't take care of all the patches you need to make but maybe it would be easier to maintain the fork with fewer patches?

Just a thought.

@dwrensha
Copy link
Owner

Wow, output buffering looks like it could really come in handy sometimes. I'm not sure that it is worth the trouble in this particular case, but it definitely seems useful to know about.

@xet7
Copy link

xet7 commented Mar 8, 2018

This issue was moved to sandstormports/wordpress-sandstorm#3

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

5 participants