Changeset 1155649
- Timestamp:
- 05/07/2015 08:24:30 PM (11 years ago)
- Location:
- wp-mobile-detector
- Files:
-
- 2 edited
-
tags/3.0/websitez-wp-mobile-detector.php (modified) (6 diffs)
-
trunk/websitez-wp-mobile-detector.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-mobile-detector/tags/3.0/websitez-wp-mobile-detector.php
r804694 r1155649 1 1 <?php 2 /* 3 Plugin Name: WP Mobile Detector Mobile Plugin2 /** 3 Plugin Name: WP Mobile Detector 4 4 Plugin URI: http://www.websitez.com/ 5 Description: The WP Mobile Detector wordpress mobile plugin automatically detects if the visitor is using a standard mobile phone or a smart phone and loads a compatible wordpress mobile theme for each. This mobile plugin is one of the first to differentiate between a standard mobile phone and a smart phone. With advanced mobile statistics, image resizing, automatically formatted content, and detection of 5,000+ mobile phones, the WP Mobile Detector gives your mobile visitors the experience they desire. 5 Description: Create a mobile friendly WordPress website instantly for over 5,000+ mobile devices. 6 Version: 3.0 7 Author: Websitez.com, LLC 8 Author URI: http://www.websitez.com 9 Text Domain: wp-mobile-detector 10 Domain Path: /locale 11 */ 6 12 7 Version: 1.8 8 Author: Websitez.com 9 Author URI: http://websitez.com 10 */ 13 define('WEBSITEZ_MODE', 'production'); 11 14 12 15 /* … … 16 19 17 20 global $table_prefix; 18 //Putting this in for the future19 global $websitez_free_version;20 $websitez_free_version = true;21 21 22 22 global $websitez_mobile_device; 23 23 $websitez_mobile_device = array(); 24 24 25 if(isset($_GET['websitez-mobile'])): 26 //Disabling W3 Total Cache 27 define('DONOTCACHEPAGE', true); 28 define('DONOTMINIFY', true); 29 define('DONOTCACHEOBJECT', true); 30 endif; 25 31 /* 26 32 Define Globals 27 33 */ 28 define('WEBSITEZ_COOKIE_NAME', 'websitez_mobile_detector_v1-8');29 34 define('WEBSITEZ_PLUGIN_NAME', 'WP Mobile Detector'); 35 define('WEBSITEZ_PLUGIN_VERSION', '3.0'); 30 36 define('WEBSITEZ_PLUGIN_AUTHORIZATION', 'wp_mobile_detector_token'); 31 37 define('WEBSITEZ_PLUGIN_DIR', dirname(__FILE__)); … … 33 39 define('WEBSITEZ_BASIC_THEME', 'websitez_basic_theme'); 34 40 define('WEBSITEZ_ADVANCED_THEME', 'websitez_advanced_theme'); 35 define('WEBSITEZ_INSTALL_BASIC_THEME', ' bluesteel-mobile');36 define('WEBSITEZ_INSTALL_ADVANCED_THEME', ' bluesteel-mobile');41 define('WEBSITEZ_INSTALL_BASIC_THEME', 'amanda-mobile'); 42 define('WEBSITEZ_INSTALL_ADVANCED_THEME', 'amanda-mobile'); 37 43 define('WEBSITEZ_DEFAULT_THEME', 'twentyten'); 38 define('WEBSITEZ_ADVANCED_MAX_IMAGE_WIDTH', ' 250');44 define('WEBSITEZ_ADVANCED_MAX_IMAGE_WIDTH', '320'); 39 45 define('WEBSITEZ_STATS_TABLE', $table_prefix.'websitez_stats'); 40 46 define('WEBSITEZ_RECORD_STATS_NAME', 'websitez_record_stats'); … … 46 52 define('WEBSITEZ_BASIC_URL_REDIRECT', 'websitez_basic_url_redirect'); 47 53 define('WEBSITEZ_ADVANCED_URL_REDIRECT', 'websitez_advanced_url_redirect'); 48 49 define('WEBSITEZ_SHOW_DASHBOARD_WIDGET', "true"); 50 define('WEBSITEZ_SHOW_DASHBOARD_WIDGET_NAME', "websitez_show_dashboard_widget"); 51 52 define('WEBSITEZ_SHOW_MOBILE_TO_TABLETS', "true"); 53 define('WEBSITEZ_SHOW_MOBILE_TO_TABLETS_NAME', "websitez_show_mobile_to_tablets"); 54 55 /* ADs off by default */ 56 define('WEBSITEZ_SHOW_MOBILE_ADS', "false"); 57 define('WEBSITEZ_SHOW_MOBILE_ADS_NAME', "websitez_show_mobile_ads"); 58 define('WEBSITEZ_MONETIZATION_MESSAGE', "websitez_monetization_message"); 54 define('WEBSITEZ_DISABLE_PLUGIN_NAME', 'websitez_disable_plugin'); 55 define('WEBSITEZ_DISABLE_PLUGIN', "false"); 56 define('WEBSITEZ_REDIRECT_MOBILE_VISITORS_NAME', 'websitez_redirect_mobile_visitors'); 57 define('WEBSITEZ_REDIRECT_MOBILE_VISITORS', "false"); 58 define('WEBSITEZ_REDIRECT_MOBILE_VISITORS_WEBSITE_NAME', 'websitez_redirect_mobile_visitors_website'); 59 define('WEBSITEZ_REDIRECT_MOBILE_VISITORS_WEBSITE', ""); 60 define('WEBSITEZ_LICENSE_KEY_NAME','websitez_pro_license_key'); 61 define('WEBSITEZ_LICENSE_EMAIL_NAME','websitez_pro_license_email'); 62 define('PURCHASE_WEBSITEZ_PRO_LINK','http://websitez.com'); 59 63 60 64 //Does this plugin come with pre-installed templates? … … 62 66 $websitez_preinstalled_templates = get_option(WEBSITEZ_USE_PREINSTALLED_THEMES_NAME); 63 67 68 //Configuration options 69 global $websitez_options, $websitez_preload_images; 70 64 71 // Install plugin 65 72 if(function_exists('register_activation_hook')) { 66 73 register_activation_hook( __FILE__, 'websitez_install' ); 67 74 } 75 if(function_exists('register_deactivation_hook')) { 76 register_deactivation_hook( __FILE__, 'websitez_uninstall' ); 77 } 68 78 69 79 if(is_admin()) { 70 80 require(dirname(__FILE__) . '/admin/admin-page.php'); 71 require(dirname(__FILE__) . '/admin/themes.php');72 81 add_action('admin_menu', 'websitez_configuration_menu'); 73 82 //Check to make sure plugin is installed properly 74 add_action('init', 'websitez_checkInstalled'); 75 add_action('init', 'websitez_authorization'); 76 //add_action('init', 'websitez_check_monetization'); 77 add_action('wp_dashboard_setup', 'websitez_dashboard_setup' ); 83 add_action('admin_init', 'websitez_checkInstalled'); 84 add_filter( 'cron_schedules', 'wz_cron_add_monthly' ); 85 add_filter('plugin_action_links', 'websitez_settings_link', 10, 2 ); 86 add_action("activated_plugin", "websitez_plugin_activated"); 87 add_action('wp_ajax_websitez_options', 'websitez_save_options'); 88 }else{ 89 // Using an action does not allow us to disable other plugins. 90 //add_action( 'plugins_loaded', 'websitez_go', 1 ); 91 websitez_go(); 78 92 } 79 93 80 /* 81 Lets get this party started. 82 */ 83 if(websitez_check_and_act_mobile()){ 84 if($websitez_preinstalled_templates == "true"){ 85 require(dirname(__FILE__) . '/default-widgets.php'); 86 if(!is_admin()){ 94 function websitez_go(){ 95 global $websitez_preinstalled_templates; 96 97 $websitez_detect = apply_filters( 'websitez_detect', true ); 98 if ( $websitez_detect !== true ) { 99 return false; 100 } 101 102 if(websitez_check_and_act_mobile()){ 103 if($websitez_preinstalled_templates == "true"){ 104 require(dirname(__FILE__) . '/default-widgets.php'); 87 105 add_filter('theme_root', 'websitez_setThemeFolder'); 88 106 add_filter('theme_root_uri', 'websitez_setThemeFolderFront'); … … 95 113 add_filter('get_the_generator_xhtml', 'websitez_wordpress_generator'); 96 114 add_filter('get_the_generator_html', 'websitez_wordpress_generator'); 115 }else{ 116 add_filter('stylesheet', 'websitez_getTheme'); 117 add_filter('template', 'websitez_getTheme'); 118 add_action('send_headers', 'websitez_send_headers'); 119 add_filter('get_the_generator_xhtml', 'websitez_wordpress_generator'); 120 add_filter('get_the_generator_html', 'websitez_wordpress_generator'); 97 121 } 98 }else{99 add_filter('stylesheet', 'websitez_getTheme');100 add_filter('template', 'websitez_getTheme');101 add_action('send_headers', 'websitez_send_headers');102 add_filter('get_the_generator_xhtml', 'websitez_wordpress_generator');103 add_filter('get_the_generator_html', 'websitez_wordpress_generator');104 122 } 105 123 } 124 add_action( 'websitez_do_filter', 'websitez_do_filter' ); 106 125 ?> -
wp-mobile-detector/trunk/websitez-wp-mobile-detector.php
r804694 r1155649 1 1 <?php 2 /* 3 Plugin Name: WP Mobile Detector Mobile Plugin2 /** 3 Plugin Name: WP Mobile Detector 4 4 Plugin URI: http://www.websitez.com/ 5 Description: The WP Mobile Detector wordpress mobile plugin automatically detects if the visitor is using a standard mobile phone or a smart phone and loads a compatible wordpress mobile theme for each. This mobile plugin is one of the first to differentiate between a standard mobile phone and a smart phone. With advanced mobile statistics, image resizing, automatically formatted content, and detection of 5,000+ mobile phones, the WP Mobile Detector gives your mobile visitors the experience they desire. 5 Description: Create a mobile friendly WordPress website instantly for over 5,000+ mobile devices. 6 Version: 3.0 7 Author: Websitez.com, LLC 8 Author URI: http://www.websitez.com 9 Text Domain: wp-mobile-detector 10 Domain Path: /locale 11 */ 6 12 7 Version: 1.8 8 Author: Websitez.com 9 Author URI: http://websitez.com 10 */ 13 define('WEBSITEZ_MODE', 'production'); 11 14 12 15 /* … … 16 19 17 20 global $table_prefix; 18 //Putting this in for the future19 global $websitez_free_version;20 $websitez_free_version = true;21 21 22 22 global $websitez_mobile_device; 23 23 $websitez_mobile_device = array(); 24 24 25 if(isset($_GET['websitez-mobile'])): 26 //Disabling W3 Total Cache 27 define('DONOTCACHEPAGE', true); 28 define('DONOTMINIFY', true); 29 define('DONOTCACHEOBJECT', true); 30 endif; 25 31 /* 26 32 Define Globals 27 33 */ 28 define('WEBSITEZ_COOKIE_NAME', 'websitez_mobile_detector_v1-8');29 34 define('WEBSITEZ_PLUGIN_NAME', 'WP Mobile Detector'); 35 define('WEBSITEZ_PLUGIN_VERSION', '3.0'); 30 36 define('WEBSITEZ_PLUGIN_AUTHORIZATION', 'wp_mobile_detector_token'); 31 37 define('WEBSITEZ_PLUGIN_DIR', dirname(__FILE__)); … … 33 39 define('WEBSITEZ_BASIC_THEME', 'websitez_basic_theme'); 34 40 define('WEBSITEZ_ADVANCED_THEME', 'websitez_advanced_theme'); 35 define('WEBSITEZ_INSTALL_BASIC_THEME', ' bluesteel-mobile');36 define('WEBSITEZ_INSTALL_ADVANCED_THEME', ' bluesteel-mobile');41 define('WEBSITEZ_INSTALL_BASIC_THEME', 'amanda-mobile'); 42 define('WEBSITEZ_INSTALL_ADVANCED_THEME', 'amanda-mobile'); 37 43 define('WEBSITEZ_DEFAULT_THEME', 'twentyten'); 38 define('WEBSITEZ_ADVANCED_MAX_IMAGE_WIDTH', ' 250');44 define('WEBSITEZ_ADVANCED_MAX_IMAGE_WIDTH', '320'); 39 45 define('WEBSITEZ_STATS_TABLE', $table_prefix.'websitez_stats'); 40 46 define('WEBSITEZ_RECORD_STATS_NAME', 'websitez_record_stats'); … … 46 52 define('WEBSITEZ_BASIC_URL_REDIRECT', 'websitez_basic_url_redirect'); 47 53 define('WEBSITEZ_ADVANCED_URL_REDIRECT', 'websitez_advanced_url_redirect'); 48 49 define('WEBSITEZ_SHOW_DASHBOARD_WIDGET', "true"); 50 define('WEBSITEZ_SHOW_DASHBOARD_WIDGET_NAME', "websitez_show_dashboard_widget"); 51 52 define('WEBSITEZ_SHOW_MOBILE_TO_TABLETS', "true"); 53 define('WEBSITEZ_SHOW_MOBILE_TO_TABLETS_NAME', "websitez_show_mobile_to_tablets"); 54 55 /* ADs off by default */ 56 define('WEBSITEZ_SHOW_MOBILE_ADS', "false"); 57 define('WEBSITEZ_SHOW_MOBILE_ADS_NAME', "websitez_show_mobile_ads"); 58 define('WEBSITEZ_MONETIZATION_MESSAGE', "websitez_monetization_message"); 54 define('WEBSITEZ_DISABLE_PLUGIN_NAME', 'websitez_disable_plugin'); 55 define('WEBSITEZ_DISABLE_PLUGIN', "false"); 56 define('WEBSITEZ_REDIRECT_MOBILE_VISITORS_NAME', 'websitez_redirect_mobile_visitors'); 57 define('WEBSITEZ_REDIRECT_MOBILE_VISITORS', "false"); 58 define('WEBSITEZ_REDIRECT_MOBILE_VISITORS_WEBSITE_NAME', 'websitez_redirect_mobile_visitors_website'); 59 define('WEBSITEZ_REDIRECT_MOBILE_VISITORS_WEBSITE', ""); 60 define('WEBSITEZ_LICENSE_KEY_NAME','websitez_pro_license_key'); 61 define('WEBSITEZ_LICENSE_EMAIL_NAME','websitez_pro_license_email'); 62 define('PURCHASE_WEBSITEZ_PRO_LINK','http://websitez.com'); 59 63 60 64 //Does this plugin come with pre-installed templates? … … 62 66 $websitez_preinstalled_templates = get_option(WEBSITEZ_USE_PREINSTALLED_THEMES_NAME); 63 67 68 //Configuration options 69 global $websitez_options, $websitez_preload_images; 70 64 71 // Install plugin 65 72 if(function_exists('register_activation_hook')) { 66 73 register_activation_hook( __FILE__, 'websitez_install' ); 67 74 } 75 if(function_exists('register_deactivation_hook')) { 76 register_deactivation_hook( __FILE__, 'websitez_uninstall' ); 77 } 68 78 69 79 if(is_admin()) { 70 80 require(dirname(__FILE__) . '/admin/admin-page.php'); 71 require(dirname(__FILE__) . '/admin/themes.php');72 81 add_action('admin_menu', 'websitez_configuration_menu'); 73 82 //Check to make sure plugin is installed properly 74 add_action('init', 'websitez_checkInstalled'); 75 add_action('init', 'websitez_authorization'); 76 //add_action('init', 'websitez_check_monetization'); 77 add_action('wp_dashboard_setup', 'websitez_dashboard_setup' ); 83 add_action('admin_init', 'websitez_checkInstalled'); 84 add_filter( 'cron_schedules', 'wz_cron_add_monthly' ); 85 add_filter('plugin_action_links', 'websitez_settings_link', 10, 2 ); 86 add_action("activated_plugin", "websitez_plugin_activated"); 87 add_action('wp_ajax_websitez_options', 'websitez_save_options'); 88 }else{ 89 // Using an action does not allow us to disable other plugins. 90 //add_action( 'plugins_loaded', 'websitez_go', 1 ); 91 websitez_go(); 78 92 } 79 93 80 /* 81 Lets get this party started. 82 */ 83 if(websitez_check_and_act_mobile()){ 84 if($websitez_preinstalled_templates == "true"){ 85 require(dirname(__FILE__) . '/default-widgets.php'); 86 if(!is_admin()){ 94 function websitez_go(){ 95 global $websitez_preinstalled_templates; 96 97 $websitez_detect = apply_filters( 'websitez_detect', true ); 98 if ( $websitez_detect !== true ) { 99 return false; 100 } 101 102 if(websitez_check_and_act_mobile()){ 103 if($websitez_preinstalled_templates == "true"){ 104 require(dirname(__FILE__) . '/default-widgets.php'); 87 105 add_filter('theme_root', 'websitez_setThemeFolder'); 88 106 add_filter('theme_root_uri', 'websitez_setThemeFolderFront'); … … 95 113 add_filter('get_the_generator_xhtml', 'websitez_wordpress_generator'); 96 114 add_filter('get_the_generator_html', 'websitez_wordpress_generator'); 115 }else{ 116 add_filter('stylesheet', 'websitez_getTheme'); 117 add_filter('template', 'websitez_getTheme'); 118 add_action('send_headers', 'websitez_send_headers'); 119 add_filter('get_the_generator_xhtml', 'websitez_wordpress_generator'); 120 add_filter('get_the_generator_html', 'websitez_wordpress_generator'); 97 121 } 98 }else{99 add_filter('stylesheet', 'websitez_getTheme');100 add_filter('template', 'websitez_getTheme');101 add_action('send_headers', 'websitez_send_headers');102 add_filter('get_the_generator_xhtml', 'websitez_wordpress_generator');103 add_filter('get_the_generator_html', 'websitez_wordpress_generator');104 122 } 105 123 } 124 add_action( 'websitez_do_filter', 'websitez_do_filter' ); 106 125 ?>
Note: See TracChangeset
for help on using the changeset viewer.