Conversation
borekb
left a comment
There was a problem hiding this comment.
I also think this should be enough for the first iteration. I've pushed a Plugin-Support.md update and left one code suggestion.
| $defaultActionsFile = WP_CONTENT_DIR . '/.versionpress/' . $pluginSlug . '/actions.yml'; | ||
| $pluginDirActionsFile = WP_PLUGIN_DIR . '/' . $pluginSlug . '/.versionpress/actions.yml'; | ||
|
|
||
| if (is_file($defaultActionsFile)) { |
There was a problem hiding this comment.
Maybe the IF construction which is mostly repeated in all three files could be refactored to something like $actionsFile = PluginDefinitionDiscovery::getPath($pluginSlug, 'actions.yml'). It would also allow to avoid words like "default" and "effective" which I'm not sure are entirely fitting.
|
Nice refactoring 👍 Before we merge, we should discuss the final structure of paths:
|
|
1.i.: It looks ok but what about WP core? |
|
After some more internal discussion, the decision is:
|
borekb
left a comment
There was a problem hiding this comment.
The definitions paths have been discussed and updated slightly to include the ../plugins/.. path segment, see #1246 (comment).
|
I would suggest structure similar to WordPress
|
|
@pavelevap The plan for 3 is to download to Filters are a good idea but we should probably wait until there's a specific need for it. |
borekb
left a comment
There was a problem hiding this comment.
Discovery location updated to .../plugins/..., @JanVoracek please check that 992d150 is correct, then it can be merged I think.
Resolves #1176
VP now prefers loading definition files from
wp-content/.versionpress. I think it should be enough for the first iteration.