From: Steve Sutton Date: Fri, 29 Dec 2017 18:12:00 +0000 (-0500) Subject: turn off pdf thumbnails X-Git-Tag: v1.0.9^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=59e185ac49ef440e4033fdabd843b7d4bc3eb06f;p=WP-Themes%2Fmichigantrailmaps.git turn off pdf thumbnails --- diff --git a/functions.php b/functions.php index 06173c7..4a3d69f 100644 --- a/functions.php +++ b/functions.php @@ -73,20 +73,20 @@ add_filter('glm-member-db-front-search-query', function( $queryParts ) { add_filter('get_city_id_by_name', function( $city ) { global $wpdb; - + if (is_string($city)) { $citySql = "SELECT C.id FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."cities C " . "WHERE C.name = '$city' " . "LIMIT 1" . ";"; $city = $wpdb->get_var($citySql); - } + } return $city; }, 10, 1); add_filter('get_county_by_city', function( $city ) { global $wpdb; - + $sql = "SELECT C.id FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."counties C " . "WHERE C.id IN (" . "SELECT M.county " @@ -98,7 +98,7 @@ add_filter('get_county_by_city', function( $city ) { . ";"; $results = $wpdb->get_var($sql); return $results; - + }, 10, 1); add_filter('glm-member-db-fields-front-list-query-params', function( $query ){ $queryParams = array(); @@ -455,14 +455,14 @@ if (!function_exists('write_log')) { } } } -/* +/* * If a destination is searched for, display the ad for the city corresponding to that destination * (e.g. Petoskey Area destination => Petoskey city => Petoskey Area CVB ad) * If a city is searched for, if it is one of certain cities, display the ad for that city. * If it is not one of those cities check the county associated with the city searched for - * Otherwise, If a city is not searched for, check for the county that is searched for, + * Otherwise, If a city is not searched for, check for the county that is searched for, * then display the ad for that county - * + * */ function display_top_ads($city, $county, $destination) { // To avoid duplicate code and ease maintenance, for destinations use the same ads that the cities use, below @@ -480,14 +480,14 @@ function display_top_ads($city, $county, $destination) { break; } switch ($city) { // Find by city first, specific list given by client - case 37: // Gaylord City + case 37: // Gaylord City echo do_shortcode("[the_ad id='1182']"); // Show Gaylord Area CVB ad break; case 89: // Petoskey City echo do_shortcode("[the_ad id='1180']"); // Show Petoskey Area CVB ad break; case 106: // Traverse City - echo do_shortcode("[the_ad id='1186']"); // Show Traverse City CVB ad + echo do_shortcode("[the_ad id='1186']"); // Show Traverse City CVB ad break; default: // If a specific city override is not found, look at the county switch ($county) { @@ -512,4 +512,6 @@ function display_top_ads($city, $county, $destination) { break; } echo "
"; -} \ No newline at end of file +} + +add_filter( 'fallback_intermediate_image_sizes', '__return_empty_array' );