Changeset 2964274
- Timestamp:
- 09/07/2023 09:51:52 PM (2 years ago)
- Location:
- vistawp
- Files:
-
- 2 added
- 2 deleted
- 10 edited
- 1 copied
-
tags/1.2.0 (copied) (copied from vistawp/trunk)
-
tags/1.2.0/includes/api/get-listing-params.php (modified) (2 diffs)
-
tags/1.2.0/includes/functions.php (modified) (1 diff)
-
tags/1.2.0/includes/listings/listing-display-by-filters.php (added)
-
tags/1.2.0/includes/listings/listing-filter.php (deleted)
-
tags/1.2.0/includes/listings/single-listing.php (modified) (1 diff)
-
tags/1.2.0/readme.txt (modified) (1 diff)
-
tags/1.2.0/vista.php (modified) (3 diffs)
-
trunk/includes/api/get-listing-params.php (modified) (2 diffs)
-
trunk/includes/functions.php (modified) (1 diff)
-
trunk/includes/listings/listing-display-by-filters.php (added)
-
trunk/includes/listings/listing-filter.php (deleted)
-
trunk/includes/listings/single-listing.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/vista.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vistawp/tags/1.2.0/includes/api/get-listing-params.php
r2924340 r2964274 20 20 parent::__construct(); 21 21 22 /** 23 * Maps URL parameters to SimplyRETS API parameters 24 */ 25 $this->mappings = array( 22 $this->mappings = self::get_param_list(); 23 } 24 25 /** 26 * Gets the default query parameters for a listing 27 * 28 * @return Array 29 */ 30 public static function get_param_list() { 31 return array( 26 32 'offset' => 'offset', // Required for pagination 27 33 'limit' => 'limit', // Required for pagination … … 67 73 'sort' => 'sort', 68 74 'count' => 'count', 75 'listing_ids' => 'listing_ids', 76 'mls_area' => 'mls_area', 69 77 ); 70 78 } 79 71 80 } 72 73 74 75 ?> -
vistawp/tags/1.2.0/includes/functions.php
r2949654 r2964274 7 7 // based on original work from the PHP Laravel framework 8 8 if (!function_exists('str_contains')) { 9 function str_contains($haystack, $needle) { 10 return $needle !== '' && mb_strpos($haystack, $needle) !== false; 11 } 9 function str_contains($haystack, $needle) { 10 return $needle !== '' && mb_strpos($haystack, $needle) !== false; 11 } 12 } 13 14 if (!function_exists('vista_prepare_field_value')) { 15 /** 16 * Sanitizes and filters a value, preparing it for a received query parameter 17 * 18 * @param string $value - Value of the query parameter to be sanitized and filtered 19 * 20 * @return Array $value - Array containing the filtered values, 21 * (e.g., array( '98877034', '98870614', '98886014') as a result of a string input '98877034,98870614,98886014') 22 */ 23 function vista_prepare_field_value(string $value): array { 24 $sanitized_value = sanitize_text_field($value); 25 $value = preg_split( 26 '/(%2C\+)|(, )|\+|,\s*/', 27 $sanitized_value, 28 -1, 29 PREG_SPLIT_NO_EMPTY 30 ); 31 32 return $value; 33 } 12 34 } 13 35 14 36 if (!function_exists('vista_plugin_url')) { 15 /**16 * Helper function to construct relative URLs to files in this plugin.17 * This function converts a path relative to the plugin root directory to18 * a full path, regardless of plugin file renaming.19 *20 * @param string $path The path to the file, relative to the plugin root directory21 */22 function vista_plugin_url(string $path): string {23 return plugins_url($path, dirname(__FILE__));24 }37 /** 38 * Helper function to construct relative URLs to files in this plugin. 39 * This function converts a path relative to the plugin root directory to 40 * a full path, regardless of plugin file renaming. 41 * 42 * @param string $path The path to the file, relative to the plugin root directory 43 */ 44 function vista_plugin_url(string $path): string { 45 return plugins_url($path, dirname(__FILE__)); 46 } 25 47 } 26 27 28 ?> -
vistawp/tags/1.2.0/includes/listings/single-listing.php
r2949654 r2964274 94 94 95 95 } 96 97 }98 99 $this->try_process_field( 'sqftPrice', NULL ); 96 } else { 97 $this->try_process_field( 'sqftPrice', NULL ); 98 } 99 100 100 } 101 101 -
vistawp/tags/1.2.0/readme.txt
r2961844 r2964274 5 5 Requires at least: 4.7 6 6 Tested up to: 6.3 7 Stable tag: 1. 1.27 Stable tag: 1.2.0 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later -
vistawp/tags/1.2.0/vista.php
r2961844 r2964274 3 3 * Plugin Name: VistaWP 4 4 * Description: Retrieves and displays real estate listings 5 * Version: 1. 1.25 * Version: 1.2.0 6 6 * Author: VistaWP 7 7 * Author URI: https://vistawp.com/ … … 63 63 */ 64 64 private function init_classes(): void { 65 Listings\Listing_Display_By_Filters::get_instance(); 65 66 Listings\Single_Listing_Display::get_instance(); 66 67 Listings\Map::get_instance(); … … 100 101 require_once 'includes/api/get-params.php'; 101 102 } 102 // Listing filter interface103 if ( !interface_exists("\\VSTA\\Listings\\Listing_Filter")) {104 require_once 'includes/listings/listing-filter.php';105 }106 103 107 104 // CLASS FILES: 105 // For displaying multiple listings by filter 106 if( !class_exists( "\\VSTA\\Listing_Display_By_Filters" ) ) { 107 require_once 'includes/listings/listing-display-by-filters.php'; 108 } 109 108 110 // For displaying single listings 109 111 if ( !class_exists("\\VSTA\\Listings\\Single_Listing_Display") ) { -
vistawp/trunk/includes/api/get-listing-params.php
r2924340 r2964274 20 20 parent::__construct(); 21 21 22 /** 23 * Maps URL parameters to SimplyRETS API parameters 24 */ 25 $this->mappings = array( 22 $this->mappings = self::get_param_list(); 23 } 24 25 /** 26 * Gets the default query parameters for a listing 27 * 28 * @return Array 29 */ 30 public static function get_param_list() { 31 return array( 26 32 'offset' => 'offset', // Required for pagination 27 33 'limit' => 'limit', // Required for pagination … … 67 73 'sort' => 'sort', 68 74 'count' => 'count', 75 'listing_ids' => 'listing_ids', 76 'mls_area' => 'mls_area', 69 77 ); 70 78 } 79 71 80 } 72 73 74 75 ?> -
vistawp/trunk/includes/functions.php
r2949654 r2964274 7 7 // based on original work from the PHP Laravel framework 8 8 if (!function_exists('str_contains')) { 9 function str_contains($haystack, $needle) { 10 return $needle !== '' && mb_strpos($haystack, $needle) !== false; 11 } 9 function str_contains($haystack, $needle) { 10 return $needle !== '' && mb_strpos($haystack, $needle) !== false; 11 } 12 } 13 14 if (!function_exists('vista_prepare_field_value')) { 15 /** 16 * Sanitizes and filters a value, preparing it for a received query parameter 17 * 18 * @param string $value - Value of the query parameter to be sanitized and filtered 19 * 20 * @return Array $value - Array containing the filtered values, 21 * (e.g., array( '98877034', '98870614', '98886014') as a result of a string input '98877034,98870614,98886014') 22 */ 23 function vista_prepare_field_value(string $value): array { 24 $sanitized_value = sanitize_text_field($value); 25 $value = preg_split( 26 '/(%2C\+)|(, )|\+|,\s*/', 27 $sanitized_value, 28 -1, 29 PREG_SPLIT_NO_EMPTY 30 ); 31 32 return $value; 33 } 12 34 } 13 35 14 36 if (!function_exists('vista_plugin_url')) { 15 /**16 * Helper function to construct relative URLs to files in this plugin.17 * This function converts a path relative to the plugin root directory to18 * a full path, regardless of plugin file renaming.19 *20 * @param string $path The path to the file, relative to the plugin root directory21 */22 function vista_plugin_url(string $path): string {23 return plugins_url($path, dirname(__FILE__));24 }37 /** 38 * Helper function to construct relative URLs to files in this plugin. 39 * This function converts a path relative to the plugin root directory to 40 * a full path, regardless of plugin file renaming. 41 * 42 * @param string $path The path to the file, relative to the plugin root directory 43 */ 44 function vista_plugin_url(string $path): string { 45 return plugins_url($path, dirname(__FILE__)); 46 } 25 47 } 26 27 28 ?> -
vistawp/trunk/includes/listings/single-listing.php
r2949654 r2964274 94 94 95 95 } 96 97 }98 99 $this->try_process_field( 'sqftPrice', NULL ); 96 } else { 97 $this->try_process_field( 'sqftPrice', NULL ); 98 } 99 100 100 } 101 101 -
vistawp/trunk/readme.txt
r2961844 r2964274 5 5 Requires at least: 4.7 6 6 Tested up to: 6.3 7 Stable tag: 1. 1.27 Stable tag: 1.2.0 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later -
vistawp/trunk/vista.php
r2961844 r2964274 3 3 * Plugin Name: VistaWP 4 4 * Description: Retrieves and displays real estate listings 5 * Version: 1. 1.25 * Version: 1.2.0 6 6 * Author: VistaWP 7 7 * Author URI: https://vistawp.com/ … … 63 63 */ 64 64 private function init_classes(): void { 65 Listings\Listing_Display_By_Filters::get_instance(); 65 66 Listings\Single_Listing_Display::get_instance(); 66 67 Listings\Map::get_instance(); … … 100 101 require_once 'includes/api/get-params.php'; 101 102 } 102 // Listing filter interface103 if ( !interface_exists("\\VSTA\\Listings\\Listing_Filter")) {104 require_once 'includes/listings/listing-filter.php';105 }106 103 107 104 // CLASS FILES: 105 // For displaying multiple listings by filter 106 if( !class_exists( "\\VSTA\\Listing_Display_By_Filters" ) ) { 107 require_once 'includes/listings/listing-display-by-filters.php'; 108 } 109 108 110 // For displaying single listings 109 111 if ( !class_exists("\\VSTA\\Listings\\Single_Listing_Display") ) {
Note: See TracChangeset
for help on using the changeset viewer.