1) {
$domain = $parts[$cnt - 1];
$exclusions = array(
'by' => __('Belarus', 'ai-copilot-content-generator'),
'cn' => __('China', 'ai-copilot-content-generator'),
'ir' => __('Iran', 'ai-copilot-content-generator'),
'kp' => __('North Korea', 'ai-copilot-content-generator'),
'ru' => __('Russia', 'ai-copilot-content-generator'),
);
if (isset($exclusions[$domain])) {
WaicAssets::_()->loadCoreJs();
WaicFrame::_()->addScript('waic-notice-dismiss', $this->getModule()->getModPath() . 'assets/js/admin.notice.dismiss.js');
$message = '' . esc_html__('Your country, domain, or server location may not be supported by some AI providers (like OpenAI, Anthropic (Claude AI), or Google AI (Gemini)).', 'ai-copilot-content-generator') . '
' .
esc_html__('As a result, AIWU might not function correctly on your site. Some of the unsupported jurisdictions include', 'ai-copilot-content-generator') . ':
';
foreach ($exclusions as $d => $n) {
$message .= '.' . $d . ' (' . $n . ')
';
}
$message .= esc_html__('Please check the provider’s official list of supported regions for confirmation.', 'ai-copilot-content-generator');
$this->assign('message', $message);
$this->assign('add_class', 'waic-notice-dismiss');
$this->assign('dis_slug', $key);
WaicHtml::echoEscapedHtml($this->getContent('showAdminInfo'));
return;
}
}
}
$taskId = $this->getModel()->getRunningTask();
if (!empty($taskId)) {
$this->assign( 'message',
'' . esc_html__('AI task is running!', 'ai-copilot-content-generator') . '
' .
esc_html__('You can watch the generation process on the task results page', 'ai-copilot-content-generator') .
': ' . esc_html__('Go', 'ai-copilot-content-generator') . ''
);
WaicHtml::echoEscapedHtml($this->getContent('showAdminInfo'));
}
$need = WaicFrame::_()->getModule('options')->getModel()->get('plugin', 'notifications');
if (0 !== $need) {
$taskId = WaicFrame::_()->getModule('postscreate')->getModel()->getWaitingPublish();
if (!empty($taskId)) {
$this->assign( 'message',
'' . esc_html__('New Post Generated and Ready for Review!', 'ai-copilot-content-generator') . '
' .
esc_html__('A new post has been generated. Please review the draft in the History section. You can either publish it or delete it to maintain content quality and relevance', 'ai-copilot-content-generator') .
': ' . esc_html__('Review', 'ai-copilot-content-generator') . ''
);
WaicHtml::echoEscapedHtml($this->getContent('showAdminInfo'));
}
}
}
public function showWorkspace() {
$assets = WaicAssets::_();
$assets->loadCoreJs();
$assets->loadDataTables(array('buttons', 'responsive'));
$assets->loadAdminEndCss();
$frame = WaicFrame::_();
$path = $this->getModule()->getModPath() . 'assets/';
$frame->addScript('waic-history', $path . 'js/admin.history.js');
$module = $this->getModule();
$module->getModel('history')->calcTokens();
$features = $module->getWorkspaceFeatures();
$lang = array(
'btn-delete' => esc_html__('Delete', 'ai-copilot-content-generator'),
'btn-publish' => esc_html__('Publish', 'ai-copilot-content-generator'),
'btn-unpublish' => esc_html__('Unpublish', 'ai-copilot-content-generator'),
'confirm-delete' => esc_html__('Are you sure you want to delete all these tasks?', 'ai-copilot-content-generator') . '