$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. Please opt-in below to automatically share your system information with our support team. This will allow us to assist you faster if you post in our forums.', 'tribe-common'), 0);
$help->add_section_content('system-info', Tribe__Support::opt_in(), 10);
$help->add_section_content('system-info', '<div class="system-info-copy"><button data-clipboard-action="copy" class="system-info-copy-btn" data-clipboard-target=".support-stats" ><span class="dashicons dashicons-clipboard license-btn"></span>' . __('Copy to clipboard', 'tribe-common') . '</button></div>', 10);
$help->add_section('template-changes', __('Recent Template Changes', 'tribe-common'), 40);
$help->add_section_content('template-changes', Tribe__Support__Template_Checker_Report::generate());
$help->add_section('event-log', __('Event Log', 'tribe-common'), 50);
$help->add_section_content('event-log', Tribe__Main::instance()->log()->admin()->display_log());
?>

<div id="tribe-help-general">
	<?php 
$help->get_sections();
?>
</div>

<div id="tribe-help-sidebar">
	<?php 
 public static function getInstance()
 {
     if (null == self::$instance) {
         $instance = new self();
         $instance->set_obfuscator(new Tribe__Support__Obfuscator($instance->must_obfuscate_prefixes));
         self::$instance = $instance;
     }
     return self::$instance;
 }
Beispiel #3
0
 public function validate_key($key)
 {
     $response = array();
     $response['status'] = 0;
     if (!$key) {
         $response['message'] = sprintf(esc_html__('Hmmm... something\'s wrong with this validator. Please contact %ssupport%s.', 'tribe-common'), '<a href="http://m.tri.be/1u">', '</a>');
         return $response;
     }
     $queryArgs = array('pu_install_key' => trim($key), 'pu_checking_for_updates' => '1');
     //include version info
     $queryArgs['pue_active_version'] = $this->get_installed_version();
     global $wp_version;
     $queryArgs['wp_version'] = $wp_version;
     // For multisite, return the network-level siteurl ... in
     // all other cases return the actual URL being serviced
     $queryArgs['domain'] = is_multisite() ? $this->get_network_domain() : $_SERVER['SERVER_NAME'];
     if (is_multisite()) {
         $queryArgs['multisite'] = 1;
         $queryArgs['network_activated'] = is_plugin_active_for_network($this->get_plugin_file());
         global $wpdb;
         $queryArgs['active_sites'] = $wpdb->get_var("SELECT count(blog_id) FROM {$wpdb->blogs} WHERE public = '1' AND archived = '0' AND spam = '0' AND deleted = '0'");
     } else {
         $queryArgs['multisite'] = 0;
         $queryArgs['network_activated'] = 0;
         $queryArgs['active_sites'] = 1;
     }
     // This method is primarily used during when validating keys by ajax, before they are
     // formally committed or saved by the user: for that reason we call request_info()
     // rather than license_key_status() as at this stage invalid or missing keys should
     // not result in admin notices being generated
     $plugin_info = $this->request_info($queryArgs);
     $expiration = isset($plugin_info->expiration) ? $plugin_info->expiration : esc_html__('unknown date', 'tribe-common');
     $pue_notices = Tribe__Main::instance()->pue_notices();
     $plugin_name = $this->get_plugin_name();
     if (empty($plugin_info)) {
         $response['message'] = esc_html__('Sorry, key validation server is not available.', 'tribe-common');
     } elseif (isset($plugin_info->api_expired) && $plugin_info->api_expired == 1) {
         $response['message'] = $this->get_license_expired_message();
         $response['api_expired'] = true;
     } elseif (isset($plugin_info->api_upgrade) && $plugin_info->api_upgrade == 1) {
         $response['message'] = $this->get_api_message($plugin_info);
         $response['api_upgrade'] = true;
     } elseif (isset($plugin_info->api_invalid) && $plugin_info->api_invalid == 1) {
         $response['message'] = $this->get_api_message($plugin_info);
         $response['api_invalid'] = true;
     } else {
         $api_secret_key = get_option($this->pue_install_key);
         if ($api_secret_key && $api_secret_key === $queryArgs['pu_install_key']) {
             $default_success_msg = sprintf(esc_html__('Valid Key! Expires on %s', 'tribe-common'), $expiration);
         } else {
             // Set the key
             update_option($this->pue_install_key, $queryArgs['pu_install_key']);
             $default_success_msg = sprintf(esc_html__('Thanks for setting up a valid key. It will expire on %s', 'tribe-common'), $expiration);
             //Set SysInfo Key on Tec.com After Successful Validation of License
             $optin_key = get_option('tribe_systeminfo_optin');
             if ($optin_key) {
                 Tribe__Support::send_sysinfo_key($optin_key, $queryArgs['domain'], false, true);
             }
         }
         $pue_notices->clear_notices($plugin_name);
         $response['status'] = isset($plugin_info->api_message) ? 2 : 1;
         $response['message'] = isset($plugin_info->api_message) ? wp_kses($plugin_info->api_message, 'data') : $default_success_msg;
         $response['expiration'] = $expiration;
         if (isset($plugin_info->daily_limit)) {
             $response['daily_limit'] = intval($plugin_info->daily_limit);
         }
     }
     return $response;
 }
Beispiel #4
0
 public static function getInstance()
 {
     if (null == self::$instance) {
         $className = __CLASS__;
         self::$instance = new $className();
     }
     return self::$instance;
 }