Review message
The FooterReview service is a simple service that displays a message to ask the user to review your plugin in footer of the WordPress admin area. This service is useful for plugins that are published on the WordPress.org repository.
Usage
To use the FooterReview service, you need to configure it in your plugin's configuration file. You can do this by adding the following code to your configuration file:
return [
'wporg' => [
'name' => 'Plugin Name',
'url' => 'url-to-plugin-page-on-wp.org',
'enabled' => true,
]
];In the example above, we are configuring the FooterReview service with the plugin name and URL. The enabled option is set to true to enable the service.
Conditional display
By default, the FooterReview service will always display the review message. However, you shouldn't rely on this behavior and should instead use the enabled option to control when the message is displayed.
For example, you can set the enabled option to detect on which page the message should be displayed. You can do this by checking the current page's slug or ID:
return [
'wporg' => [
'name' => 'Plugin Name',
'url' => 'url-to-plugin-page-on-wp.org',
'enabled' => function () {
return get_current_screen()->id === 'plugins_page_plugin-name';
},
]
];In the example above, we are checking the current page's ID and returning true if it is equal to plugins_page_plugin-name. This will display the review message only on that specific page.