Changeset 756963
- Timestamp:
- 08/16/2013 02:28:38 AM (13 years ago)
- Location:
- app-store-assistant
- Files:
-
- 4 deleted
- 4 edited
- 37 copied
-
tags/6.3.1 (copied) (copied from app-store-assistant/trunk)
-
tags/6.3.1/app-store-assistant.php (copied) (copied from app-store-assistant/trunk/app-store-assistant.php) (2 diffs)
-
tags/6.3.1/css/appStore-admin.css (copied) (copied from app-store-assistant/trunk/css/appStore-admin.css)
-
tags/6.3.1/css/appStore-styles.css (copied) (copied from app-store-assistant/trunk/css/appStore-styles.css)
-
tags/6.3.1/images/iDevices/iPadFourthGen.png (copied) (copied from app-store-assistant/trunk/images/iDevices/iPadFourthGen.png)
-
tags/6.3.1/images/iDevices/iPadFourthGen4G.png (copied) (copied from app-store-assistant/trunk/images/iDevices/iPadFourthGen4G.png)
-
tags/6.3.1/images/iDevices/iPadMini.png (copied) (copied from app-store-assistant/trunk/images/iDevices/iPadMini.png)
-
tags/6.3.1/images/iDevices/iPadMini4G.png (copied) (copied from app-store-assistant/trunk/images/iDevices/iPadMini4G.png)
-
tags/6.3.1/images/iDevices/iPadThirdGen.png (copied) (copied from app-store-assistant/trunk/images/iDevices/iPadThirdGen.png)
-
tags/6.3.1/images/iDevices/iPadThirdGen4G.png (copied) (copied from app-store-assistant/trunk/images/iDevices/iPadThirdGen4G.png)
-
tags/6.3.1/images/iDevices/iPhone4S.png (copied) (copied from app-store-assistant/trunk/images/iDevices/iPhone4S.png)
-
tags/6.3.1/images/iDevices/iPhone5.png (copied) (copied from app-store-assistant/trunk/images/iDevices/iPhone5.png)
-
tags/6.3.1/images/iDevices/iPodTouchFifthGen.png (copied) (copied from app-store-assistant/trunk/images/iDevices/iPodTouchFifthGen.png)
-
tags/6.3.1/includes/app-store-admin_functions.php (copied) (copied from app-store-assistant/trunk/includes/app-store-admin_functions.php) (1 diff)
-
tags/6.3.1/includes/app-store-amazon_functions.php (copied) (copied from app-store-assistant/trunk/includes/app-store-amazon_functions.php)
-
tags/6.3.1/includes/app-store-functions.php (copied) (copied from app-store-assistant/trunk/includes/app-store-functions.php) (12 diffs)
-
tags/6.3.1/includes/options_pages/options_affiliate_dgm.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_affiliate_dgm.php)
-
tags/6.3.1/includes/options_pages/options_affiliate_linkshare.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_affiliate_linkshare.php)
-
tags/6.3.1/includes/options_pages/options_affiliate_phg.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_affiliate_phg.php)
-
tags/6.3.1/includes/options_pages/options_amazon_defaultTab.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_amazon_defaultTab.php)
-
tags/6.3.1/includes/options_pages/options_amazon_linktext.php (deleted)
-
tags/6.3.1/includes/options_pages/options_appstore_appicon.php (deleted)
-
tags/6.3.1/includes/options_pages/options_appstore_atomfeed.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_appstore_atomfeed.php)
-
tags/6.3.1/includes/options_pages/options_appstore_defaultTab.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_appstore_defaultTab.php)
-
tags/6.3.1/includes/options_pages/options_appstore_multipost.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_appstore_multipost.php)
-
tags/6.3.1/includes/options_pages/options_general_defaultTab.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_general_defaultTab.php)
-
tags/6.3.1/includes/options_pages/options_general_excerpts.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_general_excerpts.php)
-
tags/6.3.1/includes/options_pages/options_general_miscellaneous.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_general_miscellaneous.php)
-
tags/6.3.1/includes/options_pages/options_help_shortcodes.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_help_shortcodes.php)
-
tags/6.3.1/includes/options_pages/options_itunes_defaultTab.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_itunes_defaultTab.php)
-
tags/6.3.1/includes/options_pages/options_itunes_graphics.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_itunes_graphics.php)
-
tags/6.3.1/includes/options_pages/options_utils_defaultTab.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_utils_defaultTab.php)
-
tags/6.3.1/includes/options_pages/options_utils_reset.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_utils_reset.php)
-
tags/6.3.1/includes/options_pages/options_utils_reset_featured.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_utils_reset_featured.php)
-
tags/6.3.1/includes/options_pages/options_visual_imagesizes.php (copied) (copied from app-store-assistant/trunk/includes/options_pages/options_visual_imagesizes.php)
-
tags/6.3.1/includes/simplepie.inc (deleted)
-
tags/6.3.1/languages/appStoreAssistant-en_EN.mo (copied) (copied from app-store-assistant/trunk/languages/appStoreAssistant-en_EN.mo)
-
tags/6.3.1/languages/appStoreAssistant-en_EN.po (copied) (copied from app-store-assistant/trunk/languages/appStoreAssistant-en_EN.po)
-
tags/6.3.1/languages/appStoreAssistant.pot (copied) (copied from app-store-assistant/trunk/languages/appStoreAssistant.pot)
-
tags/6.3.1/readme.txt (copied) (copied from app-store-assistant/trunk/readme.txt) (4 diffs)
-
trunk/app-store-assistant.php (modified) (2 diffs)
-
trunk/includes/app-store-admin_functions.php (modified) (1 diff)
-
trunk/includes/app-store-functions.php (modified) (12 diffs)
-
trunk/includes/simplepie.inc (deleted)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
app-store-assistant/tags/6.3.1/app-store-assistant.php
r756516 r756963 2 2 /* 3 3 Plugin Name: App Store Assistant 4 Version: 6.3. 04 Version: 6.3.1 5 5 Text Domain: appStoreAssistant 6 6 Plugin URI: http://TheiPhoneAppsList.com/ … … 22 22 // -------------------------------------------------------------------------------------- 23 23 require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-functions.php'); 24 require_once(ASA_PLUGIN_INCLUDES_PATH.'simplepie.inc');24 //require_once(ASA_PLUGIN_INCLUDES_PATH.'simplepie.inc'); 25 25 require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-admin_functions.php'); 26 26 require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-amazon_functions.php'); -
app-store-assistant/tags/6.3.1/includes/app-store-admin_functions.php
r756516 r756963 974 974 $plugin_data = get_plugin_data( ASA_MAIN_FILE, false ); 975 975 976 if ( version_compare($wp_version, "3. 3", "<" ) ) {976 if ( version_compare($wp_version, "3.6", "<" ) ) { 977 977 if( is_plugin_active($plugin) ) { 978 978 deactivate_plugins( $plugin ); 979 wp_die( "'".$plugin_data['Name']."' requires WordPress 3. 3 or higher, and has been deactivated! Please upgrade WordPress and try again.<br /><br />Back to <a href='".admin_url()."'>WordPress admin</a>." );979 wp_die( "'".$plugin_data['Name']."' requires WordPress 3.6 or higher, and has been deactivated! Please upgrade WordPress and try again.<br /><br />(Older installations please use version 6.2.1)<br /><br />Back to <a href='".admin_url()."'>WordPress admin</a>." ); 980 980 } 981 981 } -
app-store-assistant/tags/6.3.1/includes/app-store-functions.php
r756516 r756963 540 540 $app->mode = $mode; 541 541 $app->more_info_text = $more_info_text; 542 if($app->kind == 'mac-software') $platform = 'mac_app'; 542 543 $app->platform = $platform; 543 544 $element = ""; … … 690 691 $platform = $mode.'_app'; 691 692 } 692 693 $last = $atomurl[strlen($atomurl)-1]; 694 if($last != "/") $AddSlash = "/"; 695 $RSS_Feed = $atomurl.$AddSlash."xml"; 693 $originalatomurl = $atomurl; 694 695 if(substr($atomurl,-7,7) == "rss.xml" || substr($atomurl,-8,8) == "rss.xml/") { 696 if(substr($atomurl,-8,8) == "rss.xml/") $atomurl = substr($atomurl,0,-1); 697 } else { 698 $last = $atomurl[strlen($atomurl)-1]; 699 if($last != "/") $AddSlash = "/"; 700 $atomurl = $atomurl.$AddSlash."xml"; 701 } 702 703 //$overidecache = true; 704 696 705 697 706 //Check to see if feed is available cached 698 $appStore_feedID = "appStore_rssfeed_".hash('md2', $ RSS_Feed);707 $appStore_feedID = "appStore_rssfeed_".hash('md2', $atomurl); 699 708 $appStore_feedOptions = get_option($appStore_feedID, ''); 700 709 701 if($appStore_feedOptions == '' || $appStore_feedOptions['next_check'] < time() ) {710 if($appStore_feedOptions == '' || $appStore_feedOptions['next_check'] < time() || $overidecache) { 702 711 $STAT = "REBUILT CACHE"; 703 712 // Get Array of AppIDs for ATOM Feed 704 $appIDs = appStore_getIDs_from_feed($ RSS_Feed);705 $appStore_feedOptions = array('next_check' => time() + appStore_setting('cache_time_select_box'), 'feedURL' => $ RSS_Feed, 'appIDs' => $appIDs);713 $appIDs = appStore_getIDs_from_feed($atomurl); 714 $appStore_feedOptions = array('next_check' => time() + appStore_setting('cache_time_select_box'), 'feedURL' => $atomurl, 'appIDs' => $appIDs); 706 715 update_option($appStore_feedID, $appStore_feedOptions); 707 716 } else { … … 712 721 //Pair down array to number of apps preference 713 722 array_splice($appIDs, appStore_setting('qty_of_apps')); 714 715 723 //Load App data 716 724 $appListDisplay = ''; 717 725 foreach($appIDs as $appID) { 718 726 //$appListDisplay .= "<hr><<<<<<<[$appID]>>>>>>><br />"; 719 if($appID == "" || !is_numeric($appID)) return ;727 if($appID == "" || !is_numeric($appID)) return "This list is currently empty."; 720 728 $app = appStore_get_data($appID); 729 721 730 if($app) { 722 if( stristr($mode, 'itunes')) {731 if($platform == 'itunes') { 723 732 $appListDisplay .= iTunesStore_page_output($app,$more_info_text,"ListOfApps",$platform).'<hr>'; 724 733 } else { … … 733 742 734 743 // ------------START OF MAIN FUNCTIONS----------------- 735 function iTunesStore_page_output($iTunesItem, $more_info_text,$mode=" internal",$platform="itunes") {744 function iTunesStore_page_output($iTunesItem, $more_info_text,$mode="SingleApp",$platform="itunes") { 736 745 GLOBAL $is_iphone; 746 747 737 748 // Start capturing output so the text in the post comes first. 738 749 ob_start(); … … 898 909 } 899 910 $app->more_info_text = $more_info_text; 911 if($app->kind == 'mac-software') $platform = 'mac_app'; 900 912 $app->platform = $platform; 901 913 $app->mode = $mode; … … 983 995 if(count($app->screenshotUrls) > 0) { 984 996 985 if($app->platform =="mac_app") $title_iPhone = __("Mac Screenshots",appStoreAssistant);986 if($app->platform =="ios_app") $title_iPhone = __("iPhone Screenshots",appStoreAssistant);997 if($app->platform == "mac_app") $title_iPhone = __("Mac Screenshots",appStoreAssistant); 998 if($app->platform == "ios_app") $title_iPhone = __("iPhone Screenshots",appStoreAssistant); 987 999 988 1000 // appStore-screenshots-iphone … … 1023 1035 return $element; 1024 1036 } 1037 1025 1038 if($valid_Screenshots_iPhone) $element .= getAccordionCode ($elementLoop_iPhone, "appStore-screenshots-iphone", $displayMode,$title_iPhone); 1026 1039 if($valid_Screenshots_iPad) $element .= getAccordionCode ($elementLoop_iPad, "appStore-screenshots-ipad", $displayMode,$title_iPad); … … 1407 1420 $elementFileSize = ''; 1408 1421 if (!empty($app->fileSizeBytes)) { 1409 $elementFileSize = '<li class="appStore-filesize">'.__("File Size",appStoreAssistant).': '. filesizeinfo($app->fileSizeBytes).'</li>';1422 $elementFileSize = '<li class="appStore-filesize">'.__("File Size",appStoreAssistant).': '.size_format($app->fileSizeBytes).'</li>'; 1410 1423 } 1411 1424 $elementUniversal = ''; … … 1420 1433 $appCategory = $app->genres; 1421 1434 $appCategoryPrime = $app->primaryGenreName; 1422 $appCategoryList = implode(', ', $appCategory);1435 if(is_array($appCategory)) $appCategoryList = implode(', ', $appCategory); 1423 1436 if (!empty($appCategory)) { 1424 1437 $wordForCategories = sprintf( _n('Category', 'Categories', count($appCategory), appStoreAssistant), count($appCategory) ); … … 1646 1659 } 1647 1660 1661 function appStore_cache_seconds($seconds) { 1662 return appStore_setting('cache_time_select_box'); 1663 } 1664 1665 1648 1666 function appStore_getIDs_from_feed($atomurl) { 1649 $last = $atomurl[strlen($atomurl)-1]; 1650 if($last != "/") $AddSlash = "/"; 1651 $urlEnd = 'xml'; 1652 $RSS_Feed = $atomurl.$AddSlash.$urlEnd; 1653 $feed = new SimplePie(); 1654 $feed->set_feed_url($RSS_Feed); 1655 $feed->init(); 1656 $feed->handle_content_type(); 1657 foreach ($feed->get_items() as $item): 1667 1668 add_filter( 'wp_feed_cache_transient_lifetime' , 'appStore_cache_seconds' ); 1669 $rss = fetch_feed($atomurl); 1670 remove_filter( 'wp_feed_cache_transient_lifetime' , 'appStore_cache_seconds' ); 1671 if ( ! is_wp_error( $rss ) ) : // Checks that the object is created correctly 1672 // Figure out how many total items there are, but limit it to appStore_setting('qty_of_apps'). 1673 $maxitems = $rss->get_item_quantity( appStore_setting('qty_of_apps') ); 1674 // Build an array of all the items, starting with element 0 (first element). 1675 $rss_items = $rss->get_items( 0, $maxitems ); 1676 endif; 1677 1678 foreach ($rss_items as $item): 1658 1679 $appID = $item->get_id(); 1659 1680 $pattern = '(id[0-9]+)'; … … 1663 1684 return $appIDs; 1664 1685 } 1665 1666 1686 1667 1687 function appStore_page_get_json($id) { … … 1933 1953 return $string; 1934 1954 } 1935 1936 function filesizeinfo($fs) {1937 $bytes = array('KB', 'KB', 'MB', 'GB', 'TB');1938 // values are always displayed in at least 1 kilobyte:1939 if ($fs <= 999) $fs = 1;1940 for ($i = 0; $fs > 999; $i++) {1941 $fs /= 1024;1942 }1943 1944 return ceil($fs)." ".$bytes[$i];1945 }1946 1955 ?> -
app-store-assistant/tags/6.3.1/readme.txt
r756516 r756963 5 5 Requires at least: 3.6 6 6 Tested up to: 3.6 7 Stable tag: 6.3. 07 Stable tag: 6.3.1 8 8 License: GPLv3 or later 9 9 … … 110 110 * Added: Shortcode tags can now overide the Store/Language chosen [Thanks crisf86] 111 111 * Added: Option to add a position number for the results from a ATOM feed [Thanks 2020media] 112 * Changed: Switch to included SimplePie113 112 * Changed: Sped up Reset of Featured Images (Using log system) 114 113 * Changed: Accepted jpeg for images … … 119 118 120 119 == Changelog == 120 121 = 6.3.1 = 122 * Changed: Requires WordPress 3.6 or higher (Older installations please use version 6.2.1) 123 * Added: Now handles new Apple RSS link formats 124 * Fixed: Description of Mac Screenshots no longer reads iPhone Screenshots 125 * Fixed: Recognition of Mac apps 126 * Changed: Uses size_format instead of internal function (Requires WP3.6+) 127 * Changed: Switch to WordPress included version of SimplePie 128 * Fixed: Error displayed if you had the wrong mode tag in the asaf_atomfeed shortcode 129 * Fixed: Cacheing of RSS Feed data 121 130 122 131 = 6.3.0 = … … 541 550 In Version 6.0.6 the Image system has been replaced. It is recommended that you clear the caches AFTER upgrading. 542 551 543 In Version 6.3.0 Apple has switched from LinkShare to PHG (Apply Here: http://affiliate.itunes.apple.com/apply) 552 In Version 6.3.0 Apple has switched from LinkShare to PHG (Apply Here: http://affiliate.itunes.apple.com/apply). THIS VERSION REQUIRES WordPress 3.6 or later!!!!! 544 553 545 554 == Note == -
app-store-assistant/trunk/app-store-assistant.php
r756516 r756963 2 2 /* 3 3 Plugin Name: App Store Assistant 4 Version: 6.3. 04 Version: 6.3.1 5 5 Text Domain: appStoreAssistant 6 6 Plugin URI: http://TheiPhoneAppsList.com/ … … 22 22 // -------------------------------------------------------------------------------------- 23 23 require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-functions.php'); 24 require_once(ASA_PLUGIN_INCLUDES_PATH.'simplepie.inc');24 //require_once(ASA_PLUGIN_INCLUDES_PATH.'simplepie.inc'); 25 25 require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-admin_functions.php'); 26 26 require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-amazon_functions.php'); -
app-store-assistant/trunk/includes/app-store-admin_functions.php
r756516 r756963 974 974 $plugin_data = get_plugin_data( ASA_MAIN_FILE, false ); 975 975 976 if ( version_compare($wp_version, "3. 3", "<" ) ) {976 if ( version_compare($wp_version, "3.6", "<" ) ) { 977 977 if( is_plugin_active($plugin) ) { 978 978 deactivate_plugins( $plugin ); 979 wp_die( "'".$plugin_data['Name']."' requires WordPress 3. 3 or higher, and has been deactivated! Please upgrade WordPress and try again.<br /><br />Back to <a href='".admin_url()."'>WordPress admin</a>." );979 wp_die( "'".$plugin_data['Name']."' requires WordPress 3.6 or higher, and has been deactivated! Please upgrade WordPress and try again.<br /><br />(Older installations please use version 6.2.1)<br /><br />Back to <a href='".admin_url()."'>WordPress admin</a>." ); 980 980 } 981 981 } -
app-store-assistant/trunk/includes/app-store-functions.php
r756516 r756963 540 540 $app->mode = $mode; 541 541 $app->more_info_text = $more_info_text; 542 if($app->kind == 'mac-software') $platform = 'mac_app'; 542 543 $app->platform = $platform; 543 544 $element = ""; … … 690 691 $platform = $mode.'_app'; 691 692 } 692 693 $last = $atomurl[strlen($atomurl)-1]; 694 if($last != "/") $AddSlash = "/"; 695 $RSS_Feed = $atomurl.$AddSlash."xml"; 693 $originalatomurl = $atomurl; 694 695 if(substr($atomurl,-7,7) == "rss.xml" || substr($atomurl,-8,8) == "rss.xml/") { 696 if(substr($atomurl,-8,8) == "rss.xml/") $atomurl = substr($atomurl,0,-1); 697 } else { 698 $last = $atomurl[strlen($atomurl)-1]; 699 if($last != "/") $AddSlash = "/"; 700 $atomurl = $atomurl.$AddSlash."xml"; 701 } 702 703 //$overidecache = true; 704 696 705 697 706 //Check to see if feed is available cached 698 $appStore_feedID = "appStore_rssfeed_".hash('md2', $ RSS_Feed);707 $appStore_feedID = "appStore_rssfeed_".hash('md2', $atomurl); 699 708 $appStore_feedOptions = get_option($appStore_feedID, ''); 700 709 701 if($appStore_feedOptions == '' || $appStore_feedOptions['next_check'] < time() ) {710 if($appStore_feedOptions == '' || $appStore_feedOptions['next_check'] < time() || $overidecache) { 702 711 $STAT = "REBUILT CACHE"; 703 712 // Get Array of AppIDs for ATOM Feed 704 $appIDs = appStore_getIDs_from_feed($ RSS_Feed);705 $appStore_feedOptions = array('next_check' => time() + appStore_setting('cache_time_select_box'), 'feedURL' => $ RSS_Feed, 'appIDs' => $appIDs);713 $appIDs = appStore_getIDs_from_feed($atomurl); 714 $appStore_feedOptions = array('next_check' => time() + appStore_setting('cache_time_select_box'), 'feedURL' => $atomurl, 'appIDs' => $appIDs); 706 715 update_option($appStore_feedID, $appStore_feedOptions); 707 716 } else { … … 712 721 //Pair down array to number of apps preference 713 722 array_splice($appIDs, appStore_setting('qty_of_apps')); 714 715 723 //Load App data 716 724 $appListDisplay = ''; 717 725 foreach($appIDs as $appID) { 718 726 //$appListDisplay .= "<hr><<<<<<<[$appID]>>>>>>><br />"; 719 if($appID == "" || !is_numeric($appID)) return ;727 if($appID == "" || !is_numeric($appID)) return "This list is currently empty."; 720 728 $app = appStore_get_data($appID); 729 721 730 if($app) { 722 if( stristr($mode, 'itunes')) {731 if($platform == 'itunes') { 723 732 $appListDisplay .= iTunesStore_page_output($app,$more_info_text,"ListOfApps",$platform).'<hr>'; 724 733 } else { … … 733 742 734 743 // ------------START OF MAIN FUNCTIONS----------------- 735 function iTunesStore_page_output($iTunesItem, $more_info_text,$mode=" internal",$platform="itunes") {744 function iTunesStore_page_output($iTunesItem, $more_info_text,$mode="SingleApp",$platform="itunes") { 736 745 GLOBAL $is_iphone; 746 747 737 748 // Start capturing output so the text in the post comes first. 738 749 ob_start(); … … 898 909 } 899 910 $app->more_info_text = $more_info_text; 911 if($app->kind == 'mac-software') $platform = 'mac_app'; 900 912 $app->platform = $platform; 901 913 $app->mode = $mode; … … 983 995 if(count($app->screenshotUrls) > 0) { 984 996 985 if($app->platform =="mac_app") $title_iPhone = __("Mac Screenshots",appStoreAssistant);986 if($app->platform =="ios_app") $title_iPhone = __("iPhone Screenshots",appStoreAssistant);997 if($app->platform == "mac_app") $title_iPhone = __("Mac Screenshots",appStoreAssistant); 998 if($app->platform == "ios_app") $title_iPhone = __("iPhone Screenshots",appStoreAssistant); 987 999 988 1000 // appStore-screenshots-iphone … … 1023 1035 return $element; 1024 1036 } 1037 1025 1038 if($valid_Screenshots_iPhone) $element .= getAccordionCode ($elementLoop_iPhone, "appStore-screenshots-iphone", $displayMode,$title_iPhone); 1026 1039 if($valid_Screenshots_iPad) $element .= getAccordionCode ($elementLoop_iPad, "appStore-screenshots-ipad", $displayMode,$title_iPad); … … 1407 1420 $elementFileSize = ''; 1408 1421 if (!empty($app->fileSizeBytes)) { 1409 $elementFileSize = '<li class="appStore-filesize">'.__("File Size",appStoreAssistant).': '. filesizeinfo($app->fileSizeBytes).'</li>';1422 $elementFileSize = '<li class="appStore-filesize">'.__("File Size",appStoreAssistant).': '.size_format($app->fileSizeBytes).'</li>'; 1410 1423 } 1411 1424 $elementUniversal = ''; … … 1420 1433 $appCategory = $app->genres; 1421 1434 $appCategoryPrime = $app->primaryGenreName; 1422 $appCategoryList = implode(', ', $appCategory);1435 if(is_array($appCategory)) $appCategoryList = implode(', ', $appCategory); 1423 1436 if (!empty($appCategory)) { 1424 1437 $wordForCategories = sprintf( _n('Category', 'Categories', count($appCategory), appStoreAssistant), count($appCategory) ); … … 1646 1659 } 1647 1660 1661 function appStore_cache_seconds($seconds) { 1662 return appStore_setting('cache_time_select_box'); 1663 } 1664 1665 1648 1666 function appStore_getIDs_from_feed($atomurl) { 1649 $last = $atomurl[strlen($atomurl)-1]; 1650 if($last != "/") $AddSlash = "/"; 1651 $urlEnd = 'xml'; 1652 $RSS_Feed = $atomurl.$AddSlash.$urlEnd; 1653 $feed = new SimplePie(); 1654 $feed->set_feed_url($RSS_Feed); 1655 $feed->init(); 1656 $feed->handle_content_type(); 1657 foreach ($feed->get_items() as $item): 1667 1668 add_filter( 'wp_feed_cache_transient_lifetime' , 'appStore_cache_seconds' ); 1669 $rss = fetch_feed($atomurl); 1670 remove_filter( 'wp_feed_cache_transient_lifetime' , 'appStore_cache_seconds' ); 1671 if ( ! is_wp_error( $rss ) ) : // Checks that the object is created correctly 1672 // Figure out how many total items there are, but limit it to appStore_setting('qty_of_apps'). 1673 $maxitems = $rss->get_item_quantity( appStore_setting('qty_of_apps') ); 1674 // Build an array of all the items, starting with element 0 (first element). 1675 $rss_items = $rss->get_items( 0, $maxitems ); 1676 endif; 1677 1678 foreach ($rss_items as $item): 1658 1679 $appID = $item->get_id(); 1659 1680 $pattern = '(id[0-9]+)'; … … 1663 1684 return $appIDs; 1664 1685 } 1665 1666 1686 1667 1687 function appStore_page_get_json($id) { … … 1933 1953 return $string; 1934 1954 } 1935 1936 function filesizeinfo($fs) {1937 $bytes = array('KB', 'KB', 'MB', 'GB', 'TB');1938 // values are always displayed in at least 1 kilobyte:1939 if ($fs <= 999) $fs = 1;1940 for ($i = 0; $fs > 999; $i++) {1941 $fs /= 1024;1942 }1943 1944 return ceil($fs)." ".$bytes[$i];1945 }1946 1955 ?> -
app-store-assistant/trunk/readme.txt
r756516 r756963 5 5 Requires at least: 3.6 6 6 Tested up to: 3.6 7 Stable tag: 6.3. 07 Stable tag: 6.3.1 8 8 License: GPLv3 or later 9 9 … … 110 110 * Added: Shortcode tags can now overide the Store/Language chosen [Thanks crisf86] 111 111 * Added: Option to add a position number for the results from a ATOM feed [Thanks 2020media] 112 * Changed: Switch to included SimplePie113 112 * Changed: Sped up Reset of Featured Images (Using log system) 114 113 * Changed: Accepted jpeg for images … … 119 118 120 119 == Changelog == 120 121 = 6.3.1 = 122 * Changed: Requires WordPress 3.6 or higher (Older installations please use version 6.2.1) 123 * Added: Now handles new Apple RSS link formats 124 * Fixed: Description of Mac Screenshots no longer reads iPhone Screenshots 125 * Fixed: Recognition of Mac apps 126 * Changed: Uses size_format instead of internal function (Requires WP3.6+) 127 * Changed: Switch to WordPress included version of SimplePie 128 * Fixed: Error displayed if you had the wrong mode tag in the asaf_atomfeed shortcode 129 * Fixed: Cacheing of RSS Feed data 121 130 122 131 = 6.3.0 = … … 541 550 In Version 6.0.6 the Image system has been replaced. It is recommended that you clear the caches AFTER upgrading. 542 551 543 In Version 6.3.0 Apple has switched from LinkShare to PHG (Apply Here: http://affiliate.itunes.apple.com/apply) 552 In Version 6.3.0 Apple has switched from LinkShare to PHG (Apply Here: http://affiliate.itunes.apple.com/apply). THIS VERSION REQUIRES WordPress 3.6 or later!!!!! 544 553 545 554 == Note ==
Note: See TracChangeset
for help on using the changeset viewer.