Version Description
Download this release
Release Info
Developer | adampickering |
Plugin | Regions for WP Job Manager |
Version | 1.5.2 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.5.2
- includes/class-template.php +14 -2
- readme.txt +5 -1
- wp-job-manager-locations.php +6 -8
includes/class-template.php
CHANGED
@@ -12,6 +12,8 @@ class Astoundify_Job_Manager_Regions_Template extends Astoundify_Job_Manager_Reg
|
|
12 |
if ( get_option( 'job_manager_regions_filter' ) ) {
|
13 |
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
|
14 |
add_action( 'job_manager_job_filters_search_jobs_end', array( $this, 'job_manager_job_filters_search_jobs_end' ) );
|
|
|
|
|
15 |
}
|
16 |
}
|
17 |
|
@@ -60,11 +62,21 @@ class Astoundify_Job_Manager_Regions_Template extends Astoundify_Job_Manager_Reg
|
|
60 |
'taxonomy' => 'job_listing_region',
|
61 |
'name' => 'search_region',
|
62 |
'class' => 'search_region',
|
63 |
-
'hide_empty' =>
|
64 |
'selected' => isset( $atts[ 'selected_region' ] ) ? $atts[ 'selected_region' ] : ''
|
65 |
) );
|
66 |
}
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
/**
|
69 |
* Replace location output with the region.
|
70 |
*
|
@@ -82,4 +94,4 @@ class Astoundify_Job_Manager_Regions_Template extends Astoundify_Job_Manager_Reg
|
|
82 |
return $location->name;
|
83 |
}
|
84 |
|
85 |
-
}
|
12 |
if ( get_option( 'job_manager_regions_filter' ) ) {
|
13 |
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
|
14 |
add_action( 'job_manager_job_filters_search_jobs_end', array( $this, 'job_manager_job_filters_search_jobs_end' ) );
|
15 |
+
} else {
|
16 |
+
add_action( 'job_manager_job_filters_search_jobs_end', array( $this, 'tax_archive_field' ) );
|
17 |
}
|
18 |
}
|
19 |
|
62 |
'taxonomy' => 'job_listing_region',
|
63 |
'name' => 'search_region',
|
64 |
'class' => 'search_region',
|
65 |
+
'hide_empty' => 0,
|
66 |
'selected' => isset( $atts[ 'selected_region' ] ) ? $atts[ 'selected_region' ] : ''
|
67 |
) );
|
68 |
}
|
69 |
|
70 |
+
public function tax_archive_field( $atts ) {
|
71 |
+
if ( ( ! isset( $atts[ 'selected_region' ] ) || '' == $atts[ 'selected_region' ] ) && isset( $_GET[ 'search_region' ] ) ) {
|
72 |
+
$atts[ 'selected_region' ] = absint( $_GET[ 'search_region' ] );
|
73 |
+
}
|
74 |
+
|
75 |
+
echo '<input type="hidden" name="search_region" class="search_region" value="' . $atts[
|
76 |
+
'selected_region' ]. '" />';
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
/**
|
81 |
* Replace location output with the region.
|
82 |
*
|
94 |
return $location->name;
|
95 |
}
|
96 |
|
97 |
+
}
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ 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.
|
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.1: October 13, 2014 =
|
34 |
|
35 |
* Fix: Properly unset location input to avoid polluted query.
|
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.2
|
11 |
License: GPLv3
|
12 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
13 |
|
30 |
|
31 |
== Changelog ==
|
32 |
|
33 |
+
= 1.5.2: November 25, 2014 =
|
34 |
+
|
35 |
+
* Tweak: Turn off region dropdown for new installs.
|
36 |
+
|
37 |
= 1.5.1: October 13, 2014 =
|
38 |
|
39 |
* Fix: Properly unset location input to avoid polluted query.
|
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.
|
9 |
* Text Domain: wp-job-manager-locations
|
10 |
*/
|
11 |
|
@@ -69,11 +69,9 @@ class Astoundify_Job_Manager_Regions {
|
|
69 |
private function setup_actions() {
|
70 |
add_filter( 'job_manager_settings', array( $this, 'job_manager_settings' ) );
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
add_filter( 'job_manager_get_listings_args', array( $this, 'job_manager_get_listings_args' ) );
|
76 |
-
}
|
77 |
|
78 |
$this->load_textdomain();
|
79 |
}
|
@@ -88,7 +86,7 @@ class Astoundify_Job_Manager_Regions {
|
|
88 |
public function job_manager_settings($settings) {
|
89 |
$settings[ 'job_listings' ][1][] = array(
|
90 |
'name' => 'job_manager_regions_filter',
|
91 |
-
'std' => '
|
92 |
'label' => __( 'Job Regions', 'wp-job-manager-locations' ),
|
93 |
'cb_label' => __( 'Filter by Region', 'wp-job-manager-locations' ),
|
94 |
'desc' => __( 'Use a dropdown instead of a text input.' ),
|
@@ -226,4 +224,4 @@ add_action( 'plugins_loaded', array( 'Astoundify_Job_Manager_Regions', 'instance
|
|
226 |
*/
|
227 |
function wp_job_manager_regions() {
|
228 |
return Astoundify_Job_Manager_Regions::instance();
|
229 |
-
}
|
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.2
|
9 |
* Text Domain: wp-job-manager-locations
|
10 |
*/
|
11 |
|
69 |
private function setup_actions() {
|
70 |
add_filter( 'job_manager_settings', array( $this, 'job_manager_settings' ) );
|
71 |
|
72 |
+
add_filter( 'job_manager_output_jobs_defaults', array( $this, 'job_manager_output_jobs_defaults' ) );
|
73 |
+
add_filter( 'job_manager_get_listings', array( $this, 'job_manager_get_listings' ) );
|
74 |
+
add_filter( 'job_manager_get_listings_args', array( $this, 'job_manager_get_listings_args' ) );
|
|
|
|
|
75 |
|
76 |
$this->load_textdomain();
|
77 |
}
|
86 |
public function job_manager_settings($settings) {
|
87 |
$settings[ 'job_listings' ][1][] = array(
|
88 |
'name' => 'job_manager_regions_filter',
|
89 |
+
'std' => '0',
|
90 |
'label' => __( 'Job Regions', 'wp-job-manager-locations' ),
|
91 |
'cb_label' => __( 'Filter by Region', 'wp-job-manager-locations' ),
|
92 |
'desc' => __( 'Use a dropdown instead of a text input.' ),
|
224 |
*/
|
225 |
function wp_job_manager_regions() {
|
226 |
return Astoundify_Job_Manager_Regions::instance();
|
227 |
+
}
|