<div id="unlicensed-board" class="partial round-3">
				<strong><?php 
        echo __("This copy of WPtouch Pro is partially activated.", "wptouch-pro");
        ?>
</strong>
				<a href="pane-license" class="partial wptouch-admin-switch" rel="licenses"><?php 
        _e("Add a site license &raquo;", "wptouch-pro");
        ?>
</a>
			</div>		
		<?php 
    }
    ?>
	<?php 
} else {
    if (!$settings->admin_client_mode_hide_licenses && !wptouch_is_multisite_secondary()) {
        ?>
	
	<br class="clearer" />
	
	<div id="unlicensed-board" class="round-3">
		<strong><?php 
        echo sprintf(__("This copy of WPtouch Pro %s is unlicensed.", "wptouch-pro"), wptouch_get_bloginfo('version'));
        ?>
</strong>

		<?php 
        if (!wptouch_is_multisite_enabled() || wptouch_is_multisite_enabled() && wptouch_is_multisite_primary()) {
            ?>
			<a href="#pane-5" class="wptouch-admin-switch" rel="account"><?php 
            _e("Get started with Activation &raquo;", "wptouch-pro");
Example #2
0
 function initialize()
 {
     if (function_exists('piggy_should_be_shown') && piggy_should_be_shown() || defined('XMLRPC_REQUEST') || defined('APP_REQUEST')) {
         return false;
     }
     $this->check_directories();
     $this->load_modules();
     $this->cleanup_post_and_get();
     $settings = $this->get_settings();
     if (is_admin()) {
         // Admin Panel Warnings
         require_once WPTOUCH_DIR . '/admin/template-tags/warnings.php';
         // Administration Panel
         require_once WPTOUCH_DIR . '/admin/admin-panel.php';
         add_action('admin_menu', 'wptouch_admin_menu');
         add_action('publish_page', array(&$this, 'invalidate_menu_tree_cache'));
         //			add_action( 'admin_head', array( &$this, 'show_plugin_help_text' ) );
         add_action('wptouch_settings_saved', array(&$this, 'create_settings_backup_file'));
     }
     // Set up debug log
     if ($settings->debug_log) {
         wptouch_debug_enable(true);
         wptouch_debug_set_log_level($settings->debug_log_level);
     }
     WPTOUCH_DEBUG(WPTOUCH_INFO, 'WPtouch Pro Initializations ' . WPTOUCH_VERSION);
     // These actions and filters are always loaded
     add_action('init', array(&$this, 'wptouch_init'));
     add_action('admin_init', array(&$this, 'initialize_admin_section'));
     add_action('admin_init', array(&$this, 'check_for_product_upgrade'));
     add_action('admin_head', array(&$this, 'wptouch_admin_head'));
     add_action('install_plugins_pre_plugin-information', array(&$this, 'show_plugin_info'));
     add_action('comment_post', array(&$this, 'prowl_handle_new_comment'));
     add_action('user_register', array(&$this, 'prowl_handle_new_comment'));
     add_filter('wptouch_available_icon_sets_post_sort', array(&$this, 'setup_custom_icons'));
     add_filter('plugin_action_links', array(&$this, 'wptouch_pro_settings_link'), 9, 2);
     add_action('wp_ajax_wptouch_client_ajax', array(&$this, 'handle_client_ajax'));
     add_action('wp_ajax_nopriv_wptouch_client_ajax', array(&$this, 'handle_client_ajax'));
     add_action('wptouch_settings_saved', array(&$this, 'check_for_restored_settings'));
     add_filter('wptouch_admin_languages', array(&$this, 'setup_custom_languages'));
     add_action('wptouch_pre_head', array(&$this, 'add_ignored_urls'));
     // iPad
     add_filter('wptouch_supported_device_classes', array(&$this, 'setup_ipad_user_agents'));
     // WP Super Cache
     add_filter('cached_mobile_prefixes', array(&$this, 'filter_wp_super_cache_prefixes'));
     add_filter('cached_mobile_browsers', array(&$this, 'filter_wp_super_cache_browsers'));
     // ManageWP
     add_filter('mwp_premium_update_notification', array(&$this, 'mwp_update_notification'));
     add_filter('mwp_premium_perform_update', array(&$this, 'mwp_perform_update'));
     if (wptouch_is_multisite_secondary()) {
         add_filter('wptouch_default_settings', array(&$this, 'setup_inherited_multisite_settings'));
         add_action('wptouch_later_admin_tabs', array(&$this, 'alter_admin_tabs_for_multisite'));
     }
     add_shortcode('wptouch', array(&$this, 'handle_shortcode'));
     if (WPTOUCH_PRO_BETA) {
         add_action('after_plugin_row_wptouch-pro-beta/wptouch-pro.php', array(&$this, 'plugin_row'));
     } else {
         add_action('after_plugin_row_wptouch-pro/wptouch-pro.php', array(&$this, 'plugin_row'));
     }
     // Load root-functions always for now
     //if ( $this->wptouch_is_wptouch_pro_page() || !is_admin()  ) {
     if (true) {
         $clear_settings = false;
         // Load the current theme functions.php, or the child root functions if it exists in WPtouch themes
         if (file_exists($this->get_current_theme_directory() . '/root-functions.php')) {
             require_once $this->get_current_theme_directory() . '/root-functions.php';
             // next time get_settings is called, the current theme defaults will be added in
             $clear_settings = true;
         }
         // Load the parent root-functions if it exists
         if ($this->has_parent_theme()) {
             $parent_info = $this->get_parent_theme_info();
             if (file_exists(WP_CONTENT_DIR . $parent_info->location . '/root-functions.php')) {
                 require_once WP_CONTENT_DIR . $parent_info->location . '/root-functions.php';
             }
             // next time get_settings is called, the current theme defaults will be added in
             $clear_settings = true;
         }
         // Load a custom functions.php file
         if (file_exists(WPTOUCH_BASE_CONTENT_DIR . '/functions.php')) {
             require_once WPTOUCH_BASE_CONTENT_DIR . '/functions.php';
         }
         do_action('wptouch_functions_loaded');
         if ($clear_settings) {
             // each theme can add it's own default settings, so we need to reset our internal settings object
             // so that the defaults will get merged in from the current theme
             $this->reload_settings();
         }
     }
     $this->check_user_agent();
     if ($settings->desktop_is_first_view && $this->is_mobile_device && !$this->showing_mobile_theme) {
         add_action('wp_head', array(&$this, 'handle_desktop_redirect_for_webapp'));
     }
     // Check if we're using a version of WordPress that supports themes
     if (function_exists('add_theme_support')) {
         add_theme_support('menus');
     }
     if ($this->is_mobile_device && $this->showing_mobile_theme) {
         do_action('wptouch_mobile_theme_showing');
         // Remove the admin bar in WPtouch Pro themes for now
         if (function_exists('show_admin_bar')) {
             add_filter('show_admin_bar', '__return_false');
         }
         // Theme functions
         require_once WPTOUCH_DIR . '/include/template-tags/theme.php';
         // Menu Tags
         require_once WPTOUCH_DIR . '/include/template-tags/menu.php';
         // Compatibility
         require_once WPTOUCH_DIR . '/include/compat.php';
         add_action('wptouch_functions_start', array(&$this, 'load_functions_file_for_desktop'));
         // These actions and filters are only loaded when WPtouch and a mobile theme are active
         add_action('wp', array(&$this, 'check_for_redirect'));
         add_filter('init', array(&$this, 'init_theme'));
         add_filter('excerpt_length', array(&$this, 'get_excerpt_length'));
         add_filter('excerpt_more', array(&$this, 'get_excerpt_more'));
         // New switch hooks
         add_filter('template_directory', array(&$this, 'get_template_directory'));
         add_filter('template_directory_uri', array(&$this, 'get_template_directory_uri'));
         add_filter('stylesheet_directory', array(&$this, 'get_stylesheet_directory'));
         add_filter('stylesheet_directory_uri', array(&$this, 'get_stylesheet_directory_uri'));
         add_action('wptouch_post_head', array(&$this, 'add_mobile_header_info'));
         // This is used to add the RSS, email items, etc
         add_filter('wptouch_menu_items', array(&$this, 'add_static_menu_items'));
         if ($settings->menu_disable_parent_as_child) {
             add_filter('wptouch_menu_items', array(&$this, 'remove_duplicate_menu_items'));
         }
         if ($settings->make_links_clickable) {
             add_filter('the_content', 'make_clickable');
         }
         // Check to see if we're a child theme so we can add the child stylesheet
         if ($this->is_child_theme()) {
             add_action('wptouch_post_head', array(&$this, 'output_child_scripts'), 999);
         }
         if (isset($settings->remove_shortcodes) && strlen($settings->remove_shortcodes)) {
             $this->remove_shortcodes($settings->remove_shortcodes);
         }
     }
     // Setup Post Thumbnails
     $create_thumbnails = apply_filters('wptouch_create_thumbnails', $settings->post_thumbnails_enabled && function_exists('add_theme_support'));
     // Setup Post Thumbnails
     if ($create_thumbnails) {
         add_theme_support('post-thumbnails');
         add_image_size('wptouch-new-thumbnail', $settings->post_thumbnails_new_image_size, $settings->post_thumbnails_new_image_size, true);
     }
     $this->custom_page_templates = apply_filters('wptouch_custom_templates', $this->custom_page_templates);
     if (!$settings->has_migrated_icons) {
         $this->check_old_version();
         $settings->has_migrated_icons = true;
         $this->save_settings($settings);
     }
     if (defined('WORDTWIT_PRO_INSTALLED')) {
         add_filter('wptouch_default_settings', array(&$this, 'add_default_wordtwit_pro_settings'));
     }
 }