Regions for WP Job Manager - Version 1.5.1

Version Description

Download this release

Release Info

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

Code changes from version 1.5.0 to 1.5.1

includes/widgets/class-widget-region-list.php CHANGED
@@ -9,14 +9,14 @@ class Astoundify_Job_Manager_Regions_Widget_List extends Jobify_Widget {
9
  */
10
  public function __construct() {
11
  $this->widget_cssclass = 'ajmr_widget_regions';
12
- $this->widget_description = __( 'Display a list of job regions.', 'ajmr' );
13
  $this->widget_id = 'ajmr_widget_regions';
14
- $this->widget_name = __( 'Job Regions', 'ajmr' );
15
  $this->settings = array(
16
  'title' => array(
17
  'type' => 'text',
18
  'std' => 'Job Regions',
19
- 'label' => __( 'Title:', 'ajmr' )
20
  )
21
  );
22
  parent::__construct();
9
  */
10
  public function __construct() {
11
  $this->widget_cssclass = 'ajmr_widget_regions';
12
+ $this->widget_description = __( 'Display a list of job regions.', 'wp-job-manager-locations' );
13
  $this->widget_id = 'ajmr_widget_regions';
14
+ $this->widget_name = __( 'Job Regions', 'wp-job-manager-locations' );
15
  $this->settings = array(
16
  'title' => array(
17
  'type' => 'text',
18
  'std' => 'Job Regions',
19
+ 'label' => __( 'Title:', 'wp-job-manager-locations' )
20
  )
21
  );
22
  parent::__construct();
languages/wp-job-manager-locations.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the WP Job Manager - Predefined Regions package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP Job Manager - Predefined Regions 1.5.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-job-manager-locations\n"
7
- "POT-Creation-Date: 2014-09-09 15:19:34+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the same license as the WP Job Manager - Predefined Regions package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP Job Manager - Predefined Regions 1.5.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-job-manager-locations\n"
7
+ "POT-Creation-Date: 2014-10-13 14:44:02+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
readme.txt CHANGED
@@ -5,9 +5,9 @@ Plugin URI: http://astoundify.com
5
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=contact@appthemer.com&item_name=Donation+for+Astoundify WP Job Manager Regions
6
  Contributors: SpencerFinnell
7
  Tags: job, job listing, job region
8
- Requires at least: 4.0
9
- Tested up to: 4.0
10
- Stable Tag: 1.5.0
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
 
@@ -30,6 +30,10 @@ Astoundify has released the first fully integrated WP Job Manager theme. Check o
30
 
31
  == Changelog ==
32
 
 
 
 
 
33
  = 1.5.0: September 9, 2014 =
34
 
35
  * New: Regions can now be used to filter listings instead of the standard location text field.
5
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=contact@appthemer.com&item_name=Donation+for+Astoundify WP Job Manager Regions
6
  Contributors: SpencerFinnell
7
  Tags: job, job listing, job region
8
+ Requires at least: 3.9.0
9
+ Tested up to: 4.0.0
10
+ Stable Tag: 1.5.1
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
 
30
 
31
  == Changelog ==
32
 
33
+ = 1.5.1: October 13, 2014 =
34
+
35
+ * Fix: Properly unset location input to avoid polluted query.
36
+
37
  = 1.5.0: September 9, 2014 =
38
 
39
  * New: Regions can now be used to filter listings instead of the standard location text field.
widgets.php DELETED
@@ -1,68 +0,0 @@
1
- <?php
2
- /**
3
- * Widgets
4
- */
5
-
6
- // Exit if accessed directly
7
- if ( ! defined( 'ABSPATH' ) ) exit;
8
-
9
- if ( class_exists( 'Jobify_Widget' ) ) :
10
- /**
11
- * Simple list
12
- */
13
- class Astoundify_Job_Manager_Regions_Widget extends Jobify_Widget {
14
- /**
15
- * Constructor
16
- */
17
- public function __construct() {
18
- $this->widget_cssclass = 'ajmr_widget_regions';
19
- $this->widget_description = __( 'Display a list of job regions.', 'ajmr' );
20
- $this->widget_id = 'ajmr_widget_regions';
21
- $this->widget_name = __( 'Job Regions', 'ajmr' );
22
- $this->settings = array(
23
- 'title' => array(
24
- 'type' => 'text',
25
- 'std' => 'Job Regions',
26
- 'label' => __( 'Title:', 'ajmr' )
27
- )
28
- );
29
- parent::__construct();
30
- }
31
-
32
- /**
33
- * widget function.
34
- *
35
- * @see WP_Widget
36
- * @access public
37
- * @param array $args
38
- * @param array $instance
39
- * @return void
40
- */
41
- function widget( $args, $instance ) {
42
- if ( $this->get_cached_widget( $args ) )
43
- return;
44
-
45
- ob_start();
46
-
47
- extract( $args );
48
-
49
- echo $before_widget;
50
-
51
- if ( $instance[ 'title' ] ) echo $before_title . $instance[ 'title' ] . $after_title;
52
-
53
- wp_list_categories( array(
54
- 'title_li' => '',
55
- 'taxonomy' => 'job_listing_region',
56
- 'hide_empty' => 0
57
- ) );
58
-
59
- echo $after_widget;
60
-
61
- $content = ob_get_clean();
62
-
63
- echo $content;
64
-
65
- $this->cache_widget( $args, $content );
66
- }
67
- }
68
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.5.0
9
  * Text Domain: wp-job-manager-locations
10
  */
11
 
@@ -104,6 +104,10 @@ class Astoundify_Job_Manager_Regions {
104
  if ( is_tax( 'job_listing_region' ) ) {
105
  $type = get_queried_object();
106
 
 
 
 
 
107
  $defaults[ 'show_categories' ] = true;
108
  $defaults[ 'selected_region' ] = $type->term_id;
109
  }
@@ -150,7 +154,7 @@ class Astoundify_Job_Manager_Regions {
150
  parse_str( $_POST[ 'form_data' ], $params );
151
 
152
  if ( isset( $params[ 'search_region' ] ) && 0 != $params[ 'search_region' ] ) {
153
- $args[ 'search_location' ] = ' ';
154
  }
155
 
156
  }
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.5.1
9
  * Text Domain: wp-job-manager-locations
10
  */
11
 
104
  if ( is_tax( 'job_listing_region' ) ) {
105
  $type = get_queried_object();
106
 
107
+ if ( ! $type ) {
108
+ return $defaults;
109
+ }
110
+
111
  $defaults[ 'show_categories' ] = true;
112
  $defaults[ 'selected_region' ] = $type->term_id;
113
  }
154
  parse_str( $_POST[ 'form_data' ], $params );
155
 
156
  if ( isset( $params[ 'search_region' ] ) && 0 != $params[ 'search_region' ] ) {
157
+ $args[ 'search_location' ] = null;
158
  }
159
 
160
  }