Changeset 1268149
- Timestamp:
- 10/18/2015 12:08:48 PM (10 years ago)
- Location:
- cpd-search/trunk
- Files:
-
- 2 edited
-
cpd-search.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpd-search/trunk/cpd-search.php
r1181776 r1268149 5 5 Plugin URI: http://www.cpd.co.uk/wordpress-plugins/ 6 6 Description: Provides a thin layer to the CPD REST API, via PHP/AJAX methods. 7 Version: 3.3. 67 Version: 3.3.7 8 8 Author: The CPD Team 9 9 Author URI: http://www.cpd.co.uk/ … … 694 694 $sizefrom = $property->sizefrom; 695 695 $sizeto = $property->sizeto; 696 $sizeunit = $property->sizeunit == 1 ? 'sq ft' : 'sq m';697 696 if($sizefrom == $sizeto) { 698 return $sizefrom." ".$sizeunit;697 return sprintf("%d sq m", $sizefrom); 699 698 } 700 699 else { 701 return $sizefrom." to ".$sizeto." ".$sizeunit; 700 return sprintf("%d to %d sq m", $sizefrom, $sizeto); 701 } 702 } 703 704 static function sizeDescriptionSqFt($property) { 705 $sizefrom = ceil($property->sizefrom * 10.7639); 706 $sizeto = ceil($property->sizeto * 10.7639); 707 if($sizefrom == $sizeto) { 708 return sprintf("%d sq ft", $sizefrom); 709 } 710 else { 711 return sprintf("%d to %d sq ft", $sizefrom, $sizeto); 702 712 } 703 713 } -
cpd-search/trunk/readme.txt
r1181776 r1268149 4 4 Requires at least: 3.6 5 5 Tested up to: 4.2.2 6 Stable tag: 3.3. 66 Stable tag: 3.3.7 7 7 8 8 Thin layer to provide custom themes and plugins with access to CPD's commercial property database. … … 23 23 24 24 == Changelog == 25 26 = 3.3.7 = 27 * Add distinct 'sizeDescriptionSqFt' method for presenting size in sqft. 25 28 26 29 = 3.3.6 =
Note: See TracChangeset
for help on using the changeset viewer.