Merge pull request #964 from mailpoet/add-help

Add help [MAILPOET-949]
This commit is contained in:
stoletniy
2017-07-03 12:06:51 +03:00
committed by GitHub
7 changed files with 200 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ namespace MailPoet\Config;
use MailPoet\Cron\CronTrigger;
use MailPoet\Form\Block;
use MailPoet\Form\Renderer as FormRenderer;
use MailPoet\Helpscout\Beacon;
use MailPoet\Listing;
use MailPoet\Models\CustomField;
use MailPoet\Models\Form;
@@ -167,6 +168,18 @@ class Menu {
)
);
add_submenu_page(
$main_page_slug,
$this->setPageTitle(__('Help', 'mailpoet')),
__('Help', 'mailpoet'),
Env::$required_permission,
'mailpoet-help',
array(
$this,
'help'
)
);
// Only show this page in menu if the Premium plugin is not activated
add_submenu_page(
License::getLicense() ? true : $main_page_slug,
@@ -377,6 +390,10 @@ class Menu {
$this->displayPage('settings.html', $data);
}
function help() {
$this->displayPage('help.html', array('data' => Beacon::getData()));
}
private function _getFlags() {
// flags (available features on WP install)
$flags = array();