10quality / wpmvc-addon-reviewer
This addon will show a review notice to an admin user, suggesting them to review the plugin or theme built in Wordpress MVC.
Requires
- php: >=5.4.0
- 10quality/wpmvc-addon: 1.0.*
- 10quality/wpmvc-core: ^3.1
Requires (Dev)
- phpunit/phpunit: 4.4.*
This package is auto-updated.
Last update: 2024-12-14 07:50:05 UTC
README
Add-on for Wordpress MVC.
This addon will show a review notice to an admin user, suggesting them to review the plugin or theme.
The addon will manage responses and reminders to make the notice not as intrusive.
Install
Run the following composer command at your project's root:
composer require 10quality/wpmvc-addon-reviewer
Configuration
Add your project's root folder name inside the paths
settings, like:
'paths' => [ 'base' => __DIR__ . '/../', 'controllers' => __DIR__ . '/../Controllers/', 'views' => __DIR__ . '/../../assets/views/', 'log' => WP_CONTENT . '/wpmvc/log', 'root_folder' => 'your-plugin-folder-name', ],
This will enable localization.
Add the following inside the addons
settings:
'addons' => [ 'WPMVC\Addons\Reviewer\ReviewerAddon', ],
This will enable the addon files.
Add an extra reviewer
settings:
'reviewer' => [ // Enables reviewer 'enabled' => true, // Name to display in notice 'name' => 'Project name', // Display interval in minutes 'interval' => 43200, ],
Settings using a custom review url:
'reviewer' => [ // Enables reviewer 'enabled' => true, // Name to display in notice 'name' => 'Project name', // Display interval in minutes 'interval' => 43200, // Review url 'url' => 'https://mydomain.com/my-product/review' ],
Wordpress Hooks
Filter:wpmvc_addon_reviewer_img_{namespace}
wpmvc_addon_reviewer_img_{namespace}
Allows to filter and replace the default stars.svg
display in the notice, for the image of your choice.
Replace {namespace} with your Wordpress MVC project's namespace (With caps).
Usage example (namespace is TestPlugin):
add_filter( 'wpmvc_addon_reviewer_img_TestPlugin', function( $url ) { // 150px x 150px return 'https://www.domain.com/path-to/image.png'; } );
Coding Guidelines
PSR-2 coding guidelines.
License
GPLv3 License. (c) 2019 10 Quality.