Plugin Directory

Changeset 1268149


Ignore:
Timestamp:
10/18/2015 12:08:48 PM (10 years ago)
Author:
rossigee
Message:

Apply latest patches from github repository (https://github.com/commpropdb/cpd-search).

Location:
cpd-search/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpd-search/trunk/cpd-search.php

    r1181776 r1268149  
    55Plugin URI: http://www.cpd.co.uk/wordpress-plugins/
    66Description: Provides a thin layer to the CPD REST API, via PHP/AJAX methods.
    7 Version: 3.3.6
     7Version: 3.3.7
    88Author: The CPD Team
    99Author URI: http://www.cpd.co.uk/
     
    694694        $sizefrom = $property->sizefrom;
    695695        $sizeto = $property->sizeto;
    696         $sizeunit = $property->sizeunit == 1 ? 'sq ft' : 'sq m';
    697696        if($sizefrom == $sizeto) {
    698             return $sizefrom." ".$sizeunit;
     697            return sprintf("%d sq m", $sizefrom);
    699698        }
    700699        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);
    702712        }
    703713    }
  • cpd-search/trunk/readme.txt

    r1181776 r1268149  
    44Requires at least: 3.6
    55Tested up to: 4.2.2
    6 Stable tag: 3.3.6
     6Stable tag: 3.3.7
    77
    88Thin layer to provide custom themes and plugins with access to CPD's commercial property database.
     
    2323
    2424== Changelog ==
     25
     26= 3.3.7 =
     27* Add distinct 'sizeDescriptionSqFt' method for presenting size in sqft.
    2528
    2629= 3.3.6 =
Note: See TracChangeset for help on using the changeset viewer.