pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Check for custom plugins directory. #7361

Open OWMC opened 3 days ago

OWMC commented 3 days ago

https://github.com/pods-framework/pods/blob/20f681a61d80f9f4d272d7d407bf92d61ef8ade7/init.php#L153

in init.php several deactivation functions check the hard-coded plugins/pods-ui directory.

This may prevent devs from changing the name of the plugins directory. Which can often be a security recomendation. Eg:

define('WP_PLUGIN_DIR', dirname(__FILE__) . '/../wp-content/extensions');
define('WP_PLUGIN_URL', 'http://localhost.com/site/wp-content/extensions');

Can we improve this so it checks for alternative directory structures? I believe wp-migrate-lite does something like this here: https://github.com/deliciousbrains/wp-migrate-db/blob/f0bd63fae078f3c6added0b3db18983a2a6d4e07/compatibility/wp-migrate-db-pro-compatibility.php#L17

(Also, was pods-ui the original directory name way back in the day?)