-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up help center feature #46
Conversation
See PRESS1-317 & PRESS1-314 |
composer.json
Outdated
}, | ||
"autoload": { | ||
"psr-4": { | ||
"NewfoldLabs\\WP\\Module\\HelpCenter\\": "includes" | ||
}, | ||
"files": [ | ||
"includes/HelpCenterFeature.php", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@circlecube This line is unnecessary since the class will be autoloaded using PSR-4 from the line above.
"includes/HelpCenterFeature.php", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed, thanks
includes/HelpCenterFeatureHooks.php
Outdated
} | ||
|
||
// Do not load if `canAccessHelpCenter` capability is not true | ||
$capability = new SiteCapabilities(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code formatting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching, should be fixed now.
* main: updating wp-module-ai to 1.1.9 updating typesense search params # Conflicts: # composer.json # composer.lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good ... tested on local too
Proposed changes
This integrates the features module with the help center. It will allow users to toggle the feature on/off in the plugin settings. The features module changes the way a module is loaded, replacing the module loader/register method with a feature class and instantiate method which kicks the module off. If it is disabled the installation will not run. Integrating with the new feature module is a clean way to only load this module code when it is enabled and wraps everything into a features API that can be used by the plugins (and even other modules).
This also handles the optional loading for onboarding screens.
Upon merge, the idea is that this will be a major version release (2.x) since it changes the way the module is loaded and will need some attention when updating in the plugin. Ideally, we can also add some tests to that release to ensure the feature toggle is functional.
Type of Change
Checklist
Further comments