Skip to content

Commit

Permalink
Applied shortcode adding patch submitted by https://github.com/karika…
Browse files Browse the repository at this point in the history
…uppinen . Also added relevant documentation for the shortcode

Version increase
  • Loading branch information
akeskitalo committed Aug 8, 2016
1 parent da3be9d commit 392efd7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ for example:
for example:
`[taloyhtio nimi='Asunto Oy Tampereen Pohtola']`

### List items by item type
`[tyyppi nimi=<item type name>]`

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.
Expand All @@ -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
7 changes: 6 additions & 1 deletion includes/class-kivi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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"]);
}
Expand Down
2 changes: 1 addition & 1 deletion kivi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Expand Down

0 comments on commit 392efd7

Please sign in to comment.