Regions for WP Job Manager - Version 1.7.0

Version Description

Download this release

Release Info

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

Code changes from version 1.6.1 to 1.7.0

includes/class-template.php CHANGED
@@ -5,8 +5,12 @@ class Astoundify_Job_Manager_Regions_Template extends Astoundify_Job_Manager_Reg
5
  public function __construct() {
6
  add_filter( 'submit_job_form_fields', array( $this, 'submit_job_form_fields' ) );
7
  add_filter( 'the_job_location', array( $this, 'the_job_location' ), 10, 2 );
 
 
 
8
 
9
- if ( get_option( 'job_manager_regions_filter' ) ) {
 
10
  add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
11
  add_action( 'job_manager_job_filters_search_jobs_end', array( $this, 'job_manager_job_filters_search_jobs_end' ) );
12
  } else {
5
  public function __construct() {
6
  add_filter( 'submit_job_form_fields', array( $this, 'submit_job_form_fields' ) );
7
  add_filter( 'the_job_location', array( $this, 'the_job_location' ), 10, 2 );
8
+
9
+ add_action( 'wp', array( $this, 'sort' ) );
10
+ }
11
 
12
+ public function sort() {
13
+ if ( get_option( 'job_manager_regions_filter' ) || is_tax( 'job_listing_region' ) ) {
14
  add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
15
  add_action( 'job_manager_job_filters_search_jobs_end', array( $this, 'job_manager_job_filters_search_jobs_end' ) );
16
  } else {
languages/wp-job-manager-locations-da_DK.mo ADDED
Binary file
languages/wp-job-manager-locations-da_DK.po ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2015
2
+ # This file is distributed under the same license as the package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Oversættelse af WP Job manager Locations\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-job-manager-regions\n"
7
+ "POT-Creation-Date: 2015-01-06 15:06:36+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-01-09 14:11+0100\n"
12
+ "Last-Translator: Nicklas Millard <n.millard@me.com>\n"
13
+ "Language-Team: Venicura <info@venicura.dk>\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "Language: da_DK\n"
16
+ "X-Generator: Poedit 1.7.1\n"
17
+
18
+ #: includes/class-taxonomy.php:17 includes/class-template.php:30
19
+ msgid "Job Region"
20
+ msgstr "Job område"
21
+
22
+ #: includes/class-taxonomy.php:18
23
+ #: includes/widgets/class-widget-region-list.php:14
24
+ #: wp-job-manager-locations.php:90
25
+ msgid "Job Regions"
26
+ msgstr "Job områder"
27
+
28
+ #: includes/class-taxonomy.php:22
29
+ msgctxt "Job region slug - resave permalinks after changing this"
30
+ msgid "job-region"
31
+ msgstr "job-område"
32
+
33
+ #: includes/class-taxonomy.php:39
34
+ msgid "Search %s"
35
+ msgstr "Søg %s"
36
+
37
+ #: includes/class-taxonomy.php:40
38
+ msgid "All %s"
39
+ msgstr "Alle %s"
40
+
41
+ #: includes/class-taxonomy.php:41
42
+ msgid "Parent %s"
43
+ msgstr "Forældre %s"
44
+
45
+ #: includes/class-taxonomy.php:42
46
+ msgid "Parent %s:"
47
+ msgstr "Forældre %s:"
48
+
49
+ #: includes/class-taxonomy.php:43
50
+ msgid "Edit %s"
51
+ msgstr "Rediger %s"
52
+
53
+ #: includes/class-taxonomy.php:44
54
+ msgid "Update %s"
55
+ msgstr "Opdater %s"
56
+
57
+ #: includes/class-taxonomy.php:45
58
+ msgid "Add New %s"
59
+ msgstr "Tilføj ny %s"
60
+
61
+ #: includes/class-taxonomy.php:46
62
+ msgid "New %s Name"
63
+ msgstr "Ny %s navn"
64
+
65
+ #: includes/class-template.php:50
66
+ msgid "All Regions"
67
+ msgstr "Alle områder"
68
+
69
+ #: includes/widgets/class-widget-region-list.php:12
70
+ msgid "Display a list of job regions."
71
+ msgstr "Vis en liste af job områder."
72
+
73
+ #: includes/widgets/class-widget-region-list.php:19
74
+ msgid "Title:"
75
+ msgstr "Titel:"
76
+
77
+ #: wp-job-manager-locations.php:91
78
+ msgid "Filter by Region"
79
+ msgstr "Filrer efter område"
80
+
81
+ #: wp-job-manager-locations.php:92
82
+ msgid "Use a dropdown instead of a text input."
83
+ msgstr "Brug en dropdown i stedet for tekst input"
84
+
85
+ #: wp-job-manager-locations.php:197
86
+ msgid "in %s"
87
+ msgstr "i %s"
88
+
languages/wp-job-manager-locations-es_ES.mo ADDED
Binary file
languages/wp-job-manager-locations-es_ES.po ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2015
2
+ # This file is distributed under the same license as the package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: \n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-job-manager-regions\n"
7
+ "POT-Creation-Date: 2015-01-06 15:06:36+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-01-06 19:08+0100\n"
12
+ "Last-Translator: Franco <franco@associazionejoint.org>\n"
13
+ "Language-Team: \n"
14
+ "X-Generator: Poedit 1.7.1\n"
15
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
+ "Language: es_ES\n"
17
+
18
+ #: includes/class-taxonomy.php:17 includes/class-template.php:30
19
+ msgid "Job Region"
20
+ msgstr "Región del puesto"
21
+
22
+ #: includes/class-taxonomy.php:18
23
+ #: includes/widgets/class-widget-region-list.php:14
24
+ #: wp-job-manager-locations.php:90
25
+ msgid "Job Regions"
26
+ msgstr "Regiones disponibles"
27
+
28
+ #: includes/class-taxonomy.php:22
29
+ msgctxt "Job region slug - resave permalinks after changing this"
30
+ msgid "job-region"
31
+ msgstr "region-voluntariado"
32
+
33
+ #: includes/class-taxonomy.php:39
34
+ msgid "Search %s"
35
+ msgstr "Buscar %s"
36
+
37
+ #: includes/class-taxonomy.php:40
38
+ msgid "All %s"
39
+ msgstr "Todos %s"
40
+
41
+ #: includes/class-taxonomy.php:41
42
+ msgid "Parent %s"
43
+ msgstr "Padre %s"
44
+
45
+ #: includes/class-taxonomy.php:42
46
+ msgid "Parent %s:"
47
+ msgstr "Padres% s:"
48
+
49
+ #: includes/class-taxonomy.php:43
50
+ msgid "Edit %s"
51
+ msgstr "Editar %s"
52
+
53
+ #: includes/class-taxonomy.php:44
54
+ msgid "Update %s"
55
+ msgstr "Actualizar %s"
56
+
57
+ #: includes/class-taxonomy.php:45
58
+ msgid "Add New %s"
59
+ msgstr "Añadir nuevo/a %s"
60
+
61
+ #: includes/class-taxonomy.php:46
62
+ msgid "New %s Name"
63
+ msgstr "Nuevo nombre para %s"
64
+
65
+ #: includes/class-template.php:50
66
+ msgid "All Regions"
67
+ msgstr "Todas las regiones"
68
+
69
+ #: includes/widgets/class-widget-region-list.php:12
70
+ msgid "Display a list of job regions."
71
+ msgstr "Muestra una lista de regiones."
72
+
73
+ #: includes/widgets/class-widget-region-list.php:19
74
+ msgid "Title:"
75
+ msgstr "Título:"
76
+
77
+ #: wp-job-manager-locations.php:91
78
+ msgid "Filter by Region"
79
+ msgstr "Filtrar por región"
80
+
81
+ #: wp-job-manager-locations.php:92
82
+ msgid "Use a dropdown instead of a text input."
83
+ msgstr "Usa una lista desplegable en vez de un campo de texto."
84
+
85
+ #: wp-job-manager-locations.php:197
86
+ msgid "in %s"
87
+ msgstr "en %s"
88
+
languages/wp-job-manager-locations.pot CHANGED
@@ -1,24 +1,24 @@
1
- # Copyright (C) 2014 WP Job Manager - Predefined Regions
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"
11
- "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: includes/class-taxonomy.php:17 includes/class-template.php:41
16
  msgid "Job Region"
17
  msgstr ""
18
 
19
  #: includes/class-taxonomy.php:18
20
  #: includes/widgets/class-widget-region-list.php:14
21
- #: wp-job-manager-locations.php:92
22
  msgid "Job Regions"
23
  msgstr ""
24
 
@@ -59,7 +59,7 @@ msgstr ""
59
  msgid "New %s Name"
60
  msgstr ""
61
 
62
- #: includes/class-template.php:58
63
  msgid "All Regions"
64
  msgstr ""
65
 
@@ -71,38 +71,14 @@ msgstr ""
71
  msgid "Title:"
72
  msgstr ""
73
 
74
- #: templates/form-fields/job-region-field.php:8
75
- msgctxt "show option none"
76
- msgid "&mdash;"
77
- msgstr ""
78
-
79
- #: wp-job-manager-locations.php:93
80
  msgid "Filter by Region"
81
  msgstr ""
82
 
83
- #: wp-job-manager-locations.php:94
84
  msgid "Use a dropdown instead of a text input."
85
  msgstr ""
86
 
87
- #: wp-job-manager-locations.php:172
88
  msgid "in %s"
89
  msgstr ""
90
- #. Plugin Name of the plugin/theme
91
- msgid "WP Job Manager - Predefined Regions"
92
- msgstr ""
93
-
94
- #. Plugin URI of the plugin/theme
95
- msgid "https://github.com/astoundify/wp-job-manager-regions/"
96
- msgstr ""
97
-
98
- #. Description of the plugin/theme
99
- msgid "Create predefined regions/locations that job submissions can associate themselves with."
100
- msgstr ""
101
-
102
- #. Author of the plugin/theme
103
- msgid "Astoundify"
104
- msgstr ""
105
-
106
- #. Author URI of the plugin/theme
107
- msgid "http://astoundify.com"
108
- msgstr ""
1
+ # Copyright (C) 2015
2
+ # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: \n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-job-manager-regions\n"
7
+ "POT-Creation-Date: 2015-01-06 15:06:36+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: includes/class-taxonomy.php:17 includes/class-template.php:30
16
  msgid "Job Region"
17
  msgstr ""
18
 
19
  #: includes/class-taxonomy.php:18
20
  #: includes/widgets/class-widget-region-list.php:14
21
+ #: wp-job-manager-locations.php:90
22
  msgid "Job Regions"
23
  msgstr ""
24
 
59
  msgid "New %s Name"
60
  msgstr ""
61
 
62
+ #: includes/class-template.php:50
63
  msgid "All Regions"
64
  msgstr ""
65
 
71
  msgid "Title:"
72
  msgstr ""
73
 
74
+ #: wp-job-manager-locations.php:91
 
 
 
 
 
75
  msgid "Filter by Region"
76
  msgstr ""
77
 
78
+ #: wp-job-manager-locations.php:92
79
  msgid "Use a dropdown instead of a text input."
80
  msgstr ""
81
 
82
+ #: wp-job-manager-locations.php:197
83
  msgid "in %s"
84
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.1
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
 
@@ -32,6 +32,12 @@ Astoundify has released two themes that are fully integrated with the WP Job Man
32
 
33
  == Changelog ==
34
 
 
 
 
 
 
 
35
  = 1.6.1: December 19, 2014 =
36
 
37
  Fix: Outputting extra links in the job list.
7
  Tags: job, job listing, job region
8
  Requires at least: 3.6
9
  Tested up to: 4.1
10
+ Stable Tag: 1.7.0
11
  License: GPLv3
12
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
 
32
 
33
  == Changelog ==
34
 
35
+ = 1.7.0: January 8, 2015 =
36
+
37
+ * New: Add es_ES translation.
38
+ * Fix: Make sure translations can always properly be loaded.
39
+ * Fix: Always use the dropdown when on a region archive to help with sorting.
40
+
41
  = 1.6.1: December 19, 2014 =
42
 
43
  Fix: Outputting extra links in the job list.
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.1
9
  * Text Domain: wp-job-manager-locations
10
  */
11
 
@@ -67,13 +67,13 @@ class Astoundify_Job_Manager_Regions {
67
  * @return void
68
  */
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
- add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
77
  }
78
 
79
  /**
@@ -216,10 +216,11 @@ class Astoundify_Job_Manager_Regions {
216
  * Loads the plugin language files
217
  */
218
  public function load_textdomain() {
 
 
219
  load_plugin_textdomain( 'wp-job-manager-locations', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
220
  }
221
  }
222
- add_action( 'plugins_loaded', array( 'Astoundify_Job_Manager_Regions', 'instance' ) );
223
 
224
  /**
225
  * Start things up.
@@ -233,3 +234,5 @@ add_action( 'plugins_loaded', array( 'Astoundify_Job_Manager_Regions', 'instance
233
  function wp_job_manager_regions() {
234
  return Astoundify_Job_Manager_Regions::instance();
235
  }
 
 
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.7.0
9
  * Text Domain: wp-job-manager-locations
10
  */
11
 
67
  * @return void
68
  */
69
  private function setup_actions() {
70
+ add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
71
+
72
  add_filter( 'job_manager_settings', array( $this, 'job_manager_settings' ) );
73
 
74
  add_filter( 'job_manager_output_jobs_defaults', array( $this, 'job_manager_output_jobs_defaults' ) );
75
  add_filter( 'job_manager_get_listings', array( $this, 'job_manager_get_listings' ) );
76
  add_filter( 'job_manager_get_listings_args', array( $this, 'job_manager_get_listings_args' ) );
 
 
77
  }
78
 
79
  /**
216
  * Loads the plugin language files
217
  */
218
  public function load_textdomain() {
219
+ $locale = apply_filters( 'plugin_locale', get_locale(), 'wp-job-manager-locations' );
220
+ load_textdomain( 'wp-job-manager-locations', WP_LANG_DIR . "/wp-job-manager-locations/wp-job-manager-locations-$locale.mo" );
221
  load_plugin_textdomain( 'wp-job-manager-locations', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
222
  }
223
  }
 
224
 
225
  /**
226
  * Start things up.
234
  function wp_job_manager_regions() {
235
  return Astoundify_Job_Manager_Regions::instance();
236
  }
237
+
238
+ wp_job_manager_regions();