diff --git a/README.md b/README.md index b53859f..48a8046 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,12 @@ for example: for example: `[taloyhtio nimi='Asunto Oy Tampereen Pohtola']` +### List items by item type +`[tyyppi nimi=]` + +for example: +`[tyyppi nimi="omakotitalo"]` + ## Feature Requests and Contributing We are not too actively developing individual features for the plugin as it's meant to be a starting point for development anyways. However, we do fix bugs and for example add support for new data if such data appears in the source system. If there are specific needs you can of course contact our sales. @@ -62,9 +68,12 @@ We are also happy to accept any pull requests if they are generic enough and see ## Changelog -** 1.0.1 ** +**1.0.2** +- Added shortcode for listing items based on item type. Patch submitted by @karikauppinen + +**1.0.1** - Fix scheduling initalialization (the scheduling did not work at all) - Change scheduling interval to 15 minutes -** 1.0.0 ** +**1.0.0** - Initial version diff --git a/includes/class-kivi.php b/includes/class-kivi.php index b3299f5..0d9f923 100644 --- a/includes/class-kivi.php +++ b/includes/class-kivi.php @@ -294,7 +294,7 @@ public function get_version() { public function register_shortcodes(){ add_shortcode('taloyhtio', array($this, 'realtycompany_shortcode')); add_shortcode('kunta', array($this, 'town_shortcode')); - + add_shortcode('tyyppi', array($this, 'realtytype_shortcode')); } public function kivi_list_shortcode($key, $value){ @@ -349,6 +349,11 @@ public function kivi_list_shortcode($key, $value){ public function realtycompany_shortcode($attributes) { return $this->kivi_list_shortcode('_realtycompany', $attributes["nimi"]); } + + public function realtytype_shortcode($attributes) { + return $this->kivi_list_shortcode('_realtytype_id', $attributes["nimi"]); + } + public function town_shortcode($attributes) { return $this->kivi_list_shortcode('_town', $attributes["nimi"]); } diff --git a/kivi.php b/kivi.php index c651b6d..ba47134 100644 --- a/kivi.php +++ b/kivi.php @@ -10,7 +10,7 @@ * Plugin Name: Kivi * Plugin URI: https://github.com/almamedia/kivi-wordpress * Description: A plugin for displaying KIVI real estate system items in WordPress - * Version: 1.0.1 + * Version: 1.0.2 * Author: Alma Medapartners Oy * Author URI: https://kivi.etuovi.com/ * License: GPL-2.0+