private function maybe_setup()
{
if ('pending' === get_option('wpas_setup', false)) {
add_action('admin_init', 'wpas_create_pages', 11, 0);
add_action('admin_init', 'wpas_flush_rewrite_rules', 11, 0);
}
/**
* Ask for products support.
*
* Still part of the installation process. Ask the user
* if he is going to support multiple products or only one.
* It is important to use the built-in taxonomy for multiple products
* support as it is used by multiple addons.
*
* However, if the products support is already enabled, it means that this is not
* the first activation of the plugin and products support was previously enabled
* (products support is disabled by default). In this case we don't ask again.
*/
if ('pending' === get_option('wpas_support_products')) {
if (!isset($_GET['page']) || isset($_GET['page']) && 'wpas-about' !== $_GET['page']) {
add_action('admin_notices', 'wpas_ask_support_products');
}
}
}