Regions for WP Job Manager - Version 1.6.1

Version Description

Download this release

Release Info

Developer adampickering
Plugin Icon wp plugin Regions for WP Job Manager
Version 1.6.1
Comparing to
See all releases

Code changes from version 1.6.0 to 1.6.1

includes/class-template.php CHANGED
@@ -88,6 +88,22 @@ class Astoundify_Job_Manager_Regions_Template extends Astoundify_Job_Manager_Reg
88
  * @since 1.0.0
89
  */
90
  public function the_job_location( $job_location, $post ) {
91
- return get_the_term_list( $post->ID, 'job_listing_region', '', ', ', '' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  }
93
  }
88
  * @since 1.0.0
89
  */
90
  public function the_job_location( $job_location, $post ) {
91
+ if ( is_singular( 'job_listing' ) ) {
92
+ return get_the_term_list( $post->ID, 'job_listing_region', '', ', ', '' );
93
+ } else {
94
+ $terms = wp_get_object_terms( $post->ID, 'job_listing_region' );
95
+
96
+ if ( empty( $terms ) ) {
97
+ return;
98
+ }
99
+
100
+ $names = array();
101
+
102
+ foreach ( $terms as $term ) {
103
+ $names[] = $term->name;
104
+ }
105
+
106
+ return implode( ', ', $names );
107
+ }
108
  }
109
  }
readme.txt CHANGED
@@ -7,7 +7,7 @@ Contributors: Astoundify, SpencerFinnell
7
  Tags: job, job listing, job region
8
  Requires at least: 3.6
9
  Tested up to: 4.1
10
- Stable Tag: 1.6.0
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
 
@@ -32,6 +32,10 @@ Astoundify has released two themes that are fully integrated with the WP Job Man
32
 
33
  == Changelog ==
34
 
 
 
 
 
35
  = 1.6.0: December 17, 2014 =
36
 
37
  * New: Add a class to the theme's body tag so the location field can be hidden on term archive pages when filters are off.
7
  Tags: job, job listing, job region
8
  Requires at least: 3.6
9
  Tested up to: 4.1
10
+ Stable Tag: 1.6.1
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
 
32
 
33
  == Changelog ==
34
 
35
+ = 1.6.1: December 19, 2014 =
36
+
37
+ Fix: Outputting extra links in the job list.
38
+
39
  = 1.6.0: December 17, 2014 =
40
 
41
  * New: Add a class to the theme's body tag so the location field can be hidden on term archive pages when filters are off.
templates/form-fields/job-region-field.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- wp_dropdown_categories( array(
3
- 'taxonomy' => 'job_listing_region',
4
- 'name' => esc_attr( isset( $field['name'] ) ? $field['name'] : $key ),
5
- 'id' => esc_attr( $key ),
6
- 'hierarchical' => true,
7
- 'selected' => isset( $field[ 'value' ] ) ? $field[ 'value' ] : $field[ 'default' ],
8
- 'show_option_none' => _x( '&mdash;', 'show option none', 'wp-job-manager-locations' ),
9
- 'hide_empty' => false
10
- ) );
11
- ?>
 
 
 
 
 
 
 
 
 
 
 
wp-job-manager-locations.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Create predefined regions/locations that job submissions can associate themselves with.
6
  * Author: Astoundify
7
  * Author URI: http://astoundify.com
8
- * Version: 1.6.0
9
  * Text Domain: wp-job-manager-locations
10
  */
11
 
5
  * Description: Create predefined regions/locations that job submissions can associate themselves with.
6
  * Author: Astoundify
7
  * Author URI: http://astoundify.com
8
+ * Version: 1.6.1
9
  * Text Domain: wp-job-manager-locations
10
  */
11