function wptouch_add_pro_notifications()
{
    global $wptouch_pro;
    // Check if licensed
    if (WPTOUCH_SIMULATE_ALL || !wptouch_has_license()) {
        if (wptouch_show_renewal_notice()) {
            $wptouch_pro->add_notification(__('License Expired', 'wptouch-pro'), __('Your product license has expired. Renew now to continue to receive feature and security updates.', 'wptouch-pro'), 'error', 'http://www.wptouch.com/renew/?utm_campaign=renew-notification&utm_medium=web&utm_source=wptouch');
        } else {
            if (wptouch_should_show_license_nag()) {
                $wptouch_pro->add_notification(__('License Missing', 'wptouch-pro'), __('This installation of WPtouch Pro is currently unlicensed.', 'wptouch-pro'), 'error', wptouch_admin_url('admin.php?page=wptouch-admin-license'));
            }
        }
    }
    // Plugin upgrade available
    $version = wptouch_is_upgrade_available();
    if (WPTOUCH_SIMULATE_ALL || $version) {
        if (!wptouch_has_license()) {
            if (wptouch_show_renewal_notice()) {
                $wptouch_pro->add_notification(sprintf(__('WPtouch Pro %s', 'wptouch-pro'), $version), __('A new version of WPtouch Pro is available. Renew your license to re-enable product updates.', 'wptouch-pro'), 'upgrade', 'http://www.wptouch.com/renew/');
            } else {
                if (wptouch_should_show_license_nag()) {
                    $wptouch_pro->add_notification(sprintf(__('WPtouch Pro %s', 'wptouch-pro'), $version), __('A new version of WPtouch Pro is available. Please activate or purchase a license to enable product updates.', 'wptouch-pro'), 'upgrade', 'http://www.wptouch.com/pricing/');
                }
            }
        } else {
            $wptouch_pro->add_notification(sprintf(__('WPtouch Pro %s', 'wptouch-pro'), $version), __('A new version of WPtouch Pro is available.', 'wptouch-pro'), 'upgrade', is_multisite() ? network_admin_url('plugins.php?plugin_status=upgrade') : wptouch_admin_url('plugins.php?plugin_status=upgrade'));
        }
    }
    // Theme upgrade available
    $available_themes = $wptouch_pro->get_available_themes(true);
    foreach ($available_themes as $name => $theme) {
        if (isset($theme->upgrade_available) && $theme->upgrade_available) {
            $wptouch_pro->add_notification(__('Theme Update Available', 'wptouch-pro'), __('One or more updates are available for your installed themes.', 'wptouch-pro'), 'upgrade', admin_url('admin.php?page=wptouch-admin-themes-and-addons'));
            break;
        }
    }
    // Add-on upgrade available
    $available_addons = $wptouch_pro->get_available_addons(true);
    foreach ($available_addons as $name => $addons) {
        if (isset($addons->upgrade_available) && $addons->upgrade_available) {
            $wptouch_pro->add_notification(__('Extension Update Available', 'wptouch-pro'), __('One or more updates are available for your installed extensions.', 'wptouch-pro'), 'upgrade', admin_url('admin.php?page=wptouch-admin-themes-and-addons'));
            break;
        }
    }
    // Error
    if (WPTOUCH_SIMULATE_ALL || function_exists('wptouch_init')) {
        $wptouch_pro->add_notification('WPtouch 1.x', __('WPtouch Pro 3 cannot co-exist with WPtouch 1.x. Disable it first in the WordPress Plugins settings.', 'wptouch-pro'), 'error', 'https://support.wptouch.com/support/solutions/articles/5000525434-known-incompatibilities');
    }
    // Error
    if (WPTOUCH_SIMULATE_ALL || defined('WPTOUCH_PRO_MIN_BACKUP_FILES')) {
        $wptouch_pro->add_notification('WPtouch 2.x', __('WPtouch Pro 3 cannot co-exist with WPtouch Pro 2.x. Disable it first in the WordPress Plugins settings.', 'wptouch-pro'), 'error', 'https://support.wptouch.com/support/solutions/articles/5000525434-known-incompatibilities');
    }
}
Example #2
0
 function check_for_self_destruct()
 {
     if (isset($this->post['wptouch-self-destruct'])) {
         $nonce = $this->post['wptouch-self-destruct-nonce'];
         if (!wp_verify_nonce($nonce, 'tsarbomba') || !current_user_can('activate_plugins')) {
             return;
         }
         // Self Destruct
         $wipe_settings = false;
         $wipe_wptouch_data = false;
         $wipe_deactivate = false;
         if (isset($this->post['wptouch-self-destruct-1'])) {
             $wipe_settings = true;
         } else {
             if (isset($this->post['wptouch-self-destruct-2'])) {
                 $wipe_settings = true;
                 $wipe_wptouch_data = true;
             } else {
                 if (isset($this->post['wptouch-self-destruct-3'])) {
                     $wipe_settings = true;
                     $wipe_wptouch_data = true;
                     $wipe_deactivate = true;
                 }
             }
         }
         // Wipe all settings, including the active domain and foundation/framework
         if ($wipe_settings) {
             $setting_domains = $this->get_active_setting_domains();
             foreach ($setting_domains as $domain) {
                 if ($domain == 'bncid') {
                     continue;
                 }
                 $setting_name = $this->get_wp_setting_name_for_domain($domain);
                 if ($this->is_domain_site_wide($domain)) {
                     delete_site_option($setting_name);
                 } else {
                     delete_option($setting_name);
                 }
             }
             do_action('wptouch_after_self_destruct');
         }
         if ($wipe_wptouch_data) {
             require_once WPTOUCH_DIR . '/core/file-operations.php';
             if (wptouch_is_controlled_network()) {
                 wptouch_recursive_delete(WPTOUCH_BASE_CONTENT_MS_DIR);
             } else {
                 wptouch_recursive_delete(WPTOUCH_BASE_CONTENT_DIR);
             }
         }
         if ($wipe_deactivate) {
             deactivate_plugins(WPTOUCH_PLUGIN_ACTIVATE_NAME);
             wp_redirect(admin_url('plugins.php'));
             exit;
         } else {
             setcookie('jQu3ry_5teps_St@te_wptouch-wizard-container', '', time() - 3600);
             wp_redirect(wptouch_admin_url('admin.php?page=wptouch-admin-wizard'));
             exit;
         }
     }
     if (isset($this->get['wptouch_license_action']) && $this->get['wptouch_license_action'] == 'remove_license') {
         $nonce = $this->get['wptouch_license_nonce'];
         if (wp_verify_nonce($nonce, 'tsarbomba') && current_user_can('activate_plugins')) {
             $this->setup_bncapi();
             $this->bnc_api->user_remove_license();
             wp_redirect(add_query_arg(array('wptouch_license_action' => null, 'wptouch_license_nonce' => null)));
             die;
         }
     }
 }
Example #3
0
if (!is_network_admin() && !defined('WPTOUCH_IS_FREE')) {
    ?>
					<td>
						<i class="icon-theme-customizer"></i>
						<a href="<?php 
    echo admin_url('customize.php');
    ?>
" id="exit_wizard_customizer" class="button"><?php 
    _e('Customize your Theme', 'wptouch-pro');
    ?>
</a>
					</td>
				<?php 
}
?>
				<td>
					<i class="icon-theme-settings"></i>
					<a href="<?php 
echo wptouch_admin_url('admin.php?page=wptouch-admin-general-settings');
?>
" id="exit_wizard_settings" class="button">
						<?php 
echo wptouchize_it(__('Configure Settings', 'wptouch-pro'));
?>
					</a>
				</td>
			</tr>
		</table>
	</section>

</div><!-- wizard-container -->