Example #1
0
 /**
  * Static Singleton Factory Method
  *
  * @return Tribe__Admin__Help_Page
  */
 public static function instance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
<?php

// Fetch the Help page Instance
$help = Tribe__Admin__Help_Page::instance();
// Fetch plugins
$plugins = $help->get_plugins(null, false);
// Creates the Feature Box section
$help->add_section('feature-box', null, 0, 'box');
$help->add_section_content('feature-box', '<img src="' . esc_url(plugins_url('resources/images/modern-tribe@2x.png', dirname(__FILE__))) . '" alt="Modern Tribe Inc." title="Modern Tribe Inc.">');
$help->add_section_content('feature-box', sprintf(esc_html__('Thanks you for using %s! All of us at Modern Tribe sincerely appreciate your support and we’re excited to see you using our plugins.', 'tribe-common'), $help->get_plugins_text()));
// Creates the Support section
$help->add_section('support', __('Getting Support', 'tribe-common'), 10);
$help->add_section_content('support', sprintf(__('Our website’s %s is a great place to find tips and tricks for using and customizing our plugins.', 'tribe-common'), '<a href="http://m.tri.be/18j9" target="_blank">' . __('Knowledgebase', 'tribe-common') . '</a>'), 0);
$help->add_section_content('support', sprintf(__('<strong>Want to dive deeper?</strong> Check out our %s for developers.', 'tribe-common'), '<a href="http://m.tri.be/18jf" target="_blank">' . __('list of available functions', 'tribe-common') . '</a>'), 50);
// Creates the Extra Help section
$help->add_section('extra-help', __('Getting More Help', 'tribe-common'), 20);
$help->add_section_content('extra-help', __('While the resources above help solve a majority of the issues we see, there are times you might be looking for extra support. If you need assistance using our plugins and would like us to take a look, please follow these steps:', 'tribe-common'), 0);
$help->add_section_content('extra-help', array('type' => 'ol', sprintf(__('%s. All of the common (and not-so-common) answers to questions we see are here. It’s often the fastest path to finding an answer!', 'tribe-common'), '<strong><a href="http://m.tri.be/18j9" target="_blank">' . __('Check our Knowledgebase', 'tribe-common') . '</a></strong>'), sprintf(__('%s. Testing for an existing conflict is the best start for in-depth troubleshooting. We will often ask you to follow these steps when opening a new thread, so doing this ahead of time will be super helpful.', 'tribe-common'), '<strong><a href="http://m.tri.be/18jh" target="_blank">' . __('Test for a theme or plugin conflict', 'tribe-common') . '</a></strong>'), sprintf(__('%s. There are very few issues we haven’t seen and it’s likely another user has already asked your question and gotten an answer from our support staff. While posting to the forums is open only to paid customers, they are open for anyone to search and review.', 'tribe-common'), '<strong><a href="http://m.tri.be/4w/" target="_blank">' . __('Search our support forum', 'tribe-common') . '</a></strong>')), 10);
// By default these three will be gathered
$help->add_section_content('extra-help', __('Please note that all hands-on support is provided via the forums. You can email or tweet at us… ​but we will probably point you back to the forums 😄', 'tribe-common'), 40);
$help->add_section_content('extra-help', '<div style="text-align: right;"><a href="http://m.tri.be/18ji" target="_blank" class="button">' . __('Read more about our support policy', 'tribe-common') . '</a></div>', 40);
// Creates the System Info section
$help->add_section('system-info', __('System Information', 'tribe-common'), 30);
$help->add_section_content('system-info', __('The details of your calendar plugin and settings is often needed for you or our staff to help troubleshoot an issue. We may ask you to share this information if you ask for support. If you post in one of our premium forums, please copy and paste this information into the System Information field and it will help us help you faster!', 'tribe-common'), 0);
$help->add_section('template-changes', __('Recent Template Changes', 'tribe-common'), 40);
$help->add_section_content('template-changes', Tribe__Support__Template_Checker_Report::generate());
?>

<div id="tribe-help-general">
	<?php 
$help->get_sections();
Example #3
0
 /**
  * Append the text about Event Tickets to the Extra Help section on the Help page
  *
  * @filter "tribe_help_pre_get_sections"
  * @param Tribe__Admin__Help_Page $help The Help Page Instance
  * @return void
  */
 public function add_help_section_extra_content($help)
 {
     if (!$help->is_active(array('events-calendar-pro', 'event-tickets-plus')) && $help->is_active('the-events-calendar')) {
         // We just skip because it's treated on TEC
         return;
     } elseif (!$help->is_active('the-events-calendar')) {
         if (!$help->is_active('event-tickets-plus')) {
             $link = '<a href="https://wordpress.org/support/plugin/event-tickets/" target="_blank">' . esc_html__('open-source forum on WordPress.org', 'event-tickets') . '</a>';
             $help->add_section_content('extra-help', sprintf(__('If you have tried the above steps and are still having trouble, you can post a new thread to our %s. Our support staff monitors these forums once a week and would be happy to assist you there.', 'event-tickets'), $link), 20);
             $link_forum = '<a href="http://m.tri.be/4w/" target="_blank">' . esc_html__('premium support on our website', 'event-tickets') . '</a>';
             $link_plus = '<a href="http://m.tri.be/18ni" target="_blank">' . esc_html__('Events Tickets Plus', 'event-tickets') . '</a>';
             $help->add_section_content('extra-help', sprintf(__('Looking for more immediate support? We offer %1$s with the purchase of any of our premium plugins (like %2$s). Pick up a license and you can post there directly and expect a response within 24-48 hours during weekdays.', 'event-tickets'), $link_forum, $link_plus), 20);
             $link = '<a href="http://m.tri.be/4w/" target="_blank">' . esc_html__('post a thread', 'event-tickets') . '</a>';
             $help->add_section_content('extra-help', sprintf(__('Already have Events Tickets Plus? You can %s in our premium support forums. Our support team monitors the forums and will respond to your thread within 24-48 hours (during the week).', 'event-tickets'), $link), 20);
         } else {
             $link = '<a href="http://m.tri.be/4w/" target="_blank">' . esc_html__('post a thread', 'event-tickets') . '</a>';
             $help->add_section_content('extra-help', sprintf(__('If you have a valid license for one of our paid plugins, you can %s in our premium support forums. Our support team monitors the forums and will respond to your thread within 24-48 hours (during the week).', 'event-tickets'), $link), 20);
         }
     }
 }
 /**
  * Add Event Aggregator System Status to the Help page
  */
 public function add_status_to_help()
 {
     global $plugin_page;
     if ('tribe-help' !== $plugin_page) {
         return;
     }
     $help = Tribe__Admin__Help_Page::instance();
     $help->add_section('tribe-aggregator-status', __('Event Aggregator System Status', 'the-events-calendar'), 60);
     ob_start();
     include_once Tribe__Events__Main::instance()->pluginPath . 'src/admin-views/aggregator/status.php';
     $status_html = ob_get_clean();
     $help->add_section_content('tribe-aggregator-status', $status_html);
 }
 /**
  * Display help tab info in events settings
  *
  * @param Tribe__Admin__Help_Page $help The Help Page Instance
  */
 public function append_system_info(Tribe__Admin__Help_Page $help)
 {
     $help->add_section_content('system-info', $this->formattedSupportStats(), 10);
 }