| @@ -8,8 +8,9 @@ | ||
| 8 | 8 | |
| 9 | 9 | use Extendify\AdminPageRouter; |
| 10 | 10 | use Extendify\Assist\Admin as AssistAdmin; |
| 11 | 11 | use Extendify\Agent\Admin as AgentAdmin; |
| 12 | +use Extendify\ComingSoon\Frontend as ComingSoonFrontend; | |
| 12 | 13 | use Extendify\Config; |
| 13 | 14 | use Extendify\Draft\Admin as DraftAdmin; |
| 14 | 15 | use Extendify\HelpCenter\Admin as HelpCenterAdmin; |
| 15 | 16 | use Extendify\Insights; |
| @@ -35,8 +36,9 @@ | ||
| 35 | 36 | use Extendify\Shared\Services\Import\ImagesImporter; |
| 36 | 37 | use Extendify\Shared\Services\PluginRedirectDisabler; |
| 37 | 38 | use Extendify\Shared\Services\PluginsActivation\SimplyBook; |
| 38 | 39 | use Extendify\Shared\Services\VersionMigrator; |
| 40 | +use Extendify\SiteVisibility; | |
| 39 | 41 | |
| 40 | 42 | if (!defined('EXTENDIFY_REQUIRED_CAPABILITY')) { |
| 41 | 43 | define('EXTENDIFY_REQUIRED_CAPABILITY', 'manage_options'); |
| 42 | 44 | } |
| @@ -127,8 +129,12 @@ | ||
| 127 | 129 | NotificationData::scheduleCache(); |
| 128 | 130 | } |
| 129 | 131 | |
| 130 | 132 | if (!current_user_can(EXTENDIFY_REQUIRED_CAPABILITY)) { |
| 133 | + if (!SiteVisibility::isPublished()) { | |
| 134 | + new ComingSoonFrontend(); | |
| 135 | + } | |
| 136 | + | |
| 131 | 137 | return; |
| 132 | 138 | } |
| 133 | 139 | |
| 134 | 140 | // The config class will collect information about the |