Version Description
- Fix: Revert Job Visibility Settings feature
Download this release
Release Info
Developer | alexsanford1 |
Plugin | WP Job Manager |
Version | 1.36.2 |
Comparing to | |
See all releases |
Code changes from version 1.36.1 to 1.36.2
- changelog.txt +3 -0
- includes/admin/class-wp-job-manager-settings.php +0 -150
- includes/admin/class-wp-job-manager-writepanels.php +1 -1
- includes/class-wp-job-manager-shortcodes.php +0 -5
- includes/forms/class-wp-job-manager-form-submit-job.php +1 -1
- languages/wp-job-manager.pot +756 -174
- lib/wpjm_rest/class-wp-job-manager-rest-bootstrap.php +196 -0
- lib/wpjm_rest/class-wp-job-manager-rest-classloader.php +145 -0
- lib/wpjm_rest/class-wp-job-manager-rest-controller.php +285 -0
- lib/wpjm_rest/class-wp-job-manager-rest-environment.php +426 -0
- lib/wpjm_rest/class-wp-job-manager-rest-events.php +144 -0
- lib/wpjm_rest/class-wp-job-manager-rest-exception.php +17 -0
- lib/wpjm_rest/class-wp-job-manager-rest-expect.php +77 -0
- lib/wpjm_rest/class-wp-job-manager-rest-model.php +686 -0
- lib/wpjm_rest/class-wp-job-manager-rest-type.php +90 -0
- lib/wpjm_rest/controller/bundle/class-wp-job-manager-rest-controller-bundle-builder.php +98 -0
- lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-action.php +166 -0
- lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-bundle.php +99 -0
- lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-crud.php +199 -0
- lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-extension.php +83 -0
- lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-model.php +165 -0
- lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-route.php +90 -0
- lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-settings.php +86 -0
- lib/wpjm_rest/data/store/class-wp-job-manager-rest-data-store-abstract.php +72 -0
- lib/wpjm_rest/data/store/class-wp-job-manager-rest-data-store-customposttype.php +202 -0
- lib/wpjm_rest/data/store/class-wp-job-manager-rest-data-store-nil.php +66 -0
- lib/wpjm_rest/data/store/class-wp-job-manager-rest-data-store-option.php +110 -0
- lib/wpjm_rest/field/class-wp-job-manager-rest-field-declaration.php +434 -0
- lib/wpjm_rest/field/declaration/class-wp-job-manager-rest-field-declaration-builder.php +290 -0
- lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-builder.php +22 -0
- lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-classloader.php +25 -0
- lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-controller.php +26 -0
- lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-model.php +151 -0
- lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-registrable.php +24 -0
- lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-type.php +50 -0
- lib/wpjm_rest/interfaces/controller/class-wp-job-manager-rest-interfaces-controller-bundle.php +25 -0
- lib/wpjm_rest/interfaces/data/class-wp-job-manager-rest-interfaces-data-store.php +52 -0
- lib/wpjm_rest/interfaces/model/class-wp-job-manager-rest-interfaces-model-collection.php +22 -0
- lib/wpjm_rest/interfaces/permissions/class-wp-job-manager-rest-interfaces-permissions-provider.php +20 -0
- lib/wpjm_rest/model/class-wp-job-manager-rest-model-collection.php +42 -0
- lib/wpjm_rest/model/class-wp-job-manager-rest-model-settings.php +163 -0
- lib/wpjm_rest/permissions/class-wp-job-manager-rest-permissions-any.php +27 -0
- lib/wpjm_rest/type/class-wp-job-manager-rest-type-array.php +42 -0
- lib/wpjm_rest/type/class-wp-job-manager-rest-type-boolean.php +45 -0
- lib/wpjm_rest/type/class-wp-job-manager-rest-type-integer.php +65 -0
- lib/wpjm_rest/type/class-wp-job-manager-rest-type-model.php +74 -0
- lib/wpjm_rest/type/class-wp-job-manager-rest-type-nullable.php +75 -0
- lib/wpjm_rest/type/class-wp-job-manager-rest-type-number.php +55 -0
- lib/wpjm_rest/type/class-wp-job-manager-rest-type-registry.php +154 -0
- lib/wpjm_rest/type/class-wp-job-manager-rest-type-string.php +58 -0
- lib/wpjm_rest/type/class-wp-job-manager-rest-type-typedarray.php +71 -0
- readme.txt +4 -1
- templates/access-denied-browse-job_listings.php +0 -18
- templates/access-denied-single-job_listing.php +0 -22
- templates/content-single-job_listing.php +30 -36
- wp-job-manager-functions.php +0 -69
- wp-job-manager.php +2 -2
changelog.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
= 1.36.1 =
|
2 |
* Enhancement: Add salary field to satisfy Google's job search schema
|
3 |
* Enhancement: Allow location to display as either City/St or Full Address
|
1 |
+
= 1.36.2 =
|
2 |
+
* Fix: Revert Job Visibility Settings feature
|
3 |
+
|
4 |
= 1.36.1 =
|
5 |
* Enhancement: Add salary field to satisfy Google's job search schema
|
6 |
* Enhancement: Allow location to display as either City/St or Full Address
|
includes/admin/class-wp-job-manager-settings.php
CHANGED
@@ -51,7 +51,6 @@ class WP_Job_Manager_Settings {
|
|
51 |
public function __construct() {
|
52 |
$this->settings_group = 'job_manager';
|
53 |
add_action( 'admin_init', [ $this, 'register_settings' ] );
|
54 |
-
add_action( 'admin_action_update', [ $this, 'pre_process_settings_save' ] );
|
55 |
}
|
56 |
|
57 |
/**
|
@@ -433,27 +432,6 @@ class WP_Job_Manager_Settings {
|
|
433 |
],
|
434 |
],
|
435 |
],
|
436 |
-
'job_visibility' => [
|
437 |
-
__( 'Job Visibility', 'wp-job-manager' ),
|
438 |
-
[
|
439 |
-
[
|
440 |
-
'name' => 'job_manager_browse_job_capability',
|
441 |
-
'std' => 'administrator,employer,candidate',
|
442 |
-
'label' => __( 'Browse Job Capability', 'wp-job-manager' ),
|
443 |
-
'type' => 'capabilities',
|
444 |
-
// translators: Placeholder %s is the url to the WordPress core documentation for capabilities and roles.
|
445 |
-
'desc' => sprintf( __( 'Enter which <a href="%s">roles or capabilities</a> allow visitors to browse job listings. If no value is selected, everyone (including logged out guests) will be able to browse job listings.', 'wp-job-manager' ), 'http://codex.wordpress.org/Roles_and_Capabilities' ),
|
446 |
-
],
|
447 |
-
[
|
448 |
-
'name' => 'job_manager_view_job_capability',
|
449 |
-
'std' => 'administrator,employer,candidate',
|
450 |
-
'label' => __( 'View Job Capability', 'wp-job-manager' ),
|
451 |
-
'type' => 'capabilities',
|
452 |
-
// translators: Placeholder %s is the url to the WordPress core documentation for capabilities and roles.
|
453 |
-
'desc' => sprintf( __( 'Enter which <a href="%s">roles or capabilities</a> allow visitors to view a single job listing. If no value is selected, everyone (including logged out guests) will be able to view job listings.', 'wp-job-manager' ), 'http://codex.wordpress.org/Roles_and_Capabilities' ),
|
454 |
-
],
|
455 |
-
],
|
456 |
-
],
|
457 |
]
|
458 |
);
|
459 |
}
|
@@ -956,132 +934,4 @@ class WP_Job_Manager_Settings {
|
|
956 |
protected function input_input( $option, $attributes, $value, $placeholder ) {
|
957 |
$this->input_text( $option, $attributes, $value, $placeholder );
|
958 |
}
|
959 |
-
|
960 |
-
/**
|
961 |
-
* Outputs the capabilities or roles input field.
|
962 |
-
*
|
963 |
-
* @param array $option Option arguments for settings input.
|
964 |
-
* @param string[] $attributes Attributes on the HTML element. Strings must already be escaped.
|
965 |
-
* @param mixed $value Current value.
|
966 |
-
* @param string $ignored_placeholder We set the placeholder in the method. This is ignored.
|
967 |
-
*/
|
968 |
-
protected function input_capabilities( $option, $attributes, $value, $ignored_placeholder ) {
|
969 |
-
$value = self::capabilities_string_to_array( $value );
|
970 |
-
$option['options'] = self::get_capabilities_and_roles( $value );
|
971 |
-
$option['placeholder'] = esc_html__( 'Everyone (Public)', 'wp-job-manager' );
|
972 |
-
|
973 |
-
?>
|
974 |
-
<select
|
975 |
-
id="setting-<?php echo esc_attr( $option['name'] ); ?>"
|
976 |
-
class="regular-text settings-role-select"
|
977 |
-
name="<?php echo esc_attr( $option['name'] ); ?>[]"
|
978 |
-
multiple="multiple"
|
979 |
-
data-placeholder="<?php echo esc_attr( $option['placeholder'] ); ?>"
|
980 |
-
<?php
|
981 |
-
echo implode( ' ', $attributes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
982 |
-
?>
|
983 |
-
>
|
984 |
-
<?php
|
985 |
-
foreach ( $option['options'] as $key => $name ) {
|
986 |
-
echo '<option value="' . esc_attr( $key ) . '" ' . selected( in_array( $key, $value, true ) ? $key : null, $key, false ) . '>' . esc_html( $name ) . '</option>';
|
987 |
-
}
|
988 |
-
?>
|
989 |
-
</select>
|
990 |
-
<?php
|
991 |
-
|
992 |
-
if ( ! empty( $option['desc'] ) ) {
|
993 |
-
echo ' <p class="description">' . wp_kses_post( $option['desc'] ) . '</p>';
|
994 |
-
}
|
995 |
-
}
|
996 |
-
|
997 |
-
/**
|
998 |
-
* Role settings should be saved as a comma-separated list.
|
999 |
-
*/
|
1000 |
-
public function pre_process_settings_save() {
|
1001 |
-
$screen = get_current_screen();
|
1002 |
-
|
1003 |
-
if ( ! $screen || 'options' !== $screen->id ) {
|
1004 |
-
return;
|
1005 |
-
}
|
1006 |
-
|
1007 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Missing -- Settings save will handle the nonce check.
|
1008 |
-
if ( ! isset( $_POST['option_page'] ) || 'job_manager' !== $_POST['option_page'] ) {
|
1009 |
-
return;
|
1010 |
-
}
|
1011 |
-
|
1012 |
-
$capabilities_fields = [
|
1013 |
-
'job_manager_browse_job_capability',
|
1014 |
-
'job_manager_view_job_capability',
|
1015 |
-
];
|
1016 |
-
foreach ( $capabilities_fields as $capabilities_field ) {
|
1017 |
-
// phpcs:disable WordPress.Security.NonceVerification.Missing -- Settings save will handle the nonce check.
|
1018 |
-
if ( isset( $_POST[ $capabilities_field ] ) ) {
|
1019 |
-
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized by `WP_Resume_Manager_Settings::capabilities_array_to_string()`
|
1020 |
-
$input_capabilities_field_value = wp_unslash( $_POST[ $capabilities_field ] );
|
1021 |
-
if ( is_array( $input_capabilities_field_value ) ) {
|
1022 |
-
$_POST[ $capabilities_field ] = self::capabilities_array_to_string( $input_capabilities_field_value );
|
1023 |
-
}
|
1024 |
-
}
|
1025 |
-
// phpcs:enable WordPress.Security.NonceVerification.Missing
|
1026 |
-
}
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
/**
|
1030 |
-
* Convert list of capabilities and roles into array of values.
|
1031 |
-
*
|
1032 |
-
* @param string $value Comma separated list of capabilities and roles.
|
1033 |
-
* @return array
|
1034 |
-
*/
|
1035 |
-
private static function capabilities_string_to_array( $value ) {
|
1036 |
-
return array_filter(
|
1037 |
-
array_map(
|
1038 |
-
function( $value ) {
|
1039 |
-
return trim( sanitize_text_field( $value ) );
|
1040 |
-
},
|
1041 |
-
explode( ',', $value )
|
1042 |
-
)
|
1043 |
-
);
|
1044 |
-
}
|
1045 |
-
|
1046 |
-
/**
|
1047 |
-
* Convert array of capabilities and roles into a comma separated list.
|
1048 |
-
*
|
1049 |
-
* @param array $value Array of capabilities and roles.
|
1050 |
-
* @return string
|
1051 |
-
*/
|
1052 |
-
private static function capabilities_array_to_string( $value ) {
|
1053 |
-
if ( ! is_array( $value ) ) {
|
1054 |
-
return '';
|
1055 |
-
}
|
1056 |
-
|
1057 |
-
$caps = array_filter( array_map( 'sanitize_text_field', $value ) );
|
1058 |
-
|
1059 |
-
return implode( ',', $caps );
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
/**
|
1063 |
-
* Get the list of roles and capabilities to use in select dropdown.
|
1064 |
-
*
|
1065 |
-
* @param array $caps Selected capabilities to ensure they show up in the list.
|
1066 |
-
* @return array
|
1067 |
-
*/
|
1068 |
-
private static function get_capabilities_and_roles( $caps = [] ) {
|
1069 |
-
$capabilities_and_roles = [];
|
1070 |
-
$roles = get_editable_roles();
|
1071 |
-
|
1072 |
-
foreach ( $roles as $key => $role ) {
|
1073 |
-
$capabilities_and_roles[ $key ] = $role['name'];
|
1074 |
-
}
|
1075 |
-
|
1076 |
-
// Go through custom user selected capabilities and add them to the list.
|
1077 |
-
foreach ( $caps as $value ) {
|
1078 |
-
if ( isset( $capabilities_and_roles[ $value ] ) ) {
|
1079 |
-
continue;
|
1080 |
-
}
|
1081 |
-
$capabilities_and_roles[ $value ] = $value;
|
1082 |
-
}
|
1083 |
-
|
1084 |
-
return $capabilities_and_roles;
|
1085 |
-
}
|
1086 |
-
|
1087 |
}
|
51 |
public function __construct() {
|
52 |
$this->settings_group = 'job_manager';
|
53 |
add_action( 'admin_init', [ $this, 'register_settings' ] );
|
|
|
54 |
}
|
55 |
|
56 |
/**
|
432 |
],
|
433 |
],
|
434 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
]
|
436 |
);
|
437 |
}
|
934 |
protected function input_input( $option, $attributes, $value, $placeholder ) {
|
935 |
$this->input_text( $option, $attributes, $value, $placeholder );
|
936 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
937 |
}
|
includes/admin/class-wp-job-manager-writepanels.php
CHANGED
@@ -67,7 +67,7 @@ class WP_Job_Manager_Writepanels {
|
|
67 |
],
|
68 |
'_remote_position' => [
|
69 |
'label' => __( 'Remote Position', 'wp-job-manager' ),
|
70 |
-
'description' => __( '
|
71 |
'type' => 'checkbox',
|
72 |
'priority' => 2,
|
73 |
],
|
67 |
],
|
68 |
'_remote_position' => [
|
69 |
'label' => __( 'Remote Position', 'wp-job-manager' ),
|
70 |
+
'description' => __( 'Select if this is a remote position.', 'wp-job-manager' ),
|
71 |
'type' => 'checkbox',
|
72 |
'priority' => 2,
|
73 |
],
|
includes/class-wp-job-manager-shortcodes.php
CHANGED
@@ -545,11 +545,6 @@ class WP_Job_Manager_Shortcodes {
|
|
545 |
public function output_jobs( $atts ) {
|
546 |
ob_start();
|
547 |
|
548 |
-
if ( ! job_manager_user_can_browse_job_listings() ) {
|
549 |
-
get_job_manager_template_part( 'access-denied', 'browse-job_listings' );
|
550 |
-
return ob_get_clean();
|
551 |
-
}
|
552 |
-
|
553 |
$atts = shortcode_atts(
|
554 |
apply_filters(
|
555 |
'job_manager_output_jobs_defaults',
|
545 |
public function output_jobs( $atts ) {
|
546 |
ob_start();
|
547 |
|
|
|
|
|
|
|
|
|
|
|
548 |
$atts = shortcode_atts(
|
549 |
apply_filters(
|
550 |
'job_manager_output_jobs_defaults',
|
includes/forms/class-wp-job-manager-form-submit-job.php
CHANGED
@@ -228,7 +228,7 @@ class WP_Job_Manager_Form_Submit_Job extends WP_Job_Manager_Form {
|
|
228 |
],
|
229 |
'remote_position' => [
|
230 |
'label' => __( 'Remote Position', 'wp-job-manager' ),
|
231 |
-
'description' => __( '
|
232 |
'type' => 'checkbox',
|
233 |
'required' => false,
|
234 |
'priority' => 3,
|
228 |
],
|
229 |
'remote_position' => [
|
230 |
'label' => __( 'Remote Position', 'wp-job-manager' ),
|
231 |
+
'description' => __( 'Select if this is a remote position.', 'wp-job-manager' ),
|
232 |
'type' => 'checkbox',
|
233 |
'required' => false,
|
234 |
'priority' => 3,
|
languages/wp-job-manager.pot
CHANGED
@@ -1,21 +1,22 @@
|
|
1 |
# Copyright (C) 2022 Automattic
|
2 |
-
# This file is distributed under the
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WP Job Manager 1.36.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-job-manager/\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2022-06-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
-
"X-Generator: WP-CLI 2.
|
15 |
"X-Domain: wp-job-manager\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
18 |
#: includes/class-wp-job-manager-data-exporter.php:27
|
|
|
19 |
msgid "WP Job Manager"
|
20 |
msgstr ""
|
21 |
|
@@ -33,11 +34,13 @@ msgid "Automattic"
|
|
33 |
msgstr ""
|
34 |
|
35 |
#: includes/3rd-party/wpml.php:94
|
|
|
36 |
msgid "Page Not Set"
|
37 |
msgstr ""
|
38 |
|
39 |
#. translators: Placeholder (%s) is the URL to edit the primary language in WPML.
|
40 |
#: includes/3rd-party/wpml.php:108
|
|
|
41 |
msgid "<a href=\"%s\">Switch to primary language</a> to edit this setting."
|
42 |
msgstr ""
|
43 |
|
@@ -45,6 +48,8 @@ msgstr ""
|
|
45 |
#. translators: %s is the name of the form validation that failed.
|
46 |
#: includes/abstracts/abstract-wp-job-manager-form.php:389
|
47 |
#: includes/abstracts/abstract-wp-job-manager-form.php:405
|
|
|
|
|
48 |
msgid "\"%s\" check failed. Please try again."
|
49 |
msgstr ""
|
50 |
|
@@ -64,183 +69,226 @@ msgstr ""
|
|
64 |
#: includes/admin/class-wp-job-manager-addons.php:125
|
65 |
#: includes/admin/class-wp-job-manager-admin.php:134
|
66 |
#: includes/admin/views/html-admin-page-addons.php:12
|
|
|
|
|
|
|
67 |
msgid "WP Job Manager Add-ons"
|
68 |
msgstr ""
|
69 |
|
70 |
#: includes/admin/class-wp-job-manager-addons.php:133
|
71 |
#: includes/helper/views/html-licences.php:12
|
|
|
|
|
72 |
msgid "Licenses"
|
73 |
msgstr ""
|
74 |
|
75 |
#: includes/admin/class-wp-job-manager-admin-notices.php:109
|
|
|
76 |
msgid "Action failed. Please refresh the page and retry."
|
77 |
msgstr ""
|
78 |
|
79 |
#: includes/admin/class-wp-job-manager-admin-notices.php:113
|
|
|
80 |
msgid "You don’t have permission to do this."
|
81 |
msgstr ""
|
82 |
|
83 |
#: includes/admin/class-wp-job-manager-admin.php:110
|
|
|
84 |
msgctxt "user selection"
|
85 |
msgid "No matches found"
|
86 |
msgstr ""
|
87 |
|
88 |
#: includes/admin/class-wp-job-manager-admin.php:111
|
|
|
89 |
msgctxt "user selection"
|
90 |
msgid "Loading failed"
|
91 |
msgstr ""
|
92 |
|
93 |
#: includes/admin/class-wp-job-manager-admin.php:112
|
|
|
94 |
msgctxt "user selection"
|
95 |
msgid "Please enter 1 or more characters"
|
96 |
msgstr ""
|
97 |
|
98 |
#: includes/admin/class-wp-job-manager-admin.php:113
|
|
|
99 |
msgctxt "user selection"
|
100 |
msgid "Please enter %qty% or more characters"
|
101 |
msgstr ""
|
102 |
|
103 |
#: includes/admin/class-wp-job-manager-admin.php:114
|
|
|
104 |
msgctxt "user selection"
|
105 |
msgid "Loading more results…"
|
106 |
msgstr ""
|
107 |
|
108 |
#: includes/admin/class-wp-job-manager-admin.php:115
|
|
|
109 |
msgctxt "user selection"
|
110 |
msgid "Searching…"
|
111 |
msgstr ""
|
112 |
|
113 |
#: includes/admin/class-wp-job-manager-admin.php:131
|
|
|
114 |
msgid "Settings"
|
115 |
msgstr ""
|
116 |
|
117 |
#: includes/admin/class-wp-job-manager-admin.php:134
|
|
|
118 |
msgid "Add-ons"
|
119 |
msgstr ""
|
120 |
|
121 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
122 |
#: includes/admin/class-wp-job-manager-cpt.php:81
|
|
|
123 |
msgid "Approve %s"
|
124 |
msgstr ""
|
125 |
|
126 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
127 |
#: includes/admin/class-wp-job-manager-cpt.php:83
|
|
|
128 |
msgid "%s approved"
|
129 |
msgstr ""
|
130 |
|
131 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
132 |
#: includes/admin/class-wp-job-manager-cpt.php:88
|
|
|
133 |
msgid "Expire %s"
|
134 |
msgstr ""
|
135 |
|
136 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
137 |
#: includes/admin/class-wp-job-manager-cpt.php:90
|
|
|
138 |
msgid "%s expired"
|
139 |
msgstr ""
|
140 |
|
141 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
142 |
#: includes/admin/class-wp-job-manager-cpt.php:95
|
|
|
143 |
msgid "Mark %s Filled"
|
144 |
msgstr ""
|
145 |
|
146 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
147 |
#: includes/admin/class-wp-job-manager-cpt.php:97
|
|
|
148 |
msgid "%s marked as filled"
|
149 |
msgstr ""
|
150 |
|
151 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
152 |
#: includes/admin/class-wp-job-manager-cpt.php:102
|
|
|
153 |
msgid "Mark %s Not Filled"
|
154 |
msgstr ""
|
155 |
|
156 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
157 |
#: includes/admin/class-wp-job-manager-cpt.php:104
|
|
|
158 |
msgid "%s marked as not filled"
|
159 |
msgstr ""
|
160 |
|
161 |
#: includes/admin/class-wp-job-manager-cpt.php:341
|
|
|
162 |
msgid "Select category"
|
163 |
msgstr ""
|
164 |
|
165 |
#: includes/admin/class-wp-job-manager-cpt.php:366
|
|
|
166 |
msgid "Select Filled"
|
167 |
msgstr ""
|
168 |
|
169 |
#: includes/admin/class-wp-job-manager-cpt.php:370
|
|
|
170 |
msgid "Filled"
|
171 |
msgstr ""
|
172 |
|
173 |
#: includes/admin/class-wp-job-manager-cpt.php:374
|
|
|
174 |
msgid "Not Filled"
|
175 |
msgstr ""
|
176 |
|
177 |
#: includes/admin/class-wp-job-manager-cpt.php:385
|
|
|
178 |
msgid "Select Featured"
|
179 |
msgstr ""
|
180 |
|
181 |
#: includes/admin/class-wp-job-manager-cpt.php:389
|
|
|
182 |
msgid "Featured"
|
183 |
msgstr ""
|
184 |
|
185 |
#: includes/admin/class-wp-job-manager-cpt.php:393
|
|
|
186 |
msgid "Not Featured"
|
187 |
msgstr ""
|
188 |
|
189 |
#: includes/admin/class-wp-job-manager-cpt.php:439
|
190 |
#: includes/admin/class-wp-job-manager-cpt.php:499
|
|
|
|
|
191 |
msgid "Position"
|
192 |
msgstr ""
|
193 |
|
194 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to view the listing.
|
195 |
#: includes/admin/class-wp-job-manager-cpt.php:459
|
|
|
196 |
msgid "%1$s updated. <a href=\"%2$s\">View</a>"
|
197 |
msgstr ""
|
198 |
|
199 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to view the listing.
|
200 |
#: includes/admin/class-wp-job-manager-cpt.php:460
|
|
|
201 |
msgid "Custom field updated."
|
202 |
msgstr ""
|
203 |
|
204 |
#: includes/admin/class-wp-job-manager-cpt.php:461
|
|
|
205 |
msgid "Custom field deleted."
|
206 |
msgstr ""
|
207 |
|
208 |
#. translators: %s is the singular name of the job listing post type.
|
209 |
#: includes/admin/class-wp-job-manager-cpt.php:463
|
|
|
210 |
msgid "%s updated."
|
211 |
msgstr ""
|
212 |
|
213 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the revision number.
|
214 |
#: includes/admin/class-wp-job-manager-cpt.php:465
|
|
|
215 |
msgid "%1$s restored to revision from %2$s"
|
216 |
msgstr ""
|
217 |
|
218 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to view the listing.
|
219 |
#: includes/admin/class-wp-job-manager-cpt.php:467
|
|
|
220 |
msgid "%1$s published. <a href=\"%2$s\">View</a>"
|
221 |
msgstr ""
|
222 |
|
223 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to view the listing.
|
224 |
#: includes/admin/class-wp-job-manager-cpt.php:469
|
|
|
225 |
msgid "%s saved."
|
226 |
msgstr ""
|
227 |
|
228 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to preview the listing.
|
229 |
#: includes/admin/class-wp-job-manager-cpt.php:471
|
|
|
230 |
msgid "%1$s submitted. <a target=\"_blank\" href=\"%2$s\">Preview</a>"
|
231 |
msgstr ""
|
232 |
|
233 |
#. translators: %1$s is the singular name of the post type; %2$s is the date the post will be published; %3$s is the URL to preview the listing.
|
234 |
#: includes/admin/class-wp-job-manager-cpt.php:474
|
|
|
235 |
msgid "%1$s scheduled for: <strong>%2$s</strong>. <a target=\"_blank\" href=\"%3$s\">Preview</a>"
|
236 |
msgstr ""
|
237 |
|
238 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to view the listing.
|
239 |
#: includes/admin/class-wp-job-manager-cpt.php:480
|
|
|
240 |
msgid "%1$s draft updated. <a target=\"_blank\" href=\"%2$s\">Preview</a>"
|
241 |
msgstr ""
|
242 |
|
243 |
#: includes/admin/class-wp-job-manager-cpt.php:500
|
|
|
244 |
msgid "Type"
|
245 |
msgstr ""
|
246 |
|
@@ -252,41 +300,58 @@ msgstr ""
|
|
252 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:46
|
253 |
#: templates/job-filters.php:35
|
254 |
#: templates/job-filters.php:36
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
msgid "Location"
|
256 |
msgstr ""
|
257 |
|
258 |
#: includes/admin/class-wp-job-manager-cpt.php:502
|
|
|
259 |
msgid "Status"
|
260 |
msgstr ""
|
261 |
|
262 |
#: includes/admin/class-wp-job-manager-cpt.php:503
|
|
|
263 |
msgid "Posted"
|
264 |
msgstr ""
|
265 |
|
266 |
#: includes/admin/class-wp-job-manager-cpt.php:504
|
|
|
267 |
msgid "Expires"
|
268 |
msgstr ""
|
269 |
|
270 |
#: includes/admin/class-wp-job-manager-cpt.php:505
|
271 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
|
|
272 |
msgid "Categories"
|
273 |
msgstr ""
|
274 |
|
275 |
#: includes/admin/class-wp-job-manager-cpt.php:506
|
|
|
276 |
msgid "Featured?"
|
277 |
msgstr ""
|
278 |
|
279 |
#: includes/admin/class-wp-job-manager-cpt.php:507
|
280 |
#: includes/class-wp-job-manager-shortcodes.php:393
|
|
|
|
|
281 |
msgid "Filled?"
|
282 |
msgstr ""
|
283 |
|
284 |
#: includes/admin/class-wp-job-manager-cpt.php:508
|
|
|
285 |
msgid "Actions"
|
286 |
msgstr ""
|
287 |
|
288 |
#. translators: %d is the post ID for the job listing.
|
289 |
#: includes/admin/class-wp-job-manager-cpt.php:573
|
|
|
290 |
msgid "ID: %d"
|
291 |
msgstr ""
|
292 |
|
@@ -296,21 +361,28 @@ msgstr ""
|
|
296 |
|
297 |
#. translators: %s placeholder is the username of the user.
|
298 |
#: includes/admin/class-wp-job-manager-cpt.php:617
|
|
|
299 |
msgid "by a guest"
|
300 |
msgstr ""
|
301 |
|
302 |
#. translators: %s placeholder is the username of the user.
|
303 |
#: includes/admin/class-wp-job-manager-cpt.php:617
|
|
|
304 |
msgid "by %s"
|
305 |
msgstr ""
|
306 |
|
307 |
#: includes/admin/class-wp-job-manager-cpt.php:637
|
|
|
308 |
msgid "Approve"
|
309 |
msgstr ""
|
310 |
|
311 |
#: includes/admin/class-wp-job-manager-cpt.php:645
|
312 |
#: includes/admin/class-wp-job-manager-writepanels.php:323
|
313 |
#: includes/admin/class-wp-job-manager-writepanels.php:373
|
|
|
|
|
|
|
|
|
314 |
msgid "View"
|
315 |
msgstr ""
|
316 |
|
@@ -319,530 +391,612 @@ msgstr ""
|
|
319 |
#: includes/class-wp-job-manager-post-types.php:340
|
320 |
#: includes/class-wp-job-manager-shortcodes.php:441
|
321 |
#: includes/class-wp-job-manager-shortcodes.php:474
|
|
|
|
|
|
|
|
|
322 |
msgid "Edit"
|
323 |
msgstr ""
|
324 |
|
325 |
#: includes/admin/class-wp-job-manager-cpt.php:659
|
326 |
#: includes/class-wp-job-manager-shortcodes.php:489
|
|
|
|
|
327 |
msgid "Delete"
|
328 |
msgstr ""
|
329 |
|
330 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:64
|
|
|
331 |
msgid "Job base"
|
332 |
msgstr ""
|
333 |
|
334 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:71
|
|
|
335 |
msgid "Job category base"
|
336 |
msgstr ""
|
337 |
|
338 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:78
|
|
|
339 |
msgid "Job type base"
|
340 |
msgstr ""
|
341 |
|
342 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:86
|
|
|
343 |
msgid "Job listing archive page"
|
344 |
msgstr ""
|
345 |
|
346 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:108
|
347 |
#: includes/class-wp-job-manager-post-types.php:1179
|
|
|
|
|
348 |
msgctxt "Job permalink - resave permalinks after changing this"
|
349 |
msgid "job"
|
350 |
msgstr ""
|
351 |
|
352 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:117
|
353 |
#: includes/class-wp-job-manager-post-types.php:1180
|
|
|
|
|
354 |
msgctxt "Job category slug - resave permalinks after changing this"
|
355 |
msgid "job-category"
|
356 |
msgstr ""
|
357 |
|
358 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:126
|
359 |
#: includes/class-wp-job-manager-post-types.php:1181
|
|
|
|
|
360 |
msgctxt "Job type slug - resave permalinks after changing this"
|
361 |
msgid "job-type"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
365 |
msgid "General"
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
369 |
msgid "Date Format"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
373 |
msgid "Choose how you want the published date for jobs to be displayed on the front-end."
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
377 |
msgid "Relative to the current date (e.g., 1 day, 1 week, 1 month ago)"
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
381 |
msgid "Default date format as defined in Settings"
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
385 |
msgid "Google Maps API Key"
|
386 |
msgstr ""
|
387 |
|
388 |
#. translators: Placeholder %s is URL to set up a Google Maps API key.
|
389 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
390 |
msgid "Google requires an API key to retrieve location information for job listings. Acquire an API key from the <a href=\"%s\">Google Maps API developer site</a>."
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
394 |
msgid "Delete Data On Uninstall"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
398 |
msgid "Delete WP Job Manager data when the plugin is deleted. Once the plugin is uninstalled, only job listings can be restored (30 days)."
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
402 |
msgid "Bypass Trash For Job Listings"
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
406 |
msgid "If checked, when the plugin is uninstalled, job listings will be permanently deleted immediately."
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
410 |
#: includes/class-wp-job-manager-post-types.php:334
|
411 |
#: includes/class-wp-job-manager-post-types.php:437
|
|
|
|
|
|
|
412 |
msgid "Job Listings"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
416 |
msgid "Listings Per Page"
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
420 |
msgid "Number of job listings to display per page."
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
424 |
msgid "Pagination Type"
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
428 |
msgid "Determines whether to show page numbered links or a Load More Listings button."
|
429 |
msgstr ""
|
430 |
|
431 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
432 |
msgid "Load More Listings button"
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
436 |
msgid "Page numbered links"
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
440 |
msgid "Filled Positions"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
444 |
msgid "Hide filled positions"
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
448 |
msgid "Filled positions will not display in your archives."
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
452 |
msgid "Hide Expired Listings"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
456 |
msgid "Hide expired listings in job archives/search"
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
460 |
msgid "Expired job listings will not be searchable."
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
464 |
msgid "Hide Expired Listings Content"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
468 |
msgid "Hide content in expired single job listings"
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
472 |
msgid "Your site will display the titles of expired listings, but not the content of the listings. Otherwise, expired listings display their full content minus the application area."
|
473 |
msgstr ""
|
474 |
|
475 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
476 |
msgid "Enable listing categories"
|
477 |
msgstr ""
|
478 |
|
479 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
480 |
msgid "This lets users select from a list of categories when submitting a job. Note: an admin has to create categories before site users can select them."
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
484 |
msgid "Multi-select Categories"
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
488 |
msgid "Default to category multiselect"
|
489 |
msgstr ""
|
490 |
|
491 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
492 |
msgid "The category selection box will default to allowing multiple selections on the [jobs] shortcode. Without this, visitors will only be able to select a single category when filtering jobs."
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
496 |
msgid "Category Filter Type"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
500 |
msgid "Determines the logic used to display jobs when selecting multiple categories."
|
501 |
msgstr ""
|
502 |
|
503 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
504 |
msgid "Jobs will be shown if within ANY selected category"
|
505 |
msgstr ""
|
506 |
|
507 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
508 |
msgid "Jobs will be shown if within ALL selected categories"
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
512 |
msgid "Types"
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
516 |
msgid "Enable listing types"
|
517 |
msgstr ""
|
518 |
|
519 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
520 |
msgid "This lets users select from a list of types when submitting a job. Note: an admin has to create types before site users can select them."
|
521 |
msgstr ""
|
522 |
|
523 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
524 |
msgid "Multi-select Listing Types"
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
528 |
msgid "Allow multiple types for listings"
|
529 |
msgstr ""
|
530 |
|
531 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
532 |
msgid "This allows users to select more than one type when submitting a job. The metabox on the post editor and the selection box on the front-end job submission form will both reflect this."
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
536 |
#: includes/admin/class-wp-job-manager-writepanels.php:114
|
537 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:269
|
538 |
msgid "Salary"
|
539 |
msgstr ""
|
540 |
|
541 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
542 |
msgid "Enable Job Salary"
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
546 |
msgid "This lets users add a salary when submitting a job."
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
550 |
msgid "Location Display"
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
554 |
msgid "Display Location Address"
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
558 |
msgid "Display the full address of the job listing location if it is detected by Google Maps Geocoding API. If full address is not available then it will display whatever text the user submitted for the location."
|
559 |
msgstr ""
|
560 |
|
561 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
562 |
msgid "Job Submission"
|
563 |
msgstr ""
|
564 |
|
565 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
566 |
msgid "Account Required"
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
570 |
msgid "Require an account to submit listings"
|
571 |
msgstr ""
|
572 |
|
573 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
574 |
msgid "Limits job listing submissions to registered, logged-in users."
|
575 |
msgstr ""
|
576 |
|
577 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
578 |
msgid "Account Creation"
|
579 |
msgstr ""
|
580 |
|
581 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
582 |
msgid "Enable account creation during submission"
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
586 |
msgid "Includes account creation on the listing submission form, to allow non-registered users to create an account and submit a job listing simultaneously."
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
590 |
msgid "Account Username"
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
594 |
msgid "Generate usernames from email addresses"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
598 |
msgid "Automatically generates usernames for new accounts from the registrant's email address. If this is not enabled, a \"username\" field will display instead."
|
599 |
msgstr ""
|
600 |
|
601 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
602 |
msgid "Account Password"
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
606 |
msgid "Email new users a link to set a password"
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
610 |
msgid "Sends an email to the user with their username and a link to set their password. If this is not enabled, a \"password\" field will display instead, and their email address won't be verified."
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
614 |
msgid "Account Role"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
618 |
msgid "Any new accounts created during submission will have this role. If you haven't enabled account creation during submission in the options above, your own method of assigning roles will apply."
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
622 |
msgid "Moderate New Listings"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
626 |
msgid "Require admin approval of all new listing submissions"
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
630 |
msgid "Sets all new submissions to \"pending.\" They will not appear on your site until an admin approves them."
|
631 |
msgstr ""
|
632 |
|
633 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
634 |
msgid "Allow Pending Edits"
|
635 |
msgstr ""
|
636 |
|
637 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
638 |
msgid "Allow editing of pending listings"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
642 |
msgid "Users can continue to edit pending listings until they are approved by an admin."
|
643 |
msgstr ""
|
644 |
|
645 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
646 |
msgid "Allow Published Edits"
|
647 |
msgstr ""
|
648 |
|
649 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
650 |
msgid "Allow editing of published listings"
|
651 |
msgstr ""
|
652 |
|
653 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
654 |
msgid "Choose whether published job listings can be edited and if edits require admin approval. When moderation is required, the original job listings will be unpublished while edits await admin approval."
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
658 |
msgid "Users cannot edit"
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
662 |
msgid "Users can edit without admin approval"
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
666 |
msgid "Users can edit, but edits require admin approval"
|
667 |
msgstr ""
|
668 |
|
669 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
670 |
msgid "Listing Duration"
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
674 |
msgid "Listings will display for the set number of days, then expire. Leave this field blank if you don't want listings to have an expiration date."
|
675 |
msgstr ""
|
676 |
|
677 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
678 |
msgid "Listing Limit"
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
682 |
msgid "How many listings are users allowed to post. Can be left blank to allow unlimited listings per account."
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
686 |
msgid "No limit"
|
687 |
msgstr ""
|
688 |
|
689 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
690 |
msgid "Application Method"
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
694 |
msgid "Choose the application method job listers will need to provide. Specify URL or email address only, or allow listers to choose which they prefer."
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
698 |
msgid "Email address or website URL"
|
699 |
msgstr ""
|
700 |
|
701 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
702 |
msgid "Email addresses only"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
706 |
msgid "Website URLs only"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
710 |
msgid "Terms and Conditions Checkbox"
|
711 |
msgstr ""
|
712 |
|
713 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
714 |
msgid "Enable required Terms and Conditions checkbox on the form"
|
715 |
msgstr ""
|
716 |
|
717 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
718 |
msgid "Require a Terms and Conditions checkbox to be marked before a job can be submitted. The linked page can be set from the <a href=\"#settings-job_pages\" class=\"nav-internal\">Pages</a> settings tab."
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
722 |
msgid "reCAPTCHA"
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
726 |
msgid "Are you human?"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
730 |
msgid "Field Label"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
734 |
msgid "The label used for the reCAPTCHA field on forms."
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
738 |
msgid "Site Key"
|
739 |
msgstr ""
|
740 |
|
741 |
#. translators: Placeholder %s is URL to set up Google reCAPTCHA API key.
|
742 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
743 |
msgid "You can retrieve your reCAPTCHA v2 \"I'm not a robot\" Checkbox site key from <a href=\"%s\">Google's reCAPTCHA admin dashboard</a>."
|
744 |
msgstr ""
|
745 |
|
746 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
747 |
msgid "Secret Key"
|
748 |
msgstr ""
|
749 |
|
750 |
#. translators: Placeholder %s is URL to set up Google reCAPTCHA API key.
|
751 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
752 |
msgid "You can retrieve your reCAPTCHA v2 \"I'm not a robot\" Checkbox secret key from <a href=\"%s\">Google's reCAPTCHA admin dashboard</a>."
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
756 |
msgid "Job Submission Form"
|
757 |
msgstr ""
|
758 |
|
759 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
760 |
msgid "Display a reCAPTCHA field on job submission form."
|
761 |
msgstr ""
|
762 |
|
763 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
764 |
msgid "This will help prevent bots from submitting job listings. You must have entered a valid site key and secret key above."
|
765 |
msgstr ""
|
766 |
|
767 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
768 |
msgid "Pages"
|
769 |
msgstr ""
|
770 |
|
771 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
772 |
msgid "Submit Job Form Page"
|
773 |
msgstr ""
|
774 |
|
775 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
776 |
msgid "Select the page where you've used the [submit_job_form] shortcode. This lets the plugin know the location of the form."
|
777 |
msgstr ""
|
778 |
|
779 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
780 |
msgid "Job Dashboard Page"
|
781 |
msgstr ""
|
782 |
|
783 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
784 |
msgid "Select the page where you've used the [job_dashboard] shortcode. This lets the plugin know the location of the dashboard."
|
785 |
msgstr ""
|
786 |
|
787 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
788 |
msgid "Job Listings Page"
|
789 |
msgstr ""
|
790 |
|
791 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
792 |
msgid "Select the page where you've used the [jobs] shortcode. This lets the plugin know the location of the job listings page."
|
793 |
msgstr ""
|
794 |
|
795 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
796 |
msgid "Terms and Conditions Page"
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
800 |
msgid "Select the page to link when \"Terms and Conditions Checkbox\" is enabled. See setting in \"Job Submission\" tab."
|
801 |
msgstr ""
|
802 |
|
803 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
804 |
-
|
805 |
-
msgstr ""
|
806 |
-
|
807 |
-
#: includes/admin/class-wp-job-manager-settings.php:442
|
808 |
-
msgid "Browse Job Capability"
|
809 |
-
msgstr ""
|
810 |
-
|
811 |
-
#. translators: Placeholder %s is the url to the WordPress core documentation for capabilities and roles.
|
812 |
-
#: includes/admin/class-wp-job-manager-settings.php:445
|
813 |
-
msgid "Enter which <a href=\"%s\">roles or capabilities</a> allow visitors to browse job listings. If no value is selected, everyone (including logged out guests) will be able to browse job listings."
|
814 |
-
msgstr ""
|
815 |
-
|
816 |
-
#: includes/admin/class-wp-job-manager-settings.php:450
|
817 |
-
msgid "View Job Capability"
|
818 |
-
msgstr ""
|
819 |
-
|
820 |
-
#. translators: Placeholder %s is the url to the WordPress core documentation for capabilities and roles.
|
821 |
-
#: includes/admin/class-wp-job-manager-settings.php:453
|
822 |
-
msgid "Enter which <a href=\"%s\">roles or capabilities</a> allow visitors to view a single job listing. If no value is selected, everyone (including logged out guests) will be able to view job listings."
|
823 |
-
msgstr ""
|
824 |
-
|
825 |
-
#: includes/admin/class-wp-job-manager-settings.php:500
|
826 |
msgid "Settings successfully saved"
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
830 |
msgid "Save Changes"
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
834 |
msgid "--no page--"
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: includes/admin/class-wp-job-manager-settings.php:
|
|
|
838 |
msgid "Select a page…"
|
839 |
msgstr ""
|
840 |
|
841 |
-
#: includes/admin/class-wp-job-manager-settings.php:971
|
842 |
-
msgid "Everyone (Public)"
|
843 |
-
msgstr ""
|
844 |
-
|
845 |
#: includes/admin/class-wp-job-manager-setup.php:58
|
|
|
846 |
msgid "Setup"
|
847 |
msgstr ""
|
848 |
|
@@ -854,17 +1008,24 @@ msgstr ""
|
|
854 |
#: includes/admin/class-wp-job-manager-taxonomy-meta.php:110
|
855 |
#: includes/admin/class-wp-job-manager-taxonomy-meta.php:129
|
856 |
#: includes/class-wp-job-manager-post-types.php:293
|
|
|
|
|
|
|
|
|
857 |
msgid "Employment Type"
|
858 |
msgstr ""
|
859 |
|
860 |
#: includes/admin/class-wp-job-manager-writepanels.php:64
|
861 |
#: includes/class-wp-job-manager-post-types.php:1499
|
862 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:226
|
|
|
|
|
863 |
msgid "e.g. \"London\""
|
864 |
msgstr ""
|
865 |
|
866 |
#: includes/admin/class-wp-job-manager-writepanels.php:65
|
867 |
#: includes/class-wp-job-manager-post-types.php:1500
|
|
|
868 |
msgid "Leave this blank if the location is not important."
|
869 |
msgstr ""
|
870 |
|
@@ -875,7 +1036,7 @@ msgstr ""
|
|
875 |
|
876 |
#: includes/admin/class-wp-job-manager-writepanels.php:70
|
877 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:231
|
878 |
-
msgid "
|
879 |
msgstr ""
|
880 |
|
881 |
#: includes/admin/class-wp-job-manager-writepanels.php:75
|
@@ -888,56 +1049,71 @@ msgstr ""
|
|
888 |
|
889 |
#: includes/admin/class-wp-job-manager-writepanels.php:77
|
890 |
#: includes/class-wp-job-manager-post-types.php:1509
|
|
|
891 |
msgid "This field is required for the \"application\" area to appear beneath the listing."
|
892 |
msgstr ""
|
893 |
|
894 |
#: includes/admin/class-wp-job-manager-writepanels.php:82
|
895 |
#: includes/class-wp-job-manager-data-exporter.php:52
|
896 |
#: includes/class-wp-job-manager-post-types.php:1517
|
|
|
|
|
897 |
msgid "Company Name"
|
898 |
msgstr ""
|
899 |
|
900 |
#: includes/admin/class-wp-job-manager-writepanels.php:87
|
901 |
#: includes/class-wp-job-manager-data-exporter.php:53
|
902 |
#: includes/class-wp-job-manager-post-types.php:1525
|
|
|
|
|
903 |
msgid "Company Website"
|
904 |
msgstr ""
|
905 |
|
906 |
#: includes/admin/class-wp-job-manager-writepanels.php:92
|
907 |
#: includes/class-wp-job-manager-data-exporter.php:54
|
908 |
#: includes/class-wp-job-manager-post-types.php:1534
|
|
|
|
|
909 |
msgid "Company Tagline"
|
910 |
msgstr ""
|
911 |
|
912 |
#: includes/admin/class-wp-job-manager-writepanels.php:93
|
913 |
#: includes/class-wp-job-manager-post-types.php:1535
|
|
|
914 |
msgid "Brief description about the company"
|
915 |
msgstr ""
|
916 |
|
917 |
#: includes/admin/class-wp-job-manager-writepanels.php:97
|
918 |
#: includes/class-wp-job-manager-data-exporter.php:55
|
919 |
#: includes/class-wp-job-manager-post-types.php:1542
|
|
|
|
|
920 |
msgid "Company Twitter"
|
921 |
msgstr ""
|
922 |
|
923 |
#: includes/admin/class-wp-job-manager-writepanels.php:102
|
924 |
#: includes/class-wp-job-manager-data-exporter.php:56
|
925 |
#: includes/class-wp-job-manager-post-types.php:1550
|
|
|
|
|
926 |
msgid "Company Video"
|
927 |
msgstr ""
|
928 |
|
929 |
#: includes/admin/class-wp-job-manager-writepanels.php:103
|
930 |
#: includes/class-wp-job-manager-post-types.php:1551
|
|
|
931 |
msgid "URL to the company video"
|
932 |
msgstr ""
|
933 |
|
934 |
#: includes/admin/class-wp-job-manager-writepanels.php:108
|
935 |
#: includes/class-wp-job-manager-post-types.php:1560
|
|
|
936 |
msgid "Position Filled"
|
937 |
msgstr ""
|
938 |
|
939 |
#: includes/admin/class-wp-job-manager-writepanels.php:111
|
940 |
#: includes/class-wp-job-manager-post-types.php:1566
|
|
|
941 |
msgid "Filled listings will no longer accept applications."
|
942 |
msgstr ""
|
943 |
|
@@ -947,137 +1123,174 @@ msgstr ""
|
|
947 |
|
948 |
#: includes/admin/class-wp-job-manager-writepanels.php:127
|
949 |
#: includes/class-wp-job-manager-post-types.php:1569
|
|
|
950 |
msgid "Featured Listing"
|
951 |
msgstr ""
|
952 |
|
953 |
#: includes/admin/class-wp-job-manager-writepanels.php:129
|
954 |
#: includes/class-wp-job-manager-post-types.php:1571
|
|
|
955 |
msgid "Featured listings will be sticky during searches, and can be styled differently."
|
956 |
msgstr ""
|
957 |
|
958 |
#: includes/admin/class-wp-job-manager-writepanels.php:134
|
959 |
#: includes/class-wp-job-manager-post-types.php:1579
|
|
|
960 |
msgid "Listing Expiry Date"
|
961 |
msgstr ""
|
962 |
|
963 |
#: includes/admin/class-wp-job-manager-writepanels.php:144
|
964 |
#: includes/class-wp-job-manager-email-notifications.php:324
|
|
|
|
|
965 |
msgid "Posted by"
|
966 |
msgstr ""
|
967 |
|
968 |
#. translators: Placeholder %s is the singular name for a job listing post type.
|
969 |
#: includes/admin/class-wp-job-manager-writepanels.php:233
|
|
|
970 |
msgid "%s Data"
|
971 |
msgstr ""
|
972 |
|
973 |
#: includes/admin/class-wp-job-manager-writepanels.php:312
|
974 |
#: includes/admin/class-wp-job-manager-writepanels.php:373
|
|
|
|
|
|
|
975 |
msgid "Use file"
|
976 |
msgstr ""
|
977 |
|
978 |
#: includes/admin/class-wp-job-manager-writepanels.php:313
|
979 |
#: includes/admin/class-wp-job-manager-writepanels.php:373
|
|
|
|
|
|
|
980 |
msgid "Upload"
|
981 |
msgstr ""
|
982 |
|
983 |
#: includes/admin/class-wp-job-manager-writepanels.php:373
|
|
|
984 |
msgid "Add file"
|
985 |
msgstr ""
|
986 |
|
987 |
#. translators: Used in user select. %1$s is the user's display name; #%2$s is the user ID; %3$s is the user email.
|
988 |
#: includes/admin/class-wp-job-manager-writepanels.php:611
|
989 |
#: includes/class-wp-job-manager-ajax.php:419
|
|
|
|
|
990 |
msgid "%1$s (#%2$s – %3$s)"
|
991 |
msgstr ""
|
992 |
|
993 |
#: includes/admin/class-wp-job-manager-writepanels.php:618
|
|
|
994 |
msgid "Guest User"
|
995 |
msgstr ""
|
996 |
|
997 |
#: includes/admin/class-wp-job-manager-writepanels.php:622
|
|
|
998 |
msgid "Change"
|
999 |
msgstr ""
|
1000 |
|
1001 |
#: includes/admin/class-wp-job-manager-writepanels.php:625
|
|
|
1002 |
msgid "Guest"
|
1003 |
msgstr ""
|
1004 |
|
1005 |
#. translators: %1$s is placeholder for singular name of the job listing post type; %2$s is the intl formatted date the listing was last modified.
|
1006 |
#: includes/admin/class-wp-job-manager-writepanels.php:698
|
|
|
1007 |
msgid "%1$s was last modified by the user on %2$s."
|
1008 |
msgstr ""
|
1009 |
|
1010 |
#: includes/admin/views/html-admin-notice-core-setup.php:15
|
|
|
1011 |
msgid "You are nearly ready to start listing jobs with <strong>WP Job Manager</strong>."
|
1012 |
msgstr ""
|
1013 |
|
1014 |
#: includes/admin/views/html-admin-notice-core-setup.php:19
|
|
|
1015 |
msgid "Run Setup Wizard"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
#: includes/admin/views/html-admin-notice-core-setup.php:20
|
|
|
1019 |
msgid "Skip Setup"
|
1020 |
msgstr ""
|
1021 |
|
1022 |
#: includes/admin/views/html-admin-page-addons.php:23
|
|
|
1023 |
msgid "More Information →"
|
1024 |
msgstr ""
|
1025 |
|
1026 |
#: includes/admin/views/html-admin-page-addons.php:54
|
|
|
1027 |
msgid "No add-ons were found."
|
1028 |
msgstr ""
|
1029 |
|
1030 |
#: includes/admin/views/html-admin-setup-header.php:13
|
|
|
1031 |
msgid "WP Job Manager Setup"
|
1032 |
msgstr ""
|
1033 |
|
1034 |
#: includes/admin/views/html-admin-setup-header.php:20
|
|
|
1035 |
msgid "1. Introduction"
|
1036 |
msgstr ""
|
1037 |
|
1038 |
#: includes/admin/views/html-admin-setup-header.php:21
|
|
|
1039 |
msgid "2. Page Setup"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
#: includes/admin/views/html-admin-setup-header.php:22
|
|
|
1043 |
msgid "3. Done"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
#: includes/admin/views/html-admin-setup-step-1.php:12
|
|
|
1047 |
msgid "Welcome to the Setup Wizard!"
|
1048 |
msgstr ""
|
1049 |
|
1050 |
#: includes/admin/views/html-admin-setup-step-1.php:14
|
|
|
1051 |
msgid "Thanks for installing <em>WP Job Manager</em>! Let's get your site ready to accept job listings."
|
1052 |
msgstr ""
|
1053 |
|
1054 |
#: includes/admin/views/html-admin-setup-step-1.php:15
|
|
|
1055 |
msgid "This setup wizard will walk you through the process of creating pages for job submissions, management, and listings."
|
1056 |
msgstr ""
|
1057 |
|
1058 |
#. translators: Placeholder %s is the path to WPJM documentation site.
|
1059 |
#: includes/admin/views/html-admin-setup-step-1.php:19
|
|
|
1060 |
msgid "If you'd prefer to skip this and set up your pages manually, our <a href=\"%s\">documentation</a> will walk you through each step."
|
1061 |
msgstr ""
|
1062 |
|
1063 |
#: includes/admin/views/html-admin-setup-step-1.php:29
|
|
|
1064 |
msgid "Start setup"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
#: includes/admin/views/html-admin-setup-step-1.php:30
|
|
|
1068 |
msgid "Skip setup. I will set up the plugin manually."
|
1069 |
msgstr ""
|
1070 |
|
1071 |
#: includes/admin/views/html-admin-setup-step-2.php:12
|
|
|
1072 |
msgid "Page Setup"
|
1073 |
msgstr ""
|
1074 |
|
1075 |
#: includes/admin/views/html-admin-setup-step-2.php:14
|
|
|
1076 |
msgid "With WP Job Manager, employers and applicants can post, manage, and browse job listings right on your website. Tell us which of these common pages you'd like your site to have and we'll create and configure them for you."
|
1077 |
msgstr ""
|
1078 |
|
1079 |
#. translators: %1$s is URL to WordPress core shortcode documentation. %2$s is URL to WPJM specific shortcode reference.
|
1080 |
#: includes/admin/views/html-admin-setup-step-2.php:20
|
|
|
1081 |
msgid ""
|
1082 |
"(These pages are created using <a href=\"%1$s\" title=\"What is a shortcode?\" class=\"help-page-link\">shortcodes</a>,\n"
|
1083 |
"\t\t\t\t\t\t\t\twhich we take care of in this step. If you'd like to build these pages yourself or want to add one of these options to an existing\n"
|
@@ -1085,90 +1298,111 @@ msgid ""
|
|
1085 |
msgstr ""
|
1086 |
|
1087 |
#: includes/admin/views/html-admin-setup-step-2.php:39
|
|
|
1088 |
msgid "Page Title"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
#: includes/admin/views/html-admin-setup-step-2.php:40
|
|
|
1092 |
msgid "Page Description"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
#: includes/admin/views/html-admin-setup-step-2.php:41
|
|
|
1096 |
msgid "Content Shortcode"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
#: includes/admin/views/html-admin-setup-step-2.php:47
|
|
|
1100 |
msgctxt "Default page title (wizard)"
|
1101 |
msgid "Post a Job"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
#: includes/admin/views/html-admin-setup-step-2.php:49
|
|
|
1105 |
msgid "Creates a page that allows employers to post new jobs directly from a page on your website, instead of requiring them to log in to an admin area. If you'd rather not allow this -- for example, if you want employers to use the admin dashboard only -- you can uncheck this setting."
|
1106 |
msgstr ""
|
1107 |
|
1108 |
#: includes/admin/views/html-admin-setup-step-2.php:55
|
|
|
1109 |
msgctxt "Default page title (wizard)"
|
1110 |
msgid "Job Dashboard"
|
1111 |
msgstr ""
|
1112 |
|
1113 |
#: includes/admin/views/html-admin-setup-step-2.php:57
|
|
|
1114 |
msgid "Creates a page that allows employers to manage their job listings directly from a page on your website, instead of requiring them to log in to an admin area. If you want to manage all job listings from the admin dashboard only, you can uncheck this setting."
|
1115 |
msgstr ""
|
1116 |
|
1117 |
#: includes/admin/views/html-admin-setup-step-2.php:63
|
|
|
1118 |
msgctxt "Default page title (wizard)"
|
1119 |
msgid "Jobs"
|
1120 |
msgstr ""
|
1121 |
|
1122 |
#: includes/admin/views/html-admin-setup-step-2.php:64
|
|
|
1123 |
msgid "Creates a page where visitors can browse, search, and filter job listings."
|
1124 |
msgstr ""
|
1125 |
|
1126 |
#: includes/admin/views/html-admin-setup-step-2.php:72
|
|
|
1127 |
msgid "Skip this step"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
#: includes/admin/views/html-admin-setup-step-3.php:12
|
|
|
1131 |
msgid "You're ready to start using WP Job Manager!"
|
1132 |
msgstr ""
|
1133 |
|
1134 |
#: includes/admin/views/html-admin-setup-step-3.php:14
|
|
|
1135 |
msgid "Wondering what to do now? Here are some of the most common next steps:"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
#: includes/admin/views/html-admin-setup-step-3.php:17
|
|
|
1139 |
msgid "Tweak your settings"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
#: includes/admin/views/html-admin-setup-step-3.php:18
|
|
|
1143 |
msgid "Add a job using the admin dashboard"
|
1144 |
msgstr ""
|
1145 |
|
1146 |
#: includes/admin/views/html-admin-setup-step-3.php:23
|
|
|
1147 |
msgid "View submitted job listings"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
#: includes/admin/views/html-admin-setup-step-3.php:25
|
|
|
1151 |
msgid "Add job listings to a page using the [jobs] shortcode"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
#: includes/admin/views/html-admin-setup-step-3.php:32
|
|
|
1155 |
msgid "Add a job via the front-end"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
#: includes/admin/views/html-admin-setup-step-3.php:34
|
|
|
1159 |
msgid "Learn to use the front-end job submission board"
|
1160 |
msgstr ""
|
1161 |
|
1162 |
#: includes/admin/views/html-admin-setup-step-3.php:41
|
|
|
1163 |
msgid "View the job dashboard"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
#: includes/admin/views/html-admin-setup-step-3.php:43
|
|
|
1167 |
msgid "Learn to use the front-end job dashboard"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
#. translators: %1$s is the URL to WPJM support documentation; %2$s is the URL to WPJM support forums.
|
1171 |
#: includes/admin/views/html-admin-setup-step-3.php:52
|
|
|
1172 |
msgid ""
|
1173 |
"If you need help, you can find more detail in our\n"
|
1174 |
"\t\t\t\t\t\t\t<a href=\"%1$s\">support documentation</a> or post your question on the\n"
|
@@ -1176,61 +1410,75 @@ msgid ""
|
|
1176 |
msgstr ""
|
1177 |
|
1178 |
#: includes/admin/views/html-admin-setup-step-3.php:66
|
|
|
1179 |
msgid "Support WP Job Manager's Ongoing Development"
|
1180 |
msgstr ""
|
1181 |
|
1182 |
#: includes/admin/views/html-admin-setup-step-3.php:67
|
|
|
1183 |
msgid "There are lots of ways you can support open source software projects like this one: contributing code, fixing a bug, assisting with non-English translation, or just telling your friends about WP Job Manager to help spread the word. We appreciate your support!"
|
1184 |
msgstr ""
|
1185 |
|
1186 |
#: includes/admin/views/html-admin-setup-step-3.php:69
|
|
|
1187 |
msgid "Leave a positive review"
|
1188 |
msgstr ""
|
1189 |
|
1190 |
#: includes/admin/views/html-admin-setup-step-3.php:70
|
|
|
1191 |
msgid "Contribute a localization"
|
1192 |
msgstr ""
|
1193 |
|
1194 |
#: includes/admin/views/html-admin-setup-step-3.php:71
|
|
|
1195 |
msgid "Contribute code or report a bug"
|
1196 |
msgstr ""
|
1197 |
|
1198 |
#: includes/admin/views/html-admin-setup-step-3.php:72
|
|
|
1199 |
msgid "Help other users on the forums"
|
1200 |
msgstr ""
|
1201 |
|
1202 |
#. translators: Placeholder %d is the number of found search results.
|
1203 |
#: includes/class-wp-job-manager-ajax.php:186
|
|
|
1204 |
msgid "Search completed. Found %d matching record."
|
1205 |
msgid_plural "Search completed. Found %d matching records."
|
1206 |
msgstr[0] ""
|
1207 |
msgstr[1] ""
|
1208 |
|
1209 |
#: includes/class-wp-job-manager-ajax.php:284
|
|
|
1210 |
msgid "You must be logged in to upload files using this method."
|
1211 |
msgstr ""
|
1212 |
|
1213 |
#. translators: Placeholder %s is the singular label of the job listing post type.
|
1214 |
#: includes/class-wp-job-manager-data-exporter.php:51
|
1215 |
#: includes/class-wp-job-manager-post-types.php:357
|
|
|
|
|
1216 |
msgid "Company Logo"
|
1217 |
msgstr ""
|
1218 |
|
1219 |
#: includes/class-wp-job-manager-data-exporter.php:81
|
|
|
1220 |
msgid "WP Job Manager User Data"
|
1221 |
msgstr ""
|
1222 |
|
1223 |
#. translators: %1$s is version of PHP that WP Job Manager requires; %2$s is the version of PHP WordPress is running on.
|
1224 |
#: includes/class-wp-job-manager-dependency-checker.php:66
|
|
|
1225 |
msgid "<strong>WP Job Manager</strong> requires a minimum PHP version of %1$s, but you are running %2$s."
|
1226 |
msgstr ""
|
1227 |
|
1228 |
#: includes/class-wp-job-manager-dependency-checker.php:77
|
|
|
1229 |
msgid "Learn more about updating PHP"
|
1230 |
msgstr ""
|
1231 |
|
1232 |
#. translators: accessibility text
|
1233 |
#: includes/class-wp-job-manager-dependency-checker.php:79
|
|
|
1234 |
msgid "(opens in a new tab)"
|
1235 |
msgstr ""
|
1236 |
|
@@ -1240,81 +1488,106 @@ msgid "Please <a href=\"%s\">update WordPress</a> to avoid issues."
|
|
1240 |
msgstr ""
|
1241 |
|
1242 |
#: includes/class-wp-job-manager-dependency-checker.php:122
|
|
|
1243 |
msgid "<strong>WP Job Manager</strong> requires a more recent version of WordPress."
|
1244 |
msgstr ""
|
1245 |
|
1246 |
#: includes/class-wp-job-manager-dependency-checker.php:136
|
1247 |
#: includes/class-wp-job-manager-dependency-checker.php:138
|
|
|
|
|
1248 |
msgid "WordPress Update Required"
|
1249 |
msgstr ""
|
1250 |
|
1251 |
#: includes/class-wp-job-manager-email-notifications.php:259
|
|
|
1252 |
msgid "Job title"
|
1253 |
msgstr ""
|
1254 |
|
1255 |
#: includes/class-wp-job-manager-email-notifications.php:279
|
1256 |
#: includes/class-wp-job-manager-post-types.php:224
|
1257 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:237
|
|
|
|
|
|
|
1258 |
msgid "Job type"
|
1259 |
msgstr ""
|
1260 |
|
1261 |
#: includes/class-wp-job-manager-email-notifications.php:289
|
1262 |
#: includes/class-wp-job-manager-post-types.php:160
|
1263 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:246
|
|
|
|
|
|
|
1264 |
msgid "Job category"
|
1265 |
msgstr ""
|
1266 |
|
1267 |
#: includes/class-wp-job-manager-email-notifications.php:298
|
1268 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:278
|
|
|
|
|
1269 |
msgid "Company name"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
#: includes/class-wp-job-manager-email-notifications.php:306
|
|
|
1273 |
msgid "Company website"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
#: includes/class-wp-job-manager-email-notifications.php:315
|
|
|
1277 |
msgid "Listing expires"
|
1278 |
msgstr ""
|
1279 |
|
1280 |
#: includes/class-wp-job-manager-email-notifications.php:474
|
|
|
1281 |
msgid "Email Notifications"
|
1282 |
msgstr ""
|
1283 |
|
1284 |
#: includes/class-wp-job-manager-email-notifications.php:477
|
|
|
1285 |
msgid "Select the email notifications to enable."
|
1286 |
msgstr ""
|
1287 |
|
1288 |
#: includes/class-wp-job-manager-email-notifications.php:631
|
|
|
1289 |
msgid "Format"
|
1290 |
msgstr ""
|
1291 |
|
1292 |
#: includes/class-wp-job-manager-email-notifications.php:634
|
|
|
1293 |
msgid "Send plain text email"
|
1294 |
msgstr ""
|
1295 |
|
1296 |
#: includes/class-wp-job-manager-email-notifications.php:635
|
|
|
1297 |
msgid "Send rich text email"
|
1298 |
msgstr ""
|
1299 |
|
1300 |
#: includes/class-wp-job-manager-geocode.php:234
|
|
|
1301 |
msgid "No results found"
|
1302 |
msgstr ""
|
1303 |
|
1304 |
#: includes/class-wp-job-manager-geocode.php:237
|
|
|
1305 |
msgid "Query limit reached"
|
1306 |
msgstr ""
|
1307 |
|
1308 |
#: includes/class-wp-job-manager-geocode.php:241
|
1309 |
#: includes/class-wp-job-manager-geocode.php:244
|
|
|
|
|
1310 |
msgid "Geocoding error"
|
1311 |
msgstr ""
|
1312 |
|
1313 |
#: includes/class-wp-job-manager-install.php:84
|
|
|
1314 |
msgid "Employer"
|
1315 |
msgstr ""
|
1316 |
|
1317 |
#: includes/class-wp-job-manager-post-types.php:161
|
|
|
1318 |
msgid "Job categories"
|
1319 |
msgstr ""
|
1320 |
|
@@ -1324,6 +1597,9 @@ msgstr ""
|
|
1324 |
#: includes/class-wp-job-manager-post-types.php:189
|
1325 |
#: includes/class-wp-job-manager-post-types.php:252
|
1326 |
#: includes/class-wp-job-manager-post-types.php:350
|
|
|
|
|
|
|
1327 |
msgid "Search %s"
|
1328 |
msgstr ""
|
1329 |
|
@@ -1333,6 +1609,9 @@ msgstr ""
|
|
1333 |
#: includes/class-wp-job-manager-post-types.php:191
|
1334 |
#: includes/class-wp-job-manager-post-types.php:254
|
1335 |
#: includes/class-wp-job-manager-post-types.php:336
|
|
|
|
|
|
|
1336 |
msgid "All %s"
|
1337 |
msgstr ""
|
1338 |
|
@@ -1342,6 +1621,9 @@ msgstr ""
|
|
1342 |
#: includes/class-wp-job-manager-post-types.php:193
|
1343 |
#: includes/class-wp-job-manager-post-types.php:256
|
1344 |
#: includes/class-wp-job-manager-post-types.php:356
|
|
|
|
|
|
|
1345 |
msgid "Parent %s"
|
1346 |
msgstr ""
|
1347 |
|
@@ -1349,6 +1631,8 @@ msgstr ""
|
|
1349 |
#. translators: Placeholder %s is the singular label of the job listing job type taxonomy type.
|
1350 |
#: includes/class-wp-job-manager-post-types.php:195
|
1351 |
#: includes/class-wp-job-manager-post-types.php:258
|
|
|
|
|
1352 |
msgid "Parent %s:"
|
1353 |
msgstr ""
|
1354 |
|
@@ -1358,6 +1642,9 @@ msgstr ""
|
|
1358 |
#: includes/class-wp-job-manager-post-types.php:197
|
1359 |
#: includes/class-wp-job-manager-post-types.php:260
|
1360 |
#: includes/class-wp-job-manager-post-types.php:342
|
|
|
|
|
|
|
1361 |
msgid "Edit %s"
|
1362 |
msgstr ""
|
1363 |
|
@@ -1365,6 +1652,8 @@ msgstr ""
|
|
1365 |
#. translators: Placeholder %s is the singular label of the job listing job type taxonomy type.
|
1366 |
#: includes/class-wp-job-manager-post-types.php:199
|
1367 |
#: includes/class-wp-job-manager-post-types.php:262
|
|
|
|
|
1368 |
msgid "Update %s"
|
1369 |
msgstr ""
|
1370 |
|
@@ -1372,6 +1661,8 @@ msgstr ""
|
|
1372 |
#. translators: Placeholder %s is the singular label of the job listing job type taxonomy type.
|
1373 |
#: includes/class-wp-job-manager-post-types.php:201
|
1374 |
#: includes/class-wp-job-manager-post-types.php:264
|
|
|
|
|
1375 |
msgid "Add New %s"
|
1376 |
msgstr ""
|
1377 |
|
@@ -1379,70 +1670,88 @@ msgstr ""
|
|
1379 |
#. translators: Placeholder %s is the singular label of the job listing job type taxonomy type.
|
1380 |
#: includes/class-wp-job-manager-post-types.php:203
|
1381 |
#: includes/class-wp-job-manager-post-types.php:266
|
|
|
|
|
1382 |
msgid "New %s Name"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
#: includes/class-wp-job-manager-post-types.php:225
|
|
|
1386 |
msgid "Job types"
|
1387 |
msgstr ""
|
1388 |
|
1389 |
#: includes/class-wp-job-manager-post-types.php:303
|
|
|
1390 |
msgid "Job"
|
1391 |
msgstr ""
|
1392 |
|
1393 |
#: includes/class-wp-job-manager-post-types.php:304
|
|
|
1394 |
msgid "Jobs"
|
1395 |
msgstr ""
|
1396 |
|
1397 |
#. translators: Placeholder %s is the plural label of the job listing post type.
|
1398 |
#: includes/class-wp-job-manager-post-types.php:337
|
|
|
1399 |
msgid "Add New"
|
1400 |
msgstr ""
|
1401 |
|
1402 |
#. translators: Placeholder %s is the singular label of the job listing post type.
|
1403 |
#: includes/class-wp-job-manager-post-types.php:339
|
|
|
1404 |
msgid "Add %s"
|
1405 |
msgstr ""
|
1406 |
|
1407 |
#. translators: Placeholder %s is the singular label of the job listing post type.
|
1408 |
#: includes/class-wp-job-manager-post-types.php:344
|
|
|
1409 |
msgid "New %s"
|
1410 |
msgstr ""
|
1411 |
|
1412 |
#. translators: Placeholder %s is the singular label of the job listing post type.
|
1413 |
#: includes/class-wp-job-manager-post-types.php:346
|
1414 |
#: includes/class-wp-job-manager-post-types.php:348
|
|
|
|
|
1415 |
msgid "View %s"
|
1416 |
msgstr ""
|
1417 |
|
1418 |
#. translators: Placeholder %s is the singular label of the job listing post type.
|
1419 |
#: includes/class-wp-job-manager-post-types.php:352
|
|
|
1420 |
msgid "No %s found"
|
1421 |
msgstr ""
|
1422 |
|
1423 |
#. translators: Placeholder %s is the plural label of the job listing post type.
|
1424 |
#: includes/class-wp-job-manager-post-types.php:354
|
|
|
1425 |
msgid "No %s found in trash"
|
1426 |
msgstr ""
|
1427 |
|
1428 |
#: includes/class-wp-job-manager-post-types.php:358
|
|
|
1429 |
msgid "Set company logo"
|
1430 |
msgstr ""
|
1431 |
|
1432 |
#: includes/class-wp-job-manager-post-types.php:359
|
|
|
1433 |
msgid "Remove company logo"
|
1434 |
msgstr ""
|
1435 |
|
1436 |
#: includes/class-wp-job-manager-post-types.php:360
|
|
|
1437 |
msgid "Use as company logo"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
#. translators: Placeholder %s is the plural label of the job listing post type.
|
1441 |
#: includes/class-wp-job-manager-post-types.php:363
|
|
|
1442 |
msgid "This is where you can create and manage %s."
|
1443 |
msgstr ""
|
1444 |
|
1445 |
#: includes/class-wp-job-manager-post-types.php:398
|
|
|
|
|
1446 |
#: wp-job-manager-functions.php:360
|
1447 |
msgctxt "post status"
|
1448 |
msgid "Expired"
|
@@ -1450,12 +1759,15 @@ msgstr ""
|
|
1450 |
|
1451 |
#. translators: Placeholder %s is the number of expired posts of this type.
|
1452 |
#: includes/class-wp-job-manager-post-types.php:405
|
|
|
1453 |
msgid "Expired <span class=\"count\">(%s)</span>"
|
1454 |
msgid_plural "Expired <span class=\"count\">(%s)</span>"
|
1455 |
msgstr[0] ""
|
1456 |
msgstr[1] ""
|
1457 |
|
1458 |
#: includes/class-wp-job-manager-post-types.php:411
|
|
|
|
|
1459 |
#: wp-job-manager-functions.php:361
|
1460 |
msgctxt "post status"
|
1461 |
msgid "Preview"
|
@@ -1463,43 +1775,57 @@ msgstr ""
|
|
1463 |
|
1464 |
#. translators: Placeholder %s is the number of posts in a preview state.
|
1465 |
#: includes/class-wp-job-manager-post-types.php:417
|
|
|
1466 |
msgid "Preview <span class=\"count\">(%s)</span>"
|
1467 |
msgid_plural "Preview <span class=\"count\">(%s)</span>"
|
1468 |
msgstr[0] ""
|
1469 |
msgstr[1] ""
|
1470 |
|
1471 |
#: includes/class-wp-job-manager-post-types.php:1163
|
|
|
1472 |
msgctxt "Post type archive slug - resave permalinks after changing this"
|
1473 |
msgid "jobs"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
#: includes/class-wp-job-manager-post-types.php:1480
|
1477 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:199
|
|
|
|
|
1478 |
msgid "Application email/URL"
|
1479 |
msgstr ""
|
1480 |
|
1481 |
#: includes/class-wp-job-manager-post-types.php:1481
|
1482 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:200
|
|
|
|
|
1483 |
msgid "Enter an email address or website URL"
|
1484 |
msgstr ""
|
1485 |
|
1486 |
#: includes/class-wp-job-manager-post-types.php:1484
|
1487 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:189
|
|
|
|
|
1488 |
msgid "Application email"
|
1489 |
msgstr ""
|
1490 |
|
1491 |
#: includes/class-wp-job-manager-post-types.php:1485
|
1492 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:190
|
|
|
|
|
1493 |
msgid "you@example.com"
|
1494 |
msgstr ""
|
1495 |
|
1496 |
#: includes/class-wp-job-manager-post-types.php:1487
|
1497 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:194
|
|
|
|
|
1498 |
msgid "Application URL"
|
1499 |
msgstr ""
|
1500 |
|
1501 |
#: includes/class-wp-job-manager-post-types.php:1488
|
1502 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:195
|
|
|
|
|
1503 |
msgid "https://"
|
1504 |
msgstr ""
|
1505 |
|
@@ -1512,34 +1838,42 @@ msgid "Job listing expires at the start of the day."
|
|
1512 |
msgstr ""
|
1513 |
|
1514 |
#: includes/class-wp-job-manager-shortcodes.php:201
|
|
|
1515 |
msgid "Invalid ID"
|
1516 |
msgstr ""
|
1517 |
|
1518 |
#: includes/class-wp-job-manager-shortcodes.php:208
|
|
|
1519 |
msgid "This position has already been filled"
|
1520 |
msgstr ""
|
1521 |
|
1522 |
#. translators: Placeholder %s is the job listing title.
|
1523 |
#: includes/class-wp-job-manager-shortcodes.php:216
|
|
|
1524 |
msgid "%s has been filled"
|
1525 |
msgstr ""
|
1526 |
|
1527 |
#: includes/class-wp-job-manager-shortcodes.php:221
|
|
|
1528 |
msgid "This position is not filled"
|
1529 |
msgstr ""
|
1530 |
|
1531 |
#. translators: Placeholder %s is the job listing title.
|
1532 |
#: includes/class-wp-job-manager-shortcodes.php:229
|
|
|
1533 |
msgid "%s has been marked as not filled"
|
1534 |
msgstr ""
|
1535 |
|
1536 |
#. translators: Placeholder %s is the job listing title.
|
1537 |
#: includes/class-wp-job-manager-shortcodes.php:237
|
|
|
1538 |
msgid "%s has been deleted"
|
1539 |
msgstr ""
|
1540 |
|
1541 |
#: includes/class-wp-job-manager-shortcodes.php:242
|
1542 |
#: includes/class-wp-job-manager-shortcodes.php:256
|
|
|
|
|
1543 |
msgid "Missing submission page."
|
1544 |
msgstr ""
|
1545 |
|
@@ -1548,44 +1882,58 @@ msgstr ""
|
|
1548 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:36
|
1549 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:52
|
1550 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:36
|
|
|
|
|
|
|
|
|
1551 |
msgid "Title"
|
1552 |
msgstr ""
|
1553 |
|
1554 |
#: includes/class-wp-job-manager-shortcodes.php:394
|
|
|
1555 |
msgid "Date Posted"
|
1556 |
msgstr ""
|
1557 |
|
1558 |
#: includes/class-wp-job-manager-shortcodes.php:395
|
|
|
1559 |
msgid "Listing Expires"
|
1560 |
msgstr ""
|
1561 |
|
1562 |
#: includes/class-wp-job-manager-shortcodes.php:447
|
|
|
1563 |
msgid "Mark not filled"
|
1564 |
msgstr ""
|
1565 |
|
1566 |
#: includes/class-wp-job-manager-shortcodes.php:452
|
|
|
1567 |
msgid "Mark filled"
|
1568 |
msgstr ""
|
1569 |
|
1570 |
#: includes/class-wp-job-manager-shortcodes.php:458
|
|
|
1571 |
msgid "Duplicate"
|
1572 |
msgstr ""
|
1573 |
|
1574 |
#: includes/class-wp-job-manager-shortcodes.php:465
|
|
|
1575 |
msgid "Relist"
|
1576 |
msgstr ""
|
1577 |
|
1578 |
#: includes/class-wp-job-manager-shortcodes.php:482
|
|
|
1579 |
msgid "Continue Submission"
|
1580 |
msgstr ""
|
1581 |
|
1582 |
-
#: includes/class-wp-job-manager-shortcodes.php:
|
1583 |
-
#: includes/class-wp-job-manager-shortcodes.php:
|
|
|
|
|
1584 |
msgid "Load more listings"
|
1585 |
msgstr ""
|
1586 |
|
1587 |
#. translators: Placeholder %s is a URL to the document on wpjobmanager.com with info on usage tracking.
|
1588 |
#: includes/class-wp-job-manager-usage-tracking.php:228
|
|
|
1589 |
msgid ""
|
1590 |
"We'd love if you helped us make WP Job Manager better by allowing us to collect\n"
|
1591 |
"\t\t\t\t<a href=\"%s\">usage tracking data</a>. No sensitive information is\n"
|
@@ -1594,6 +1942,7 @@ msgstr ""
|
|
1594 |
|
1595 |
#. translators: the href tag contains the URL for the page telling users what data WPJM tracks.
|
1596 |
#: includes/class-wp-job-manager-usage-tracking.php:293
|
|
|
1597 |
msgid ""
|
1598 |
"Help us make WP Job Manager better by allowing us to collect\n"
|
1599 |
"\t\t\t\t<a href=\"%s\">usage tracking data</a>.\n"
|
@@ -1601,6 +1950,7 @@ msgid ""
|
|
1601 |
msgstr ""
|
1602 |
|
1603 |
#: includes/class-wp-job-manager-usage-tracking.php:320
|
|
|
1604 |
msgid "Enable Usage Tracking"
|
1605 |
msgstr ""
|
1606 |
|
@@ -1612,10 +1962,12 @@ msgid ""
|
|
1612 |
msgstr ""
|
1613 |
|
1614 |
#: includes/class-wp-job-manager.php:361
|
|
|
1615 |
msgid "Load previous listings"
|
1616 |
msgstr ""
|
1617 |
|
1618 |
#: includes/class-wp-job-manager.php:489
|
|
|
1619 |
msgid "Invalid file type. Accepted types:"
|
1620 |
msgstr ""
|
1621 |
|
@@ -1626,174 +1978,219 @@ msgstr ""
|
|
1626 |
#. translators: Placeholder %d is the number of files to that users are limited to.
|
1627 |
#: includes/class-wp-job-manager.php:523
|
1628 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:479
|
|
|
|
|
1629 |
msgid "You are only allowed to upload a maximum of %d files."
|
1630 |
msgstr ""
|
1631 |
|
1632 |
#: includes/class-wp-job-manager.php:531
|
|
|
1633 |
msgid "Are you sure you want to delete this listing?"
|
1634 |
msgstr ""
|
1635 |
|
1636 |
#: includes/class-wp-job-manager.php:539
|
|
|
1637 |
msgid "This field is required."
|
1638 |
msgstr ""
|
1639 |
|
1640 |
#: includes/emails/class-wp-job-manager-email-admin-expiring-job.php:34
|
|
|
1641 |
msgid "Admin Notice of Expiring Job Listings"
|
1642 |
msgstr ""
|
1643 |
|
1644 |
#: includes/emails/class-wp-job-manager-email-admin-expiring-job.php:44
|
|
|
1645 |
msgid "Send notices to the site administrator before a job listing expires."
|
1646 |
msgstr ""
|
1647 |
|
1648 |
#: includes/emails/class-wp-job-manager-email-admin-new-job.php:34
|
|
|
1649 |
msgid "Admin Notice of New Listing"
|
1650 |
msgstr ""
|
1651 |
|
1652 |
#: includes/emails/class-wp-job-manager-email-admin-new-job.php:44
|
|
|
1653 |
msgid "Send a notice to the site administrator when a new job is submitted on the frontend."
|
1654 |
msgstr ""
|
1655 |
|
1656 |
#. translators: Placeholder %s is the job listing post title.
|
1657 |
#: includes/emails/class-wp-job-manager-email-admin-new-job.php:63
|
|
|
1658 |
msgid "New Job Listing Submitted: %s"
|
1659 |
msgstr ""
|
1660 |
|
1661 |
#: includes/emails/class-wp-job-manager-email-admin-updated-job.php:34
|
|
|
1662 |
msgid "Admin Notice of Updated Listing"
|
1663 |
msgstr ""
|
1664 |
|
1665 |
#: includes/emails/class-wp-job-manager-email-admin-updated-job.php:44
|
|
|
1666 |
msgid "Send a notice to the site administrator when a job is updated on the frontend."
|
1667 |
msgstr ""
|
1668 |
|
1669 |
#. translators: Placeholder %s is the job listing post title.
|
1670 |
#: includes/emails/class-wp-job-manager-email-admin-updated-job.php:63
|
|
|
1671 |
msgid "Job Listing Updated: %s"
|
1672 |
msgstr ""
|
1673 |
|
1674 |
#: includes/emails/class-wp-job-manager-email-employer-expiring-job.php:37
|
|
|
1675 |
msgid "Employer Notice of Expiring Job Listings"
|
1676 |
msgstr ""
|
1677 |
|
1678 |
#: includes/emails/class-wp-job-manager-email-employer-expiring-job.php:47
|
|
|
1679 |
msgid "Send notices to employers before a job listing expires."
|
1680 |
msgstr ""
|
1681 |
|
1682 |
#. translators: Placeholder %s is the job listing post title.
|
1683 |
#: includes/emails/class-wp-job-manager-email-employer-expiring-job.php:79
|
|
|
1684 |
msgid "Job Listing Expiring: %s"
|
1685 |
msgstr ""
|
1686 |
|
1687 |
#: includes/emails/class-wp-job-manager-email-employer-expiring-job.php:132
|
|
|
1688 |
msgid "Notice Period"
|
1689 |
msgstr ""
|
1690 |
|
1691 |
#: includes/emails/class-wp-job-manager-email-employer-expiring-job.php:134
|
|
|
1692 |
msgid "days"
|
1693 |
msgstr ""
|
1694 |
|
1695 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:104
|
|
|
1696 |
msgid "Invalid listing"
|
1697 |
msgstr ""
|
1698 |
|
1699 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:136
|
|
|
1700 |
msgid "Save changes"
|
1701 |
msgstr ""
|
1702 |
|
1703 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:141
|
|
|
1704 |
msgid "Submit changes for approval"
|
1705 |
msgstr ""
|
1706 |
|
1707 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:195
|
|
|
1708 |
msgid "Your changes have been saved."
|
1709 |
msgstr ""
|
1710 |
|
1711 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:201
|
|
|
1712 |
msgid "View →"
|
1713 |
msgstr ""
|
1714 |
|
1715 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:203
|
|
|
1716 |
msgid "Your changes have been submitted and your listing will be visible again once approved."
|
1717 |
msgstr ""
|
1718 |
|
1719 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:87
|
|
|
1720 |
msgid "Submit Details"
|
1721 |
msgstr ""
|
1722 |
|
1723 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:93
|
1724 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:669
|
1725 |
#: templates/job-preview.php:30
|
|
|
|
|
|
|
1726 |
msgid "Preview"
|
1727 |
msgstr ""
|
1728 |
|
1729 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:99
|
|
|
1730 |
msgid "Done"
|
1731 |
msgstr ""
|
1732 |
|
1733 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:215
|
|
|
1734 |
msgid "Job Title"
|
1735 |
msgstr ""
|
1736 |
|
1737 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:223
|
|
|
1738 |
msgid "Leave this blank if the location is not important"
|
1739 |
msgstr ""
|
1740 |
|
1741 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:240
|
|
|
1742 |
msgid "Choose job type…"
|
1743 |
msgstr ""
|
1744 |
|
1745 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:255
|
|
|
1746 |
msgid "Description"
|
1747 |
msgstr ""
|
1748 |
|
1749 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:281
|
|
|
1750 |
msgid "Enter the name of the company"
|
1751 |
msgstr ""
|
1752 |
|
1753 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:285
|
1754 |
#: templates/content-single-job_listing-company.php:30
|
|
|
|
|
1755 |
msgid "Website"
|
1756 |
msgstr ""
|
1757 |
|
1758 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:289
|
|
|
1759 |
msgid "http://"
|
1760 |
msgstr ""
|
1761 |
|
1762 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:293
|
|
|
1763 |
msgid "Tagline"
|
1764 |
msgstr ""
|
1765 |
|
1766 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:296
|
|
|
1767 |
msgid "Briefly describe your company"
|
1768 |
msgstr ""
|
1769 |
|
1770 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:301
|
|
|
1771 |
msgid "Video"
|
1772 |
msgstr ""
|
1773 |
|
1774 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:305
|
|
|
1775 |
msgid "A link to a video about your company"
|
1776 |
msgstr ""
|
1777 |
|
1778 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:309
|
|
|
1779 |
msgid "Twitter username"
|
1780 |
msgstr ""
|
1781 |
|
1782 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:312
|
|
|
1783 |
msgid "@yourcompany"
|
1784 |
msgstr ""
|
1785 |
|
1786 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:316
|
|
|
1787 |
msgid "Logo"
|
1788 |
msgstr ""
|
1789 |
|
1790 |
#. translators: Placeholder %s is the label for the required field.
|
1791 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:400
|
|
|
1792 |
msgid "%s is a required field"
|
1793 |
msgstr ""
|
1794 |
|
1795 |
#. translators: Placeholder %s is the field label that is did not validate.
|
1796 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:411
|
|
|
1797 |
msgid "%s is invalid"
|
1798 |
msgstr ""
|
1799 |
|
@@ -1804,101 +2201,127 @@ msgstr ""
|
|
1804 |
#. translators: Placeholder %1$s is field label; %2$s is the file mime type; %3$s is the allowed mime-types.
|
1805 |
#. translators: %1$s is the file field label; %2$s is the file type; %3$s is the list of allowed file types.
|
1806 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:452
|
|
|
|
|
1807 |
#: wp-job-manager-functions.php:1393
|
1808 |
msgid "\"%1$s\" (filetype %2$s) needs to be one of the following file types: %3$s"
|
1809 |
msgstr ""
|
1810 |
|
1811 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:462
|
|
|
1812 |
msgid "Invalid attachment provided."
|
1813 |
msgstr ""
|
1814 |
|
1815 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:506
|
|
|
1816 |
msgid "Please enter a valid application email address"
|
1817 |
msgstr ""
|
1818 |
|
1819 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:511
|
|
|
1820 |
msgid "Please enter a valid application URL"
|
1821 |
msgstr ""
|
1822 |
|
1823 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:517
|
|
|
1824 |
msgid "Please enter a valid application email address or URL"
|
1825 |
msgstr ""
|
1826 |
|
1827 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:728
|
|
|
1828 |
msgid "Please enter a username."
|
1829 |
msgstr ""
|
1830 |
|
1831 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:732
|
|
|
1832 |
msgid "Please enter a password."
|
1833 |
msgstr ""
|
1834 |
|
1835 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:736
|
|
|
1836 |
msgid "Please enter your email address."
|
1837 |
msgstr ""
|
1838 |
|
1839 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:742
|
|
|
1840 |
msgid "Passwords must match."
|
1841 |
msgstr ""
|
1842 |
|
1843 |
#. translators: Placeholder %s is the password hint.
|
1844 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:748
|
|
|
1845 |
msgid "Invalid Password: %s"
|
1846 |
msgstr ""
|
1847 |
|
1848 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:750
|
|
|
1849 |
msgid "Password is not valid."
|
1850 |
msgstr ""
|
1851 |
|
1852 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:782
|
|
|
1853 |
msgid "You must be signed in to post a new listing."
|
1854 |
msgstr ""
|
1855 |
|
1856 |
#. translators: placeholder is the URL to the job dashboard page.
|
1857 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:808
|
|
|
1858 |
msgid "Draft was saved. Job listing drafts can be resumed from the <a href=\"%s\">job dashboard</a>."
|
1859 |
msgstr ""
|
1860 |
|
1861 |
#: includes/helper/class-wp-job-manager-helper.php:279
|
|
|
1862 |
msgid "Manage License (Requires Attention)"
|
1863 |
msgstr ""
|
1864 |
|
1865 |
#: includes/helper/class-wp-job-manager-helper.php:282
|
1866 |
#: tests/php/tests/includes/helper/test_class.wp-job-manager-helper.php:262
|
|
|
1867 |
msgid "Manage License"
|
1868 |
msgstr ""
|
1869 |
|
1870 |
#: includes/helper/class-wp-job-manager-helper.php:285
|
1871 |
#: includes/helper/views/html-licences.php:75
|
1872 |
#: tests/php/tests/includes/helper/test_class.wp-job-manager-helper.php:278
|
|
|
|
|
1873 |
msgid "Activate License"
|
1874 |
msgstr ""
|
1875 |
|
1876 |
#: includes/helper/class-wp-job-manager-helper.php:494
|
|
|
1877 |
msgid "Please enter a valid license key and email address in order to activate this plugin's license."
|
1878 |
msgstr ""
|
1879 |
|
1880 |
#: includes/helper/class-wp-job-manager-helper.php:526
|
|
|
1881 |
msgid "Connection failed to the License Key API server - possible server issue."
|
1882 |
msgstr ""
|
1883 |
|
1884 |
#: includes/helper/class-wp-job-manager-helper.php:535
|
|
|
1885 |
msgid "Plugin license has been activated."
|
1886 |
msgstr ""
|
1887 |
|
1888 |
#: includes/helper/class-wp-job-manager-helper.php:538
|
|
|
1889 |
msgid "An unknown error occurred while attempting to activate the license"
|
1890 |
msgstr ""
|
1891 |
|
1892 |
#: includes/helper/class-wp-job-manager-helper.php:558
|
|
|
1893 |
msgid "license is not active."
|
1894 |
msgstr ""
|
1895 |
|
1896 |
#: includes/helper/class-wp-job-manager-helper.php:574
|
|
|
1897 |
msgid "Plugin license has been deactivated."
|
1898 |
msgstr ""
|
1899 |
|
1900 |
#: includes/helper/views/html-licence-key-error.php:13
|
1901 |
#: includes/helper/views/html-licence-key-notice.php:13
|
|
|
|
|
1902 |
msgid "Hide notice"
|
1903 |
msgstr ""
|
1904 |
|
@@ -1914,11 +2337,15 @@ msgstr ""
|
|
1914 |
|
1915 |
#: includes/helper/views/html-licences.php:56
|
1916 |
#: includes/helper/views/html-licences.php:69
|
|
|
|
|
1917 |
msgid "License"
|
1918 |
msgstr ""
|
1919 |
|
1920 |
#: includes/helper/views/html-licences.php:59
|
1921 |
#: includes/helper/views/html-licences.php:72
|
|
|
|
|
1922 |
msgid "Email"
|
1923 |
msgstr ""
|
1924 |
|
@@ -1928,6 +2355,7 @@ msgid "Email address"
|
|
1928 |
msgstr ""
|
1929 |
|
1930 |
#: includes/helper/views/html-licences.php:63
|
|
|
1931 |
msgid "Deactivate License"
|
1932 |
msgstr ""
|
1933 |
|
@@ -1937,102 +2365,115 @@ msgid "Lost your license key? <a href=\"%s\">Retrieve it here</a>."
|
|
1937 |
msgstr ""
|
1938 |
|
1939 |
#: includes/helper/views/html-licences.php:86
|
|
|
1940 |
msgid "No plugins are activated that have licenses managed by WP Job Manager."
|
1941 |
msgstr ""
|
1942 |
|
1943 |
#. translators: Placeholder %s is the plural label for the job listing post type.
|
1944 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:27
|
1945 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:35
|
|
|
|
|
1946 |
msgid "Featured %s"
|
1947 |
msgstr ""
|
1948 |
|
1949 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:29
|
|
|
1950 |
msgid "Display a list of featured listings on your site."
|
1951 |
msgstr ""
|
1952 |
|
1953 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:44
|
1954 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:54
|
|
|
|
|
1955 |
msgid "Number of listings to show"
|
1956 |
msgstr ""
|
1957 |
|
1958 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:49
|
|
|
1959 |
msgid "Sort By"
|
1960 |
msgstr ""
|
1961 |
|
1962 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:51
|
|
|
1963 |
msgid "Date"
|
1964 |
msgstr ""
|
1965 |
|
1966 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:53
|
|
|
1967 |
msgid "Author"
|
1968 |
msgstr ""
|
1969 |
|
1970 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:54
|
|
|
1971 |
msgid "Random"
|
1972 |
msgstr ""
|
1973 |
|
1974 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:60
|
|
|
1975 |
msgid "Sort Direction"
|
1976 |
msgstr ""
|
1977 |
|
1978 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:62
|
|
|
1979 |
msgid "Ascending"
|
1980 |
msgstr ""
|
1981 |
|
1982 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:63
|
|
|
1983 |
msgid "Descending"
|
1984 |
msgstr ""
|
1985 |
|
1986 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:69
|
1987 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:59
|
|
|
|
|
1988 |
msgid "Show Company Logo"
|
1989 |
msgstr ""
|
1990 |
|
1991 |
#. translators: Placeholder %s is the plural label for the job listing post type.
|
1992 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:27
|
1993 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:35
|
|
|
|
|
1994 |
msgid "Recent %s"
|
1995 |
msgstr ""
|
1996 |
|
1997 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:29
|
|
|
1998 |
msgid "Display a list of recent listings on your site, optionally matching a keyword and location."
|
1999 |
msgstr ""
|
2000 |
|
2001 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:41
|
|
|
2002 |
msgid "Keyword"
|
2003 |
msgstr ""
|
2004 |
|
2005 |
-
#: templates/access-denied-browse-job_listings.php:18
|
2006 |
-
msgid "Sorry, you do not have permission to browse job listings."
|
2007 |
-
msgstr ""
|
2008 |
-
|
2009 |
-
#: templates/access-denied-single-job_listing.php:19
|
2010 |
-
msgid "This listing has expired"
|
2011 |
-
msgstr ""
|
2012 |
-
|
2013 |
-
#: templates/access-denied-single-job_listing.php:21
|
2014 |
-
msgid "Sorry, you do not have permission to view this job listing."
|
2015 |
-
msgstr ""
|
2016 |
-
|
2017 |
#: templates/account-signin.php:21
|
|
|
2018 |
msgid "Your account"
|
2019 |
msgstr ""
|
2020 |
|
2021 |
#. translators: Placeholder %s is the username.
|
2022 |
#: templates/account-signin.php:26
|
|
|
2023 |
msgid "You are currently signed in as <strong>%s</strong>."
|
2024 |
msgstr ""
|
2025 |
|
2026 |
#: templates/account-signin.php:29
|
|
|
2027 |
msgid "Sign out"
|
2028 |
msgstr ""
|
2029 |
|
2030 |
#: templates/account-signin.php:40
|
|
|
2031 |
msgid "Have an account?"
|
2032 |
msgstr ""
|
2033 |
|
2034 |
#: templates/account-signin.php:42
|
2035 |
#: templates/job-dashboard-login.php:20
|
|
|
|
|
2036 |
msgid "Sign in"
|
2037 |
msgstr ""
|
2038 |
|
@@ -2041,100 +2482,125 @@ msgid "If you don't have an account you can create one below by entering your em
|
|
2041 |
msgstr ""
|
2042 |
|
2043 |
#: templates/account-signin.php:46
|
|
|
2044 |
msgid "optionally"
|
2045 |
msgstr ""
|
2046 |
|
2047 |
#: templates/account-signin.php:48
|
|
|
2048 |
msgid "Your account details will be confirmed via email."
|
2049 |
msgstr ""
|
2050 |
|
2051 |
#: templates/account-signin.php:53
|
|
|
2052 |
msgid "You must sign in to create a new listing."
|
2053 |
msgstr ""
|
2054 |
|
2055 |
#: templates/account-signin.php:64
|
2056 |
#: templates/job-submit.php:43
|
2057 |
#: templates/job-submit.php:60
|
|
|
|
|
|
|
2058 |
msgid "(optional)"
|
2059 |
msgstr ""
|
2060 |
|
2061 |
#: templates/content-no-jobs-found.php:20
|
|
|
2062 |
msgid "There are no listings matching your search."
|
2063 |
msgstr ""
|
2064 |
|
2065 |
#: templates/content-no-jobs-found.php:22
|
|
|
2066 |
msgid "There are currently no vacancies."
|
2067 |
msgstr ""
|
2068 |
|
2069 |
#: templates/content-single-job_listing-meta.php:44
|
|
|
2070 |
msgid "This position has been filled"
|
2071 |
msgstr ""
|
2072 |
|
2073 |
#: templates/content-single-job_listing-meta.php:46
|
|
|
2074 |
msgid "Applications have closed"
|
2075 |
msgstr ""
|
2076 |
|
2077 |
-
#: templates/content-single-job_listing.php:
|
|
|
2078 |
msgid "This listing has expired."
|
2079 |
msgstr ""
|
2080 |
|
2081 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2082 |
#: templates/emails/admin-expiring-job.php:32
|
|
|
2083 |
msgid "The following job listing is expiring today from <a href=\"%1$s\">%2$s</a>."
|
2084 |
msgstr ""
|
2085 |
|
2086 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2087 |
#: templates/emails/admin-expiring-job.php:35
|
|
|
2088 |
msgid "The following job listing is expiring soon from <a href=\"%1$s\">%2$s</a>."
|
2089 |
msgstr ""
|
2090 |
|
2091 |
#. translators: Placeholder is URL to site's WP admin.
|
2092 |
#: templates/emails/admin-expiring-job.php:41
|
|
|
2093 |
msgid "Visit <a href=\"%s\">WordPress admin</a> to manage the listing."
|
2094 |
msgstr ""
|
2095 |
|
2096 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2097 |
#: templates/emails/admin-new-job.php:27
|
|
|
2098 |
msgid "A new job listing has been submitted to <a href=\"%s\">%s</a>."
|
2099 |
msgstr ""
|
2100 |
|
2101 |
#: templates/emails/admin-new-job.php:34
|
2102 |
#: templates/emails/plain/admin-new-job.php:27
|
|
|
|
|
2103 |
msgid "It has been published and is now available to the public."
|
2104 |
msgstr ""
|
2105 |
|
2106 |
#. translators: Placeholder %s is the admin job listings URL.
|
2107 |
#: templates/emails/admin-new-job.php:40
|
|
|
2108 |
msgid "It is awaiting approval by an administrator in <a href=\"%s\">WordPress admin</a>."
|
2109 |
msgstr ""
|
2110 |
|
2111 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2112 |
#: templates/emails/admin-updated-job.php:26
|
|
|
2113 |
msgid "A job listing has been updated on <a href=\"%s\">%s</a>."
|
2114 |
msgstr ""
|
2115 |
|
2116 |
#: templates/emails/admin-updated-job.php:29
|
2117 |
#: templates/emails/plain/admin-updated-job.php:27
|
|
|
|
|
2118 |
msgid "The changes have been published and are now available to the public."
|
2119 |
msgstr ""
|
2120 |
|
2121 |
#. translators: Placeholder %s is the admin job listings URL.
|
2122 |
#: templates/emails/admin-updated-job.php:34
|
|
|
2123 |
msgid "The job listing is not publicly available until the changes are approved by an administrator in the site's <a href=\"%s\">WordPress admin</a>."
|
2124 |
msgstr ""
|
2125 |
|
2126 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2127 |
#: templates/emails/employer-expiring-job.php:33
|
|
|
2128 |
msgid "The following job listing is expiring today from <a href=\"%s\">%s</a>."
|
2129 |
msgstr ""
|
2130 |
|
2131 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2132 |
#: templates/emails/employer-expiring-job.php:42
|
|
|
2133 |
msgid "The following job listing is expiring soon from <a href=\"%s\">%s</a>."
|
2134 |
msgstr ""
|
2135 |
|
2136 |
#. translators: Placeholder %s is the job listing dashboard URL.
|
2137 |
#: templates/emails/employer-expiring-job.php:51
|
|
|
2138 |
msgid "Visit the <a href=\"%s\">job listing dashboard</a> to manage the listing."
|
2139 |
msgstr ""
|
2140 |
|
@@ -2152,6 +2618,7 @@ msgstr ""
|
|
2152 |
|
2153 |
#. translators: Placeholder %s is the edit job URL.
|
2154 |
#: templates/emails/plain/admin-expiring-job.php:46
|
|
|
2155 |
msgid "Visit WordPress admin (%s) to manage the listing."
|
2156 |
msgstr ""
|
2157 |
|
@@ -2162,6 +2629,7 @@ msgstr ""
|
|
2162 |
|
2163 |
#. translators: Placeholder %s is the admin job listings URL.
|
2164 |
#: templates/emails/plain/admin-new-job.php:31
|
|
|
2165 |
msgid "It is awaiting approval by an administrator in WordPress admin (%s)."
|
2166 |
msgstr ""
|
2167 |
|
@@ -2172,59 +2640,75 @@ msgstr ""
|
|
2172 |
|
2173 |
#. translators: Placeholder %s is the admin job listings URL.
|
2174 |
#: templates/emails/plain/admin-updated-job.php:31
|
|
|
2175 |
msgid "The job listing is not publicly available until the changes are approved by an administrator in the site's WordPress admin (%s)."
|
2176 |
msgstr ""
|
2177 |
|
2178 |
#. translators: Placeholder %s is the job listing dashboard URL.
|
2179 |
#: templates/emails/plain/employer-expiring-job.php:36
|
|
|
2180 |
msgid "Visit the job listing dashboard (%s) to manage the listing."
|
2181 |
msgstr ""
|
2182 |
|
2183 |
#: templates/form-fields/file-field.php:60
|
|
|
2184 |
msgid "Maximum file size: %s."
|
2185 |
msgstr ""
|
2186 |
|
2187 |
#: templates/form-fields/multiselect-field.php:20
|
|
|
|
|
2188 |
#: wp-job-manager-functions.php:1160
|
2189 |
msgid "No results match"
|
2190 |
msgstr ""
|
2191 |
|
2192 |
#: templates/form-fields/multiselect-field.php:20
|
|
|
|
|
2193 |
#: wp-job-manager-functions.php:1161
|
2194 |
msgid "Select Some Options"
|
2195 |
msgstr ""
|
2196 |
|
2197 |
#: templates/form-fields/uploaded-file-html.php:28
|
2198 |
#: templates/form-fields/uploaded-file-html.php:30
|
|
|
|
|
2199 |
msgid "remove"
|
2200 |
msgstr ""
|
2201 |
|
2202 |
#. translators: %1$s is the email address, %2$s is the subject query args.
|
2203 |
#: templates/job-application-email.php:19
|
|
|
2204 |
msgid "To apply for this job <strong>email your details to</strong> <a class=\"job_application_email\" href=\"mailto:%1$s%2$s\">%1$s</a>"
|
2205 |
msgstr ""
|
2206 |
|
2207 |
#: templates/job-application-url.php:18
|
|
|
2208 |
msgid "To apply for this job please visit"
|
2209 |
msgstr ""
|
2210 |
|
2211 |
#: templates/job-application.php:24
|
|
|
2212 |
msgid "Apply for job"
|
2213 |
msgstr ""
|
2214 |
|
2215 |
#: templates/job-dashboard-login.php:20
|
|
|
2216 |
msgid "You need to be signed in to manage your listings."
|
2217 |
msgstr ""
|
2218 |
|
2219 |
#: templates/job-dashboard.php:30
|
|
|
2220 |
msgid "Your listings are shown in the table below."
|
2221 |
msgstr ""
|
2222 |
|
2223 |
#: templates/job-dashboard.php:42
|
|
|
2224 |
msgid "You do not have any active listings."
|
2225 |
msgstr ""
|
2226 |
|
2227 |
#: templates/job-dashboard.php:55
|
|
|
2228 |
msgid "Featured Job"
|
2229 |
msgstr ""
|
2230 |
|
@@ -2234,46 +2718,58 @@ msgstr ""
|
|
2234 |
|
2235 |
#: templates/job-filters.php:30
|
2236 |
#: templates/job-filters.php:31
|
|
|
|
|
2237 |
msgid "Keywords"
|
2238 |
msgstr ""
|
2239 |
|
2240 |
#: templates/job-filters.php:47
|
|
|
2241 |
msgid "Category"
|
2242 |
msgstr ""
|
2243 |
|
2244 |
#: templates/job-filters.php:51
|
|
|
2245 |
msgid "Any category"
|
2246 |
msgstr ""
|
2247 |
|
2248 |
#: templates/job-filters.php:68
|
|
|
2249 |
msgid "Search Jobs"
|
2250 |
msgstr ""
|
2251 |
|
2252 |
#: templates/job-filters.php:80
|
|
|
2253 |
msgid "Your browser does not support JavaScript, or it is disabled. JavaScript must be enabled in order to view listings."
|
2254 |
msgstr ""
|
2255 |
|
2256 |
#: templates/job-preview.php:28
|
|
|
2257 |
msgid "Submit Listing"
|
2258 |
msgstr ""
|
2259 |
|
2260 |
#: templates/job-preview.php:29
|
|
|
2261 |
msgid "Edit listing"
|
2262 |
msgstr ""
|
2263 |
|
2264 |
#: templates/job-submit.php:24
|
|
|
2265 |
msgid "You are editing an existing job. %s"
|
2266 |
msgstr ""
|
2267 |
|
2268 |
#: templates/job-submit.php:24
|
|
|
2269 |
msgid "Create A New Job"
|
2270 |
msgstr ""
|
2271 |
|
2272 |
#: templates/job-submit.php:54
|
|
|
2273 |
msgid "Company Details"
|
2274 |
msgstr ""
|
2275 |
|
2276 |
#: templates/job-submit.php:79
|
|
|
2277 |
msgid "Save Draft"
|
2278 |
msgstr ""
|
2279 |
|
@@ -2284,6 +2780,7 @@ msgstr ""
|
|
2284 |
|
2285 |
#. translators: Placeholder %s is the job listing post type name.
|
2286 |
#: templates/job-submitted.php:35
|
|
|
2287 |
msgid "%s submitted successfully. Your listing will be visible once approved."
|
2288 |
msgstr ""
|
2289 |
|
@@ -2296,139 +2793,224 @@ msgstr ""
|
|
2296 |
msgid " <a href=\"%s\"> %s</a>"
|
2297 |
msgstr ""
|
2298 |
|
2299 |
-
#. translators:
|
2300 |
-
#: wp-job-manager-
|
2301 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2302 |
msgstr ""
|
2303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2304 |
#: wp-job-manager-functions.php:359
|
2305 |
msgctxt "post status"
|
2306 |
msgid "Draft"
|
2307 |
msgstr ""
|
2308 |
|
|
|
2309 |
#: wp-job-manager-functions.php:362
|
2310 |
msgctxt "post status"
|
2311 |
msgid "Pending approval"
|
2312 |
msgstr ""
|
2313 |
|
|
|
2314 |
#: wp-job-manager-functions.php:363
|
2315 |
msgctxt "post status"
|
2316 |
msgid "Pending payment"
|
2317 |
msgstr ""
|
2318 |
|
|
|
2319 |
#: wp-job-manager-functions.php:364
|
2320 |
msgctxt "post status"
|
2321 |
msgid "Active"
|
2322 |
msgstr ""
|
2323 |
|
|
|
2324 |
#: wp-job-manager-functions.php:485
|
2325 |
msgid "Reset"
|
2326 |
msgstr ""
|
2327 |
|
|
|
2328 |
#: wp-job-manager-functions.php:489
|
2329 |
msgid "RSS"
|
2330 |
msgstr ""
|
2331 |
|
|
|
2332 |
#: wp-job-manager-functions.php:597
|
2333 |
msgid "Invalid email address."
|
2334 |
msgstr ""
|
2335 |
|
|
|
2336 |
#: wp-job-manager-functions.php:605
|
2337 |
msgid "Your email address isn’t correct."
|
2338 |
msgstr ""
|
2339 |
|
|
|
2340 |
#: wp-job-manager-functions.php:609
|
2341 |
msgid "This email is already registered, please choose another one."
|
2342 |
msgstr ""
|
2343 |
|
|
|
2344 |
#: wp-job-manager-functions.php:920
|
2345 |
msgid "Full Time"
|
2346 |
msgstr ""
|
2347 |
|
|
|
2348 |
#: wp-job-manager-functions.php:921
|
2349 |
msgid "Part Time"
|
2350 |
msgstr ""
|
2351 |
|
|
|
2352 |
#: wp-job-manager-functions.php:922
|
2353 |
msgid "Contractor"
|
2354 |
msgstr ""
|
2355 |
|
|
|
2356 |
#: wp-job-manager-functions.php:923
|
2357 |
msgid "Temporary"
|
2358 |
msgstr ""
|
2359 |
|
|
|
2360 |
#: wp-job-manager-functions.php:924
|
2361 |
msgid "Intern"
|
2362 |
msgstr ""
|
2363 |
|
|
|
2364 |
#: wp-job-manager-functions.php:925
|
2365 |
msgid "Volunteer"
|
2366 |
msgstr ""
|
2367 |
|
|
|
2368 |
#: wp-job-manager-functions.php:926
|
2369 |
msgid "Per Diem"
|
2370 |
msgstr ""
|
2371 |
|
|
|
2372 |
#: wp-job-manager-functions.php:927
|
2373 |
msgid "Other"
|
2374 |
msgstr ""
|
2375 |
|
|
|
2376 |
#: wp-job-manager-functions.php:994
|
2377 |
msgid "Passwords must be at least 8 characters long."
|
2378 |
msgstr ""
|
2379 |
|
|
|
2380 |
#: wp-job-manager-functions.php:1159
|
2381 |
msgid "Choose a category…"
|
2382 |
msgstr ""
|
2383 |
|
2384 |
#. translators: %s is the list of allowed file types.
|
|
|
2385 |
#: wp-job-manager-functions.php:1396
|
2386 |
msgid "Uploaded files need to be one of the following file types: %s"
|
2387 |
msgstr ""
|
2388 |
|
|
|
2389 |
#: wp-job-manager-template.php:155
|
2390 |
msgid "Inactive"
|
2391 |
msgstr ""
|
2392 |
|
2393 |
#. translators: %1$s is the job listing title; %2$s is the URL for the current WordPress instance.
|
|
|
2394 |
#: wp-job-manager-template.php:249
|
2395 |
msgid "Application via %1$s listing on %2$s"
|
2396 |
msgstr ""
|
2397 |
|
2398 |
-
#: wp-job-manager-template.php:
|
2399 |
-
msgid "Your email"
|
2400 |
-
msgstr ""
|
2401 |
-
|
2402 |
-
#: wp-job-manager-template.php:708
|
2403 |
-
msgid "you@yourdomain.com"
|
2404 |
-
msgstr ""
|
2405 |
-
|
2406 |
#: wp-job-manager-template.php:716
|
2407 |
msgid "Username"
|
2408 |
msgstr ""
|
2409 |
|
|
|
2410 |
#: wp-job-manager-template.php:725
|
2411 |
msgid "Password"
|
2412 |
msgstr ""
|
2413 |
|
|
|
2414 |
#: wp-job-manager-template.php:735
|
2415 |
msgid "Verify Password"
|
2416 |
msgstr ""
|
2417 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2418 |
#: wp-job-manager-template.php:762
|
2419 |
msgid "Posted on "
|
2420 |
msgstr ""
|
2421 |
|
2422 |
#. translators: Placeholder %s is the relative, human readable time since the job listing was posted.
|
|
|
|
|
2423 |
#: wp-job-manager-template.php:765
|
2424 |
#: wp-job-manager-template.php:786
|
2425 |
msgid "Posted %s ago"
|
2426 |
msgstr ""
|
2427 |
|
2428 |
-
#: wp-job-manager-template.php:801
|
2429 |
-
msgid "Remote"
|
2430 |
-
msgstr ""
|
2431 |
-
|
2432 |
#: wp-job-manager-template.php:825
|
2433 |
msgid "Anywhere"
|
2434 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Copyright (C) 2022 Automattic
|
2 |
+
# This file is distributed under the same license as the WP Job Manager plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WP Job Manager 1.36.2\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-job-manager/\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2022-06-21T19:39:41+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
+
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: wp-job-manager\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
18 |
#: includes/class-wp-job-manager-data-exporter.php:27
|
19 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-data-exporter.php:27
|
20 |
msgid "WP Job Manager"
|
21 |
msgstr ""
|
22 |
|
34 |
msgstr ""
|
35 |
|
36 |
#: includes/3rd-party/wpml.php:94
|
37 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/3rd-party/wpml.php:94
|
38 |
msgid "Page Not Set"
|
39 |
msgstr ""
|
40 |
|
41 |
#. translators: Placeholder (%s) is the URL to edit the primary language in WPML.
|
42 |
#: includes/3rd-party/wpml.php:108
|
43 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/3rd-party/wpml.php:108
|
44 |
msgid "<a href=\"%s\">Switch to primary language</a> to edit this setting."
|
45 |
msgstr ""
|
46 |
|
48 |
#. translators: %s is the name of the form validation that failed.
|
49 |
#: includes/abstracts/abstract-wp-job-manager-form.php:389
|
50 |
#: includes/abstracts/abstract-wp-job-manager-form.php:405
|
51 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/abstracts/abstract-wp-job-manager-form.php:371
|
52 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/abstracts/abstract-wp-job-manager-form.php:387
|
53 |
msgid "\"%s\" check failed. Please try again."
|
54 |
msgstr ""
|
55 |
|
69 |
#: includes/admin/class-wp-job-manager-addons.php:125
|
70 |
#: includes/admin/class-wp-job-manager-admin.php:134
|
71 |
#: includes/admin/views/html-admin-page-addons.php:12
|
72 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-addons.php:125
|
73 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin.php:139
|
74 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-page-addons.php:12
|
75 |
msgid "WP Job Manager Add-ons"
|
76 |
msgstr ""
|
77 |
|
78 |
#: includes/admin/class-wp-job-manager-addons.php:133
|
79 |
#: includes/helper/views/html-licences.php:12
|
80 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-addons.php:133
|
81 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/views/html-licences.php:12
|
82 |
msgid "Licenses"
|
83 |
msgstr ""
|
84 |
|
85 |
#: includes/admin/class-wp-job-manager-admin-notices.php:109
|
86 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin-notices.php:109
|
87 |
msgid "Action failed. Please refresh the page and retry."
|
88 |
msgstr ""
|
89 |
|
90 |
#: includes/admin/class-wp-job-manager-admin-notices.php:113
|
91 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin-notices.php:113
|
92 |
msgid "You don’t have permission to do this."
|
93 |
msgstr ""
|
94 |
|
95 |
#: includes/admin/class-wp-job-manager-admin.php:110
|
96 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin.php:105
|
97 |
msgctxt "user selection"
|
98 |
msgid "No matches found"
|
99 |
msgstr ""
|
100 |
|
101 |
#: includes/admin/class-wp-job-manager-admin.php:111
|
102 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin.php:106
|
103 |
msgctxt "user selection"
|
104 |
msgid "Loading failed"
|
105 |
msgstr ""
|
106 |
|
107 |
#: includes/admin/class-wp-job-manager-admin.php:112
|
108 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin.php:107
|
109 |
msgctxt "user selection"
|
110 |
msgid "Please enter 1 or more characters"
|
111 |
msgstr ""
|
112 |
|
113 |
#: includes/admin/class-wp-job-manager-admin.php:113
|
114 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin.php:108
|
115 |
msgctxt "user selection"
|
116 |
msgid "Please enter %qty% or more characters"
|
117 |
msgstr ""
|
118 |
|
119 |
#: includes/admin/class-wp-job-manager-admin.php:114
|
120 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin.php:109
|
121 |
msgctxt "user selection"
|
122 |
msgid "Loading more results…"
|
123 |
msgstr ""
|
124 |
|
125 |
#: includes/admin/class-wp-job-manager-admin.php:115
|
126 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin.php:110
|
127 |
msgctxt "user selection"
|
128 |
msgid "Searching…"
|
129 |
msgstr ""
|
130 |
|
131 |
#: includes/admin/class-wp-job-manager-admin.php:131
|
132 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin.php:136
|
133 |
msgid "Settings"
|
134 |
msgstr ""
|
135 |
|
136 |
#: includes/admin/class-wp-job-manager-admin.php:134
|
137 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin.php:139
|
138 |
msgid "Add-ons"
|
139 |
msgstr ""
|
140 |
|
141 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
142 |
#: includes/admin/class-wp-job-manager-cpt.php:81
|
143 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:81
|
144 |
msgid "Approve %s"
|
145 |
msgstr ""
|
146 |
|
147 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
148 |
#: includes/admin/class-wp-job-manager-cpt.php:83
|
149 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:83
|
150 |
msgid "%s approved"
|
151 |
msgstr ""
|
152 |
|
153 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
154 |
#: includes/admin/class-wp-job-manager-cpt.php:88
|
155 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:88
|
156 |
msgid "Expire %s"
|
157 |
msgstr ""
|
158 |
|
159 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
160 |
#: includes/admin/class-wp-job-manager-cpt.php:90
|
161 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:90
|
162 |
msgid "%s expired"
|
163 |
msgstr ""
|
164 |
|
165 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
166 |
#: includes/admin/class-wp-job-manager-cpt.php:95
|
167 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:95
|
168 |
msgid "Mark %s Filled"
|
169 |
msgstr ""
|
170 |
|
171 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
172 |
#: includes/admin/class-wp-job-manager-cpt.php:97
|
173 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:97
|
174 |
msgid "%s marked as filled"
|
175 |
msgstr ""
|
176 |
|
177 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
178 |
#: includes/admin/class-wp-job-manager-cpt.php:102
|
179 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:102
|
180 |
msgid "Mark %s Not Filled"
|
181 |
msgstr ""
|
182 |
|
183 |
#. translators: Placeholder (%s) is the plural name of the job listings post type.
|
184 |
#: includes/admin/class-wp-job-manager-cpt.php:104
|
185 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:104
|
186 |
msgid "%s marked as not filled"
|
187 |
msgstr ""
|
188 |
|
189 |
#: includes/admin/class-wp-job-manager-cpt.php:341
|
190 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:337
|
191 |
msgid "Select category"
|
192 |
msgstr ""
|
193 |
|
194 |
#: includes/admin/class-wp-job-manager-cpt.php:366
|
195 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:362
|
196 |
msgid "Select Filled"
|
197 |
msgstr ""
|
198 |
|
199 |
#: includes/admin/class-wp-job-manager-cpt.php:370
|
200 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:366
|
201 |
msgid "Filled"
|
202 |
msgstr ""
|
203 |
|
204 |
#: includes/admin/class-wp-job-manager-cpt.php:374
|
205 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:370
|
206 |
msgid "Not Filled"
|
207 |
msgstr ""
|
208 |
|
209 |
#: includes/admin/class-wp-job-manager-cpt.php:385
|
210 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:381
|
211 |
msgid "Select Featured"
|
212 |
msgstr ""
|
213 |
|
214 |
#: includes/admin/class-wp-job-manager-cpt.php:389
|
215 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:385
|
216 |
msgid "Featured"
|
217 |
msgstr ""
|
218 |
|
219 |
#: includes/admin/class-wp-job-manager-cpt.php:393
|
220 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:389
|
221 |
msgid "Not Featured"
|
222 |
msgstr ""
|
223 |
|
224 |
#: includes/admin/class-wp-job-manager-cpt.php:439
|
225 |
#: includes/admin/class-wp-job-manager-cpt.php:499
|
226 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:435
|
227 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:495
|
228 |
msgid "Position"
|
229 |
msgstr ""
|
230 |
|
231 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to view the listing.
|
232 |
#: includes/admin/class-wp-job-manager-cpt.php:459
|
233 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:455
|
234 |
msgid "%1$s updated. <a href=\"%2$s\">View</a>"
|
235 |
msgstr ""
|
236 |
|
237 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to view the listing.
|
238 |
#: includes/admin/class-wp-job-manager-cpt.php:460
|
239 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:456
|
240 |
msgid "Custom field updated."
|
241 |
msgstr ""
|
242 |
|
243 |
#: includes/admin/class-wp-job-manager-cpt.php:461
|
244 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:457
|
245 |
msgid "Custom field deleted."
|
246 |
msgstr ""
|
247 |
|
248 |
#. translators: %s is the singular name of the job listing post type.
|
249 |
#: includes/admin/class-wp-job-manager-cpt.php:463
|
250 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:459
|
251 |
msgid "%s updated."
|
252 |
msgstr ""
|
253 |
|
254 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the revision number.
|
255 |
#: includes/admin/class-wp-job-manager-cpt.php:465
|
256 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:461
|
257 |
msgid "%1$s restored to revision from %2$s"
|
258 |
msgstr ""
|
259 |
|
260 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to view the listing.
|
261 |
#: includes/admin/class-wp-job-manager-cpt.php:467
|
262 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:463
|
263 |
msgid "%1$s published. <a href=\"%2$s\">View</a>"
|
264 |
msgstr ""
|
265 |
|
266 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to view the listing.
|
267 |
#: includes/admin/class-wp-job-manager-cpt.php:469
|
268 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:465
|
269 |
msgid "%s saved."
|
270 |
msgstr ""
|
271 |
|
272 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to preview the listing.
|
273 |
#: includes/admin/class-wp-job-manager-cpt.php:471
|
274 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:467
|
275 |
msgid "%1$s submitted. <a target=\"_blank\" href=\"%2$s\">Preview</a>"
|
276 |
msgstr ""
|
277 |
|
278 |
#. translators: %1$s is the singular name of the post type; %2$s is the date the post will be published; %3$s is the URL to preview the listing.
|
279 |
#: includes/admin/class-wp-job-manager-cpt.php:474
|
280 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:470
|
281 |
msgid "%1$s scheduled for: <strong>%2$s</strong>. <a target=\"_blank\" href=\"%3$s\">Preview</a>"
|
282 |
msgstr ""
|
283 |
|
284 |
#. translators: %1$s is the singular name of the job listing post type; %2$s is the URL to view the listing.
|
285 |
#: includes/admin/class-wp-job-manager-cpt.php:480
|
286 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:476
|
287 |
msgid "%1$s draft updated. <a target=\"_blank\" href=\"%2$s\">Preview</a>"
|
288 |
msgstr ""
|
289 |
|
290 |
#: includes/admin/class-wp-job-manager-cpt.php:500
|
291 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:496
|
292 |
msgid "Type"
|
293 |
msgstr ""
|
294 |
|
300 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:46
|
301 |
#: templates/job-filters.php:35
|
302 |
#: templates/job-filters.php:36
|
303 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:497
|
304 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:238
|
305 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1222
|
306 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:213
|
307 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-recent-jobs.php:46
|
308 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-filters.php:35
|
309 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-filters.php:36
|
310 |
msgid "Location"
|
311 |
msgstr ""
|
312 |
|
313 |
#: includes/admin/class-wp-job-manager-cpt.php:502
|
314 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:498
|
315 |
msgid "Status"
|
316 |
msgstr ""
|
317 |
|
318 |
#: includes/admin/class-wp-job-manager-cpt.php:503
|
319 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:499
|
320 |
msgid "Posted"
|
321 |
msgstr ""
|
322 |
|
323 |
#: includes/admin/class-wp-job-manager-cpt.php:504
|
324 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:500
|
325 |
msgid "Expires"
|
326 |
msgstr ""
|
327 |
|
328 |
#: includes/admin/class-wp-job-manager-cpt.php:505
|
329 |
+
#: includes/admin/class-wp-job-manager-settings.php:182
|
330 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:501
|
331 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:162
|
332 |
msgid "Categories"
|
333 |
msgstr ""
|
334 |
|
335 |
#: includes/admin/class-wp-job-manager-cpt.php:506
|
336 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:502
|
337 |
msgid "Featured?"
|
338 |
msgstr ""
|
339 |
|
340 |
#: includes/admin/class-wp-job-manager-cpt.php:507
|
341 |
#: includes/class-wp-job-manager-shortcodes.php:393
|
342 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:503
|
343 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:257
|
344 |
msgid "Filled?"
|
345 |
msgstr ""
|
346 |
|
347 |
#: includes/admin/class-wp-job-manager-cpt.php:508
|
348 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:504
|
349 |
msgid "Actions"
|
350 |
msgstr ""
|
351 |
|
352 |
#. translators: %d is the post ID for the job listing.
|
353 |
#: includes/admin/class-wp-job-manager-cpt.php:573
|
354 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:569
|
355 |
msgid "ID: %d"
|
356 |
msgstr ""
|
357 |
|
361 |
|
362 |
#. translators: %s placeholder is the username of the user.
|
363 |
#: includes/admin/class-wp-job-manager-cpt.php:617
|
364 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:613
|
365 |
msgid "by a guest"
|
366 |
msgstr ""
|
367 |
|
368 |
#. translators: %s placeholder is the username of the user.
|
369 |
#: includes/admin/class-wp-job-manager-cpt.php:617
|
370 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:613
|
371 |
msgid "by %s"
|
372 |
msgstr ""
|
373 |
|
374 |
#: includes/admin/class-wp-job-manager-cpt.php:637
|
375 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:632
|
376 |
msgid "Approve"
|
377 |
msgstr ""
|
378 |
|
379 |
#: includes/admin/class-wp-job-manager-cpt.php:645
|
380 |
#: includes/admin/class-wp-job-manager-writepanels.php:323
|
381 |
#: includes/admin/class-wp-job-manager-writepanels.php:373
|
382 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:640
|
383 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:227
|
384 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:232
|
385 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:237
|
386 |
msgid "View"
|
387 |
msgstr ""
|
388 |
|
391 |
#: includes/class-wp-job-manager-post-types.php:340
|
392 |
#: includes/class-wp-job-manager-shortcodes.php:441
|
393 |
#: includes/class-wp-job-manager-shortcodes.php:474
|
394 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:647
|
395 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:334
|
396 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard.php:52
|
397 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard.php:70
|
398 |
msgid "Edit"
|
399 |
msgstr ""
|
400 |
|
401 |
#: includes/admin/class-wp-job-manager-cpt.php:659
|
402 |
#: includes/class-wp-job-manager-shortcodes.php:489
|
403 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-cpt.php:654
|
404 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard.php:79
|
405 |
msgid "Delete"
|
406 |
msgstr ""
|
407 |
|
408 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:64
|
409 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-permalink-settings.php:64
|
410 |
msgid "Job base"
|
411 |
msgstr ""
|
412 |
|
413 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:71
|
414 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-permalink-settings.php:71
|
415 |
msgid "Job category base"
|
416 |
msgstr ""
|
417 |
|
418 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:78
|
419 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-permalink-settings.php:78
|
420 |
msgid "Job type base"
|
421 |
msgstr ""
|
422 |
|
423 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:86
|
424 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-permalink-settings.php:86
|
425 |
msgid "Job listing archive page"
|
426 |
msgstr ""
|
427 |
|
428 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:108
|
429 |
#: includes/class-wp-job-manager-post-types.php:1179
|
430 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-permalink-settings.php:108
|
431 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:945
|
432 |
msgctxt "Job permalink - resave permalinks after changing this"
|
433 |
msgid "job"
|
434 |
msgstr ""
|
435 |
|
436 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:117
|
437 |
#: includes/class-wp-job-manager-post-types.php:1180
|
438 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-permalink-settings.php:117
|
439 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:946
|
440 |
msgctxt "Job category slug - resave permalinks after changing this"
|
441 |
msgid "job-category"
|
442 |
msgstr ""
|
443 |
|
444 |
#: includes/admin/class-wp-job-manager-permalink-settings.php:126
|
445 |
#: includes/class-wp-job-manager-post-types.php:1181
|
446 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-permalink-settings.php:126
|
447 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:947
|
448 |
msgctxt "Job type slug - resave permalinks after changing this"
|
449 |
msgid "job-type"
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: includes/admin/class-wp-job-manager-settings.php:89
|
453 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:89
|
454 |
msgid "General"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: includes/admin/class-wp-job-manager-settings.php:94
|
458 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:94
|
459 |
msgid "Date Format"
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: includes/admin/class-wp-job-manager-settings.php:95
|
463 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:95
|
464 |
msgid "Choose how you want the published date for jobs to be displayed on the front-end."
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: includes/admin/class-wp-job-manager-settings.php:98
|
468 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:98
|
469 |
msgid "Relative to the current date (e.g., 1 day, 1 week, 1 month ago)"
|
470 |
msgstr ""
|
471 |
|
472 |
+
#: includes/admin/class-wp-job-manager-settings.php:99
|
473 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:99
|
474 |
msgid "Default date format as defined in Settings"
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: includes/admin/class-wp-job-manager-settings.php:105
|
478 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:105
|
479 |
msgid "Google Maps API Key"
|
480 |
msgstr ""
|
481 |
|
482 |
#. translators: Placeholder %s is URL to set up a Google Maps API key.
|
483 |
+
#: includes/admin/class-wp-job-manager-settings.php:107
|
484 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:107
|
485 |
msgid "Google requires an API key to retrieve location information for job listings. Acquire an API key from the <a href=\"%s\">Google Maps API developer site</a>."
|
486 |
msgstr ""
|
487 |
|
488 |
+
#: includes/admin/class-wp-job-manager-settings.php:113
|
489 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:113
|
490 |
msgid "Delete Data On Uninstall"
|
491 |
msgstr ""
|
492 |
|
493 |
+
#: includes/admin/class-wp-job-manager-settings.php:114
|
494 |
msgid "Delete WP Job Manager data when the plugin is deleted. Once the plugin is uninstalled, only job listings can be restored (30 days)."
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: includes/admin/class-wp-job-manager-settings.php:122
|
498 |
msgid "Bypass Trash For Job Listings"
|
499 |
msgstr ""
|
500 |
|
501 |
+
#: includes/admin/class-wp-job-manager-settings.php:123
|
502 |
msgid "If checked, when the plugin is uninstalled, job listings will be permanently deleted immediately."
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: includes/admin/class-wp-job-manager-settings.php:131
|
506 |
#: includes/class-wp-job-manager-post-types.php:334
|
507 |
#: includes/class-wp-job-manager-post-types.php:437
|
508 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:122
|
509 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:328
|
510 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:430
|
511 |
msgid "Job Listings"
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: includes/admin/class-wp-job-manager-settings.php:137
|
515 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:128
|
516 |
msgid "Listings Per Page"
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: includes/admin/class-wp-job-manager-settings.php:138
|
520 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:129
|
521 |
msgid "Number of job listings to display per page."
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: includes/admin/class-wp-job-manager-settings.php:144
|
525 |
msgid "Pagination Type"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: includes/admin/class-wp-job-manager-settings.php:145
|
529 |
msgid "Determines whether to show page numbered links or a Load More Listings button."
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: includes/admin/class-wp-job-manager-settings.php:148
|
533 |
msgid "Load More Listings button"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: includes/admin/class-wp-job-manager-settings.php:149
|
537 |
msgid "Page numbered links"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: includes/admin/class-wp-job-manager-settings.php:155
|
541 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:135
|
542 |
msgid "Filled Positions"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: includes/admin/class-wp-job-manager-settings.php:156
|
546 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:136
|
547 |
msgid "Hide filled positions"
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: includes/admin/class-wp-job-manager-settings.php:157
|
551 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:137
|
552 |
msgid "Filled positions will not display in your archives."
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: includes/admin/class-wp-job-manager-settings.php:164
|
556 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:144
|
557 |
msgid "Hide Expired Listings"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: includes/admin/class-wp-job-manager-settings.php:165
|
561 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:145
|
562 |
msgid "Hide expired listings in job archives/search"
|
563 |
msgstr ""
|
564 |
|
565 |
+
#: includes/admin/class-wp-job-manager-settings.php:166
|
566 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:146
|
567 |
msgid "Expired job listings will not be searchable."
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: includes/admin/class-wp-job-manager-settings.php:173
|
571 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:153
|
572 |
msgid "Hide Expired Listings Content"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: includes/admin/class-wp-job-manager-settings.php:174
|
576 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:154
|
577 |
msgid "Hide content in expired single job listings"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: includes/admin/class-wp-job-manager-settings.php:175
|
581 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:155
|
582 |
msgid "Your site will display the titles of expired listings, but not the content of the listings. Otherwise, expired listings display their full content minus the application area."
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: includes/admin/class-wp-job-manager-settings.php:183
|
586 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:163
|
587 |
msgid "Enable listing categories"
|
588 |
msgstr ""
|
589 |
|
590 |
+
#: includes/admin/class-wp-job-manager-settings.php:184
|
591 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:164
|
592 |
msgid "This lets users select from a list of categories when submitting a job. Note: an admin has to create categories before site users can select them."
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: includes/admin/class-wp-job-manager-settings.php:191
|
596 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:171
|
597 |
msgid "Multi-select Categories"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: includes/admin/class-wp-job-manager-settings.php:192
|
601 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:172
|
602 |
msgid "Default to category multiselect"
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: includes/admin/class-wp-job-manager-settings.php:193
|
606 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:173
|
607 |
msgid "The category selection box will default to allowing multiple selections on the [jobs] shortcode. Without this, visitors will only be able to select a single category when filtering jobs."
|
608 |
msgstr ""
|
609 |
|
610 |
+
#: includes/admin/class-wp-job-manager-settings.php:200
|
611 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:180
|
612 |
msgid "Category Filter Type"
|
613 |
msgstr ""
|
614 |
|
615 |
+
#: includes/admin/class-wp-job-manager-settings.php:201
|
616 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:181
|
617 |
msgid "Determines the logic used to display jobs when selecting multiple categories."
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: includes/admin/class-wp-job-manager-settings.php:204
|
621 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:184
|
622 |
msgid "Jobs will be shown if within ANY selected category"
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: includes/admin/class-wp-job-manager-settings.php:205
|
626 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:185
|
627 |
msgid "Jobs will be shown if within ALL selected categories"
|
628 |
msgstr ""
|
629 |
|
630 |
+
#: includes/admin/class-wp-job-manager-settings.php:211
|
631 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:191
|
632 |
msgid "Types"
|
633 |
msgstr ""
|
634 |
|
635 |
+
#: includes/admin/class-wp-job-manager-settings.php:212
|
636 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:192
|
637 |
msgid "Enable listing types"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: includes/admin/class-wp-job-manager-settings.php:213
|
641 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:193
|
642 |
msgid "This lets users select from a list of types when submitting a job. Note: an admin has to create types before site users can select them."
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: includes/admin/class-wp-job-manager-settings.php:220
|
646 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:200
|
647 |
msgid "Multi-select Listing Types"
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: includes/admin/class-wp-job-manager-settings.php:221
|
651 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:201
|
652 |
msgid "Allow multiple types for listings"
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: includes/admin/class-wp-job-manager-settings.php:222
|
656 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:202
|
657 |
msgid "This allows users to select more than one type when submitting a job. The metabox on the post editor and the selection box on the front-end job submission form will both reflect this."
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: includes/admin/class-wp-job-manager-settings.php:229
|
661 |
#: includes/admin/class-wp-job-manager-writepanels.php:114
|
662 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:269
|
663 |
msgid "Salary"
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: includes/admin/class-wp-job-manager-settings.php:230
|
667 |
msgid "Enable Job Salary"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: includes/admin/class-wp-job-manager-settings.php:231
|
671 |
msgid "This lets users add a salary when submitting a job."
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: includes/admin/class-wp-job-manager-settings.php:238
|
675 |
msgid "Location Display"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: includes/admin/class-wp-job-manager-settings.php:239
|
679 |
msgid "Display Location Address"
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: includes/admin/class-wp-job-manager-settings.php:240
|
683 |
msgid "Display the full address of the job listing location if it is detected by Google Maps Geocoding API. If full address is not available then it will display whatever text the user submitted for the location."
|
684 |
msgstr ""
|
685 |
|
686 |
+
#: includes/admin/class-wp-job-manager-settings.php:246
|
687 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:209
|
688 |
msgid "Job Submission"
|
689 |
msgstr ""
|
690 |
|
691 |
+
#: includes/admin/class-wp-job-manager-settings.php:251
|
692 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:214
|
693 |
msgid "Account Required"
|
694 |
msgstr ""
|
695 |
|
696 |
+
#: includes/admin/class-wp-job-manager-settings.php:252
|
697 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:215
|
698 |
msgid "Require an account to submit listings"
|
699 |
msgstr ""
|
700 |
|
701 |
+
#: includes/admin/class-wp-job-manager-settings.php:253
|
702 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:216
|
703 |
msgid "Limits job listing submissions to registered, logged-in users."
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: includes/admin/class-wp-job-manager-settings.php:260
|
707 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:223
|
708 |
msgid "Account Creation"
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: includes/admin/class-wp-job-manager-settings.php:261
|
712 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:224
|
713 |
msgid "Enable account creation during submission"
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: includes/admin/class-wp-job-manager-settings.php:262
|
717 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:225
|
718 |
msgid "Includes account creation on the listing submission form, to allow non-registered users to create an account and submit a job listing simultaneously."
|
719 |
msgstr ""
|
720 |
|
721 |
+
#: includes/admin/class-wp-job-manager-settings.php:269
|
722 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:232
|
723 |
msgid "Account Username"
|
724 |
msgstr ""
|
725 |
|
726 |
+
#: includes/admin/class-wp-job-manager-settings.php:270
|
727 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:233
|
728 |
msgid "Generate usernames from email addresses"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: includes/admin/class-wp-job-manager-settings.php:271
|
732 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:234
|
733 |
msgid "Automatically generates usernames for new accounts from the registrant's email address. If this is not enabled, a \"username\" field will display instead."
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: includes/admin/class-wp-job-manager-settings.php:278
|
737 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:241
|
738 |
msgid "Account Password"
|
739 |
msgstr ""
|
740 |
|
741 |
+
#: includes/admin/class-wp-job-manager-settings.php:279
|
742 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:242
|
743 |
msgid "Email new users a link to set a password"
|
744 |
msgstr ""
|
745 |
|
746 |
+
#: includes/admin/class-wp-job-manager-settings.php:280
|
747 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:243
|
748 |
msgid "Sends an email to the user with their username and a link to set their password. If this is not enabled, a \"password\" field will display instead, and their email address won't be verified."
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: includes/admin/class-wp-job-manager-settings.php:287
|
752 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:250
|
753 |
msgid "Account Role"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: includes/admin/class-wp-job-manager-settings.php:288
|
757 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:251
|
758 |
msgid "Any new accounts created during submission will have this role. If you haven't enabled account creation during submission in the options above, your own method of assigning roles will apply."
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: includes/admin/class-wp-job-manager-settings.php:295
|
762 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:258
|
763 |
msgid "Moderate New Listings"
|
764 |
msgstr ""
|
765 |
|
766 |
+
#: includes/admin/class-wp-job-manager-settings.php:296
|
767 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:259
|
768 |
msgid "Require admin approval of all new listing submissions"
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: includes/admin/class-wp-job-manager-settings.php:297
|
772 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:260
|
773 |
msgid "Sets all new submissions to \"pending.\" They will not appear on your site until an admin approves them."
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: includes/admin/class-wp-job-manager-settings.php:304
|
777 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:267
|
778 |
msgid "Allow Pending Edits"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: includes/admin/class-wp-job-manager-settings.php:305
|
782 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:268
|
783 |
msgid "Allow editing of pending listings"
|
784 |
msgstr ""
|
785 |
|
786 |
+
#: includes/admin/class-wp-job-manager-settings.php:306
|
787 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:269
|
788 |
msgid "Users can continue to edit pending listings until they are approved by an admin."
|
789 |
msgstr ""
|
790 |
|
791 |
+
#: includes/admin/class-wp-job-manager-settings.php:313
|
792 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:276
|
793 |
msgid "Allow Published Edits"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: includes/admin/class-wp-job-manager-settings.php:314
|
797 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:277
|
798 |
msgid "Allow editing of published listings"
|
799 |
msgstr ""
|
800 |
|
801 |
+
#: includes/admin/class-wp-job-manager-settings.php:315
|
802 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:278
|
803 |
msgid "Choose whether published job listings can be edited and if edits require admin approval. When moderation is required, the original job listings will be unpublished while edits await admin approval."
|
804 |
msgstr ""
|
805 |
|
806 |
+
#: includes/admin/class-wp-job-manager-settings.php:318
|
807 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:281
|
808 |
msgid "Users cannot edit"
|
809 |
msgstr ""
|
810 |
|
811 |
+
#: includes/admin/class-wp-job-manager-settings.php:319
|
812 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:282
|
813 |
msgid "Users can edit without admin approval"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: includes/admin/class-wp-job-manager-settings.php:320
|
817 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:283
|
818 |
msgid "Users can edit, but edits require admin approval"
|
819 |
msgstr ""
|
820 |
|
821 |
+
#: includes/admin/class-wp-job-manager-settings.php:327
|
822 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:290
|
823 |
msgid "Listing Duration"
|
824 |
msgstr ""
|
825 |
|
826 |
+
#: includes/admin/class-wp-job-manager-settings.php:328
|
827 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:291
|
828 |
msgid "Listings will display for the set number of days, then expire. Leave this field blank if you don't want listings to have an expiration date."
|
829 |
msgstr ""
|
830 |
|
831 |
+
#: includes/admin/class-wp-job-manager-settings.php:334
|
832 |
msgid "Listing Limit"
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: includes/admin/class-wp-job-manager-settings.php:335
|
836 |
msgid "How many listings are users allowed to post. Can be left blank to allow unlimited listings per account."
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: includes/admin/class-wp-job-manager-settings.php:337
|
840 |
msgid "No limit"
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: includes/admin/class-wp-job-manager-settings.php:342
|
844 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:297
|
845 |
msgid "Application Method"
|
846 |
msgstr ""
|
847 |
|
848 |
+
#: includes/admin/class-wp-job-manager-settings.php:343
|
849 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:298
|
850 |
msgid "Choose the application method job listers will need to provide. Specify URL or email address only, or allow listers to choose which they prefer."
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: includes/admin/class-wp-job-manager-settings.php:346
|
854 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:301
|
855 |
msgid "Email address or website URL"
|
856 |
msgstr ""
|
857 |
|
858 |
+
#: includes/admin/class-wp-job-manager-settings.php:347
|
859 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:302
|
860 |
msgid "Email addresses only"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: includes/admin/class-wp-job-manager-settings.php:348
|
864 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:303
|
865 |
msgid "Website URLs only"
|
866 |
msgstr ""
|
867 |
|
868 |
+
#: includes/admin/class-wp-job-manager-settings.php:354
|
869 |
msgid "Terms and Conditions Checkbox"
|
870 |
msgstr ""
|
871 |
|
872 |
+
#: includes/admin/class-wp-job-manager-settings.php:355
|
873 |
msgid "Enable required Terms and Conditions checkbox on the form"
|
874 |
msgstr ""
|
875 |
|
876 |
+
#: includes/admin/class-wp-job-manager-settings.php:356
|
877 |
msgid "Require a Terms and Conditions checkbox to be marked before a job can be submitted. The linked page can be set from the <a href=\"#settings-job_pages\" class=\"nav-internal\">Pages</a> settings tab."
|
878 |
msgstr ""
|
879 |
|
880 |
+
#: includes/admin/class-wp-job-manager-settings.php:363
|
881 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:309
|
882 |
msgid "reCAPTCHA"
|
883 |
msgstr ""
|
884 |
|
885 |
+
#: includes/admin/class-wp-job-manager-settings.php:367
|
886 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:313
|
887 |
msgid "Are you human?"
|
888 |
msgstr ""
|
889 |
|
890 |
+
#: includes/admin/class-wp-job-manager-settings.php:369
|
891 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:315
|
892 |
msgid "Field Label"
|
893 |
msgstr ""
|
894 |
|
895 |
+
#: includes/admin/class-wp-job-manager-settings.php:370
|
896 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:316
|
897 |
msgid "The label used for the reCAPTCHA field on forms."
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: includes/admin/class-wp-job-manager-settings.php:377
|
901 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:323
|
902 |
msgid "Site Key"
|
903 |
msgstr ""
|
904 |
|
905 |
#. translators: Placeholder %s is URL to set up Google reCAPTCHA API key.
|
906 |
+
#: includes/admin/class-wp-job-manager-settings.php:379
|
907 |
msgid "You can retrieve your reCAPTCHA v2 \"I'm not a robot\" Checkbox site key from <a href=\"%s\">Google's reCAPTCHA admin dashboard</a>."
|
908 |
msgstr ""
|
909 |
|
910 |
+
#: includes/admin/class-wp-job-manager-settings.php:386
|
911 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:332
|
912 |
msgid "Secret Key"
|
913 |
msgstr ""
|
914 |
|
915 |
#. translators: Placeholder %s is URL to set up Google reCAPTCHA API key.
|
916 |
+
#: includes/admin/class-wp-job-manager-settings.php:388
|
917 |
msgid "You can retrieve your reCAPTCHA v2 \"I'm not a robot\" Checkbox secret key from <a href=\"%s\">Google's reCAPTCHA admin dashboard</a>."
|
918 |
msgstr ""
|
919 |
|
920 |
+
#: includes/admin/class-wp-job-manager-settings.php:394
|
921 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:340
|
922 |
msgid "Job Submission Form"
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: includes/admin/class-wp-job-manager-settings.php:395
|
926 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:341
|
927 |
msgid "Display a reCAPTCHA field on job submission form."
|
928 |
msgstr ""
|
929 |
|
930 |
+
#: includes/admin/class-wp-job-manager-settings.php:396
|
931 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:342
|
932 |
msgid "This will help prevent bots from submitting job listings. You must have entered a valid site key and secret key above."
|
933 |
msgstr ""
|
934 |
|
935 |
+
#: includes/admin/class-wp-job-manager-settings.php:403
|
936 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:349
|
937 |
msgid "Pages"
|
938 |
msgstr ""
|
939 |
|
940 |
+
#: includes/admin/class-wp-job-manager-settings.php:408
|
941 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:354
|
942 |
msgid "Submit Job Form Page"
|
943 |
msgstr ""
|
944 |
|
945 |
+
#: includes/admin/class-wp-job-manager-settings.php:409
|
946 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:355
|
947 |
msgid "Select the page where you've used the [submit_job_form] shortcode. This lets the plugin know the location of the form."
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: includes/admin/class-wp-job-manager-settings.php:415
|
951 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:361
|
952 |
msgid "Job Dashboard Page"
|
953 |
msgstr ""
|
954 |
|
955 |
+
#: includes/admin/class-wp-job-manager-settings.php:416
|
956 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:362
|
957 |
msgid "Select the page where you've used the [job_dashboard] shortcode. This lets the plugin know the location of the dashboard."
|
958 |
msgstr ""
|
959 |
|
960 |
+
#: includes/admin/class-wp-job-manager-settings.php:422
|
961 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:368
|
962 |
msgid "Job Listings Page"
|
963 |
msgstr ""
|
964 |
|
965 |
+
#: includes/admin/class-wp-job-manager-settings.php:423
|
966 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:369
|
967 |
msgid "Select the page where you've used the [jobs] shortcode. This lets the plugin know the location of the job listings page."
|
968 |
msgstr ""
|
969 |
|
970 |
+
#: includes/admin/class-wp-job-manager-settings.php:429
|
971 |
msgid "Terms and Conditions Page"
|
972 |
msgstr ""
|
973 |
|
974 |
+
#: includes/admin/class-wp-job-manager-settings.php:430
|
975 |
msgid "Select the page to link when \"Terms and Conditions Checkbox\" is enabled. See setting in \"Job Submission\" tab."
|
976 |
msgstr ""
|
977 |
|
978 |
+
#: includes/admin/class-wp-job-manager-settings.php:478
|
979 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:417
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
980 |
msgid "Settings successfully saved"
|
981 |
msgstr ""
|
982 |
|
983 |
+
#: includes/admin/class-wp-job-manager-settings.php:503
|
984 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:442
|
985 |
msgid "Save Changes"
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: includes/admin/class-wp-job-manager-settings.php:702
|
989 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:650
|
990 |
msgid "--no page--"
|
991 |
msgstr ""
|
992 |
|
993 |
+
#: includes/admin/class-wp-job-manager-settings.php:708
|
994 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:656
|
995 |
msgid "Select a page…"
|
996 |
msgstr ""
|
997 |
|
|
|
|
|
|
|
|
|
998 |
#: includes/admin/class-wp-job-manager-setup.php:58
|
999 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-setup.php:58
|
1000 |
msgid "Setup"
|
1001 |
msgstr ""
|
1002 |
|
1008 |
#: includes/admin/class-wp-job-manager-taxonomy-meta.php:110
|
1009 |
#: includes/admin/class-wp-job-manager-taxonomy-meta.php:129
|
1010 |
#: includes/class-wp-job-manager-post-types.php:293
|
1011 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-taxonomy-meta.php:87
|
1012 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-taxonomy-meta.php:110
|
1013 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-taxonomy-meta.php:129
|
1014 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:287
|
1015 |
msgid "Employment Type"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
#: includes/admin/class-wp-job-manager-writepanels.php:64
|
1019 |
#: includes/class-wp-job-manager-post-types.php:1499
|
1020 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:226
|
1021 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1223
|
1022 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:217
|
1023 |
msgid "e.g. \"London\""
|
1024 |
msgstr ""
|
1025 |
|
1026 |
#: includes/admin/class-wp-job-manager-writepanels.php:65
|
1027 |
#: includes/class-wp-job-manager-post-types.php:1500
|
1028 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1224
|
1029 |
msgid "Leave this blank if the location is not important."
|
1030 |
msgstr ""
|
1031 |
|
1036 |
|
1037 |
#: includes/admin/class-wp-job-manager-writepanels.php:70
|
1038 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:231
|
1039 |
+
msgid "Select if this is a remote position."
|
1040 |
msgstr ""
|
1041 |
|
1042 |
#: includes/admin/class-wp-job-manager-writepanels.php:75
|
1049 |
|
1050 |
#: includes/admin/class-wp-job-manager-writepanels.php:77
|
1051 |
#: includes/class-wp-job-manager-post-types.php:1509
|
1052 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1233
|
1053 |
msgid "This field is required for the \"application\" area to appear beneath the listing."
|
1054 |
msgstr ""
|
1055 |
|
1056 |
#: includes/admin/class-wp-job-manager-writepanels.php:82
|
1057 |
#: includes/class-wp-job-manager-data-exporter.php:52
|
1058 |
#: includes/class-wp-job-manager-post-types.php:1517
|
1059 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-data-exporter.php:52
|
1060 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1241
|
1061 |
msgid "Company Name"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
#: includes/admin/class-wp-job-manager-writepanels.php:87
|
1065 |
#: includes/class-wp-job-manager-data-exporter.php:53
|
1066 |
#: includes/class-wp-job-manager-post-types.php:1525
|
1067 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-data-exporter.php:53
|
1068 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1249
|
1069 |
msgid "Company Website"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
#: includes/admin/class-wp-job-manager-writepanels.php:92
|
1073 |
#: includes/class-wp-job-manager-data-exporter.php:54
|
1074 |
#: includes/class-wp-job-manager-post-types.php:1534
|
1075 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-data-exporter.php:54
|
1076 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1258
|
1077 |
msgid "Company Tagline"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
#: includes/admin/class-wp-job-manager-writepanels.php:93
|
1081 |
#: includes/class-wp-job-manager-post-types.php:1535
|
1082 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1259
|
1083 |
msgid "Brief description about the company"
|
1084 |
msgstr ""
|
1085 |
|
1086 |
#: includes/admin/class-wp-job-manager-writepanels.php:97
|
1087 |
#: includes/class-wp-job-manager-data-exporter.php:55
|
1088 |
#: includes/class-wp-job-manager-post-types.php:1542
|
1089 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-data-exporter.php:55
|
1090 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1266
|
1091 |
msgid "Company Twitter"
|
1092 |
msgstr ""
|
1093 |
|
1094 |
#: includes/admin/class-wp-job-manager-writepanels.php:102
|
1095 |
#: includes/class-wp-job-manager-data-exporter.php:56
|
1096 |
#: includes/class-wp-job-manager-post-types.php:1550
|
1097 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-data-exporter.php:56
|
1098 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1274
|
1099 |
msgid "Company Video"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
#: includes/admin/class-wp-job-manager-writepanels.php:103
|
1103 |
#: includes/class-wp-job-manager-post-types.php:1551
|
1104 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1275
|
1105 |
msgid "URL to the company video"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
#: includes/admin/class-wp-job-manager-writepanels.php:108
|
1109 |
#: includes/class-wp-job-manager-post-types.php:1560
|
1110 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1284
|
1111 |
msgid "Position Filled"
|
1112 |
msgstr ""
|
1113 |
|
1114 |
#: includes/admin/class-wp-job-manager-writepanels.php:111
|
1115 |
#: includes/class-wp-job-manager-post-types.php:1566
|
1116 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1290
|
1117 |
msgid "Filled listings will no longer accept applications."
|
1118 |
msgstr ""
|
1119 |
|
1123 |
|
1124 |
#: includes/admin/class-wp-job-manager-writepanels.php:127
|
1125 |
#: includes/class-wp-job-manager-post-types.php:1569
|
1126 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1293
|
1127 |
msgid "Featured Listing"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
#: includes/admin/class-wp-job-manager-writepanels.php:129
|
1131 |
#: includes/class-wp-job-manager-post-types.php:1571
|
1132 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1295
|
1133 |
msgid "Featured listings will be sticky during searches, and can be styled differently."
|
1134 |
msgstr ""
|
1135 |
|
1136 |
#: includes/admin/class-wp-job-manager-writepanels.php:134
|
1137 |
#: includes/class-wp-job-manager-post-types.php:1579
|
1138 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1303
|
1139 |
msgid "Listing Expiry Date"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
#: includes/admin/class-wp-job-manager-writepanels.php:144
|
1143 |
#: includes/class-wp-job-manager-email-notifications.php:324
|
1144 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:64
|
1145 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:292
|
1146 |
msgid "Posted by"
|
1147 |
msgstr ""
|
1148 |
|
1149 |
#. translators: Placeholder %s is the singular name for a job listing post type.
|
1150 |
#: includes/admin/class-wp-job-manager-writepanels.php:233
|
1151 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:150
|
1152 |
msgid "%s Data"
|
1153 |
msgstr ""
|
1154 |
|
1155 |
#: includes/admin/class-wp-job-manager-writepanels.php:312
|
1156 |
#: includes/admin/class-wp-job-manager-writepanels.php:373
|
1157 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:227
|
1158 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:232
|
1159 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:237
|
1160 |
msgid "Use file"
|
1161 |
msgstr ""
|
1162 |
|
1163 |
#: includes/admin/class-wp-job-manager-writepanels.php:313
|
1164 |
#: includes/admin/class-wp-job-manager-writepanels.php:373
|
1165 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:227
|
1166 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:232
|
1167 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:237
|
1168 |
msgid "Upload"
|
1169 |
msgstr ""
|
1170 |
|
1171 |
#: includes/admin/class-wp-job-manager-writepanels.php:373
|
1172 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:237
|
1173 |
msgid "Add file"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
#. translators: Used in user select. %1$s is the user's display name; #%2$s is the user ID; %3$s is the user email.
|
1177 |
#: includes/admin/class-wp-job-manager-writepanels.php:611
|
1178 |
#: includes/class-wp-job-manager-ajax.php:419
|
1179 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:471
|
1180 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-ajax.php:418
|
1181 |
msgid "%1$s (#%2$s – %3$s)"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
#: includes/admin/class-wp-job-manager-writepanels.php:618
|
1185 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:478
|
1186 |
msgid "Guest User"
|
1187 |
msgstr ""
|
1188 |
|
1189 |
#: includes/admin/class-wp-job-manager-writepanels.php:622
|
1190 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:482
|
1191 |
msgid "Change"
|
1192 |
msgstr ""
|
1193 |
|
1194 |
#: includes/admin/class-wp-job-manager-writepanels.php:625
|
1195 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:485
|
1196 |
msgid "Guest"
|
1197 |
msgstr ""
|
1198 |
|
1199 |
#. translators: %1$s is placeholder for singular name of the job listing post type; %2$s is the intl formatted date the listing was last modified.
|
1200 |
#: includes/admin/class-wp-job-manager-writepanels.php:698
|
1201 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-writepanels.php:556
|
1202 |
msgid "%1$s was last modified by the user on %2$s."
|
1203 |
msgstr ""
|
1204 |
|
1205 |
#: includes/admin/views/html-admin-notice-core-setup.php:15
|
1206 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-notice-core-setup.php:15
|
1207 |
msgid "You are nearly ready to start listing jobs with <strong>WP Job Manager</strong>."
|
1208 |
msgstr ""
|
1209 |
|
1210 |
#: includes/admin/views/html-admin-notice-core-setup.php:19
|
1211 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-notice-core-setup.php:19
|
1212 |
msgid "Run Setup Wizard"
|
1213 |
msgstr ""
|
1214 |
|
1215 |
#: includes/admin/views/html-admin-notice-core-setup.php:20
|
1216 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-notice-core-setup.php:20
|
1217 |
msgid "Skip Setup"
|
1218 |
msgstr ""
|
1219 |
|
1220 |
#: includes/admin/views/html-admin-page-addons.php:23
|
1221 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-page-addons.php:23
|
1222 |
msgid "More Information →"
|
1223 |
msgstr ""
|
1224 |
|
1225 |
#: includes/admin/views/html-admin-page-addons.php:54
|
1226 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-page-addons.php:54
|
1227 |
msgid "No add-ons were found."
|
1228 |
msgstr ""
|
1229 |
|
1230 |
#: includes/admin/views/html-admin-setup-header.php:13
|
1231 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-header.php:13
|
1232 |
msgid "WP Job Manager Setup"
|
1233 |
msgstr ""
|
1234 |
|
1235 |
#: includes/admin/views/html-admin-setup-header.php:20
|
1236 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-header.php:20
|
1237 |
msgid "1. Introduction"
|
1238 |
msgstr ""
|
1239 |
|
1240 |
#: includes/admin/views/html-admin-setup-header.php:21
|
1241 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-header.php:21
|
1242 |
msgid "2. Page Setup"
|
1243 |
msgstr ""
|
1244 |
|
1245 |
#: includes/admin/views/html-admin-setup-header.php:22
|
1246 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-header.php:22
|
1247 |
msgid "3. Done"
|
1248 |
msgstr ""
|
1249 |
|
1250 |
#: includes/admin/views/html-admin-setup-step-1.php:12
|
1251 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-1.php:12
|
1252 |
msgid "Welcome to the Setup Wizard!"
|
1253 |
msgstr ""
|
1254 |
|
1255 |
#: includes/admin/views/html-admin-setup-step-1.php:14
|
1256 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-1.php:14
|
1257 |
msgid "Thanks for installing <em>WP Job Manager</em>! Let's get your site ready to accept job listings."
|
1258 |
msgstr ""
|
1259 |
|
1260 |
#: includes/admin/views/html-admin-setup-step-1.php:15
|
1261 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-1.php:15
|
1262 |
msgid "This setup wizard will walk you through the process of creating pages for job submissions, management, and listings."
|
1263 |
msgstr ""
|
1264 |
|
1265 |
#. translators: Placeholder %s is the path to WPJM documentation site.
|
1266 |
#: includes/admin/views/html-admin-setup-step-1.php:19
|
1267 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-1.php:19
|
1268 |
msgid "If you'd prefer to skip this and set up your pages manually, our <a href=\"%s\">documentation</a> will walk you through each step."
|
1269 |
msgstr ""
|
1270 |
|
1271 |
#: includes/admin/views/html-admin-setup-step-1.php:29
|
1272 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-1.php:29
|
1273 |
msgid "Start setup"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
#: includes/admin/views/html-admin-setup-step-1.php:30
|
1277 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-1.php:30
|
1278 |
msgid "Skip setup. I will set up the plugin manually."
|
1279 |
msgstr ""
|
1280 |
|
1281 |
#: includes/admin/views/html-admin-setup-step-2.php:12
|
1282 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:12
|
1283 |
msgid "Page Setup"
|
1284 |
msgstr ""
|
1285 |
|
1286 |
#: includes/admin/views/html-admin-setup-step-2.php:14
|
1287 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:14
|
1288 |
msgid "With WP Job Manager, employers and applicants can post, manage, and browse job listings right on your website. Tell us which of these common pages you'd like your site to have and we'll create and configure them for you."
|
1289 |
msgstr ""
|
1290 |
|
1291 |
#. translators: %1$s is URL to WordPress core shortcode documentation. %2$s is URL to WPJM specific shortcode reference.
|
1292 |
#: includes/admin/views/html-admin-setup-step-2.php:20
|
1293 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:20
|
1294 |
msgid ""
|
1295 |
"(These pages are created using <a href=\"%1$s\" title=\"What is a shortcode?\" class=\"help-page-link\">shortcodes</a>,\n"
|
1296 |
"\t\t\t\t\t\t\t\twhich we take care of in this step. If you'd like to build these pages yourself or want to add one of these options to an existing\n"
|
1298 |
msgstr ""
|
1299 |
|
1300 |
#: includes/admin/views/html-admin-setup-step-2.php:39
|
1301 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:39
|
1302 |
msgid "Page Title"
|
1303 |
msgstr ""
|
1304 |
|
1305 |
#: includes/admin/views/html-admin-setup-step-2.php:40
|
1306 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:40
|
1307 |
msgid "Page Description"
|
1308 |
msgstr ""
|
1309 |
|
1310 |
#: includes/admin/views/html-admin-setup-step-2.php:41
|
1311 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:41
|
1312 |
msgid "Content Shortcode"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
#: includes/admin/views/html-admin-setup-step-2.php:47
|
1316 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:47
|
1317 |
msgctxt "Default page title (wizard)"
|
1318 |
msgid "Post a Job"
|
1319 |
msgstr ""
|
1320 |
|
1321 |
#: includes/admin/views/html-admin-setup-step-2.php:49
|
1322 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:49
|
1323 |
msgid "Creates a page that allows employers to post new jobs directly from a page on your website, instead of requiring them to log in to an admin area. If you'd rather not allow this -- for example, if you want employers to use the admin dashboard only -- you can uncheck this setting."
|
1324 |
msgstr ""
|
1325 |
|
1326 |
#: includes/admin/views/html-admin-setup-step-2.php:55
|
1327 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:55
|
1328 |
msgctxt "Default page title (wizard)"
|
1329 |
msgid "Job Dashboard"
|
1330 |
msgstr ""
|
1331 |
|
1332 |
#: includes/admin/views/html-admin-setup-step-2.php:57
|
1333 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:57
|
1334 |
msgid "Creates a page that allows employers to manage their job listings directly from a page on your website, instead of requiring them to log in to an admin area. If you want to manage all job listings from the admin dashboard only, you can uncheck this setting."
|
1335 |
msgstr ""
|
1336 |
|
1337 |
#: includes/admin/views/html-admin-setup-step-2.php:63
|
1338 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:63
|
1339 |
msgctxt "Default page title (wizard)"
|
1340 |
msgid "Jobs"
|
1341 |
msgstr ""
|
1342 |
|
1343 |
#: includes/admin/views/html-admin-setup-step-2.php:64
|
1344 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:64
|
1345 |
msgid "Creates a page where visitors can browse, search, and filter job listings."
|
1346 |
msgstr ""
|
1347 |
|
1348 |
#: includes/admin/views/html-admin-setup-step-2.php:72
|
1349 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-2.php:72
|
1350 |
msgid "Skip this step"
|
1351 |
msgstr ""
|
1352 |
|
1353 |
#: includes/admin/views/html-admin-setup-step-3.php:12
|
1354 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:12
|
1355 |
msgid "You're ready to start using WP Job Manager!"
|
1356 |
msgstr ""
|
1357 |
|
1358 |
#: includes/admin/views/html-admin-setup-step-3.php:14
|
1359 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:14
|
1360 |
msgid "Wondering what to do now? Here are some of the most common next steps:"
|
1361 |
msgstr ""
|
1362 |
|
1363 |
#: includes/admin/views/html-admin-setup-step-3.php:17
|
1364 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:17
|
1365 |
msgid "Tweak your settings"
|
1366 |
msgstr ""
|
1367 |
|
1368 |
#: includes/admin/views/html-admin-setup-step-3.php:18
|
1369 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:18
|
1370 |
msgid "Add a job using the admin dashboard"
|
1371 |
msgstr ""
|
1372 |
|
1373 |
#: includes/admin/views/html-admin-setup-step-3.php:23
|
1374 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:23
|
1375 |
msgid "View submitted job listings"
|
1376 |
msgstr ""
|
1377 |
|
1378 |
#: includes/admin/views/html-admin-setup-step-3.php:25
|
1379 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:25
|
1380 |
msgid "Add job listings to a page using the [jobs] shortcode"
|
1381 |
msgstr ""
|
1382 |
|
1383 |
#: includes/admin/views/html-admin-setup-step-3.php:32
|
1384 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:32
|
1385 |
msgid "Add a job via the front-end"
|
1386 |
msgstr ""
|
1387 |
|
1388 |
#: includes/admin/views/html-admin-setup-step-3.php:34
|
1389 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:34
|
1390 |
msgid "Learn to use the front-end job submission board"
|
1391 |
msgstr ""
|
1392 |
|
1393 |
#: includes/admin/views/html-admin-setup-step-3.php:41
|
1394 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:41
|
1395 |
msgid "View the job dashboard"
|
1396 |
msgstr ""
|
1397 |
|
1398 |
#: includes/admin/views/html-admin-setup-step-3.php:43
|
1399 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:43
|
1400 |
msgid "Learn to use the front-end job dashboard"
|
1401 |
msgstr ""
|
1402 |
|
1403 |
#. translators: %1$s is the URL to WPJM support documentation; %2$s is the URL to WPJM support forums.
|
1404 |
#: includes/admin/views/html-admin-setup-step-3.php:52
|
1405 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:52
|
1406 |
msgid ""
|
1407 |
"If you need help, you can find more detail in our\n"
|
1408 |
"\t\t\t\t\t\t\t<a href=\"%1$s\">support documentation</a> or post your question on the\n"
|
1410 |
msgstr ""
|
1411 |
|
1412 |
#: includes/admin/views/html-admin-setup-step-3.php:66
|
1413 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:66
|
1414 |
msgid "Support WP Job Manager's Ongoing Development"
|
1415 |
msgstr ""
|
1416 |
|
1417 |
#: includes/admin/views/html-admin-setup-step-3.php:67
|
1418 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:67
|
1419 |
msgid "There are lots of ways you can support open source software projects like this one: contributing code, fixing a bug, assisting with non-English translation, or just telling your friends about WP Job Manager to help spread the word. We appreciate your support!"
|
1420 |
msgstr ""
|
1421 |
|
1422 |
#: includes/admin/views/html-admin-setup-step-3.php:69
|
1423 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:69
|
1424 |
msgid "Leave a positive review"
|
1425 |
msgstr ""
|
1426 |
|
1427 |
#: includes/admin/views/html-admin-setup-step-3.php:70
|
1428 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:70
|
1429 |
msgid "Contribute a localization"
|
1430 |
msgstr ""
|
1431 |
|
1432 |
#: includes/admin/views/html-admin-setup-step-3.php:71
|
1433 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:71
|
1434 |
msgid "Contribute code or report a bug"
|
1435 |
msgstr ""
|
1436 |
|
1437 |
#: includes/admin/views/html-admin-setup-step-3.php:72
|
1438 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/views/html-admin-setup-step-3.php:72
|
1439 |
msgid "Help other users on the forums"
|
1440 |
msgstr ""
|
1441 |
|
1442 |
#. translators: Placeholder %d is the number of found search results.
|
1443 |
#: includes/class-wp-job-manager-ajax.php:186
|
1444 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-ajax.php:185
|
1445 |
msgid "Search completed. Found %d matching record."
|
1446 |
msgid_plural "Search completed. Found %d matching records."
|
1447 |
msgstr[0] ""
|
1448 |
msgstr[1] ""
|
1449 |
|
1450 |
#: includes/class-wp-job-manager-ajax.php:284
|
1451 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-ajax.php:283
|
1452 |
msgid "You must be logged in to upload files using this method."
|
1453 |
msgstr ""
|
1454 |
|
1455 |
#. translators: Placeholder %s is the singular label of the job listing post type.
|
1456 |
#: includes/class-wp-job-manager-data-exporter.php:51
|
1457 |
#: includes/class-wp-job-manager-post-types.php:357
|
1458 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-data-exporter.php:51
|
1459 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:351
|
1460 |
msgid "Company Logo"
|
1461 |
msgstr ""
|
1462 |
|
1463 |
#: includes/class-wp-job-manager-data-exporter.php:81
|
1464 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-data-exporter.php:81
|
1465 |
msgid "WP Job Manager User Data"
|
1466 |
msgstr ""
|
1467 |
|
1468 |
#. translators: %1$s is version of PHP that WP Job Manager requires; %2$s is the version of PHP WordPress is running on.
|
1469 |
#: includes/class-wp-job-manager-dependency-checker.php:66
|
1470 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-dependency-checker.php:66
|
1471 |
msgid "<strong>WP Job Manager</strong> requires a minimum PHP version of %1$s, but you are running %2$s."
|
1472 |
msgstr ""
|
1473 |
|
1474 |
#: includes/class-wp-job-manager-dependency-checker.php:77
|
1475 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-dependency-checker.php:77
|
1476 |
msgid "Learn more about updating PHP"
|
1477 |
msgstr ""
|
1478 |
|
1479 |
#. translators: accessibility text
|
1480 |
#: includes/class-wp-job-manager-dependency-checker.php:79
|
1481 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-dependency-checker.php:79
|
1482 |
msgid "(opens in a new tab)"
|
1483 |
msgstr ""
|
1484 |
|
1488 |
msgstr ""
|
1489 |
|
1490 |
#: includes/class-wp-job-manager-dependency-checker.php:122
|
1491 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-dependency-checker.php:122
|
1492 |
msgid "<strong>WP Job Manager</strong> requires a more recent version of WordPress."
|
1493 |
msgstr ""
|
1494 |
|
1495 |
#: includes/class-wp-job-manager-dependency-checker.php:136
|
1496 |
#: includes/class-wp-job-manager-dependency-checker.php:138
|
1497 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-dependency-checker.php:136
|
1498 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-dependency-checker.php:138
|
1499 |
msgid "WordPress Update Required"
|
1500 |
msgstr ""
|
1501 |
|
1502 |
#: includes/class-wp-job-manager-email-notifications.php:259
|
1503 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:227
|
1504 |
msgid "Job title"
|
1505 |
msgstr ""
|
1506 |
|
1507 |
#: includes/class-wp-job-manager-email-notifications.php:279
|
1508 |
#: includes/class-wp-job-manager-post-types.php:224
|
1509 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:237
|
1510 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:247
|
1511 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:218
|
1512 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:221
|
1513 |
msgid "Job type"
|
1514 |
msgstr ""
|
1515 |
|
1516 |
#: includes/class-wp-job-manager-email-notifications.php:289
|
1517 |
#: includes/class-wp-job-manager-post-types.php:160
|
1518 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:246
|
1519 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:257
|
1520 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:154
|
1521 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:230
|
1522 |
msgid "Job category"
|
1523 |
msgstr ""
|
1524 |
|
1525 |
#: includes/class-wp-job-manager-email-notifications.php:298
|
1526 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:278
|
1527 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:266
|
1528 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:255
|
1529 |
msgid "Company name"
|
1530 |
msgstr ""
|
1531 |
|
1532 |
#: includes/class-wp-job-manager-email-notifications.php:306
|
1533 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:274
|
1534 |
msgid "Company website"
|
1535 |
msgstr ""
|
1536 |
|
1537 |
#: includes/class-wp-job-manager-email-notifications.php:315
|
1538 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:283
|
1539 |
msgid "Listing expires"
|
1540 |
msgstr ""
|
1541 |
|
1542 |
#: includes/class-wp-job-manager-email-notifications.php:474
|
1543 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:441
|
1544 |
msgid "Email Notifications"
|
1545 |
msgstr ""
|
1546 |
|
1547 |
#: includes/class-wp-job-manager-email-notifications.php:477
|
1548 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:444
|
1549 |
msgid "Select the email notifications to enable."
|
1550 |
msgstr ""
|
1551 |
|
1552 |
#: includes/class-wp-job-manager-email-notifications.php:631
|
1553 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:586
|
1554 |
msgid "Format"
|
1555 |
msgstr ""
|
1556 |
|
1557 |
#: includes/class-wp-job-manager-email-notifications.php:634
|
1558 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:589
|
1559 |
msgid "Send plain text email"
|
1560 |
msgstr ""
|
1561 |
|
1562 |
#: includes/class-wp-job-manager-email-notifications.php:635
|
1563 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-email-notifications.php:590
|
1564 |
msgid "Send rich text email"
|
1565 |
msgstr ""
|
1566 |
|
1567 |
#: includes/class-wp-job-manager-geocode.php:234
|
1568 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-geocode.php:234
|
1569 |
msgid "No results found"
|
1570 |
msgstr ""
|
1571 |
|
1572 |
#: includes/class-wp-job-manager-geocode.php:237
|
1573 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-geocode.php:237
|
1574 |
msgid "Query limit reached"
|
1575 |
msgstr ""
|
1576 |
|
1577 |
#: includes/class-wp-job-manager-geocode.php:241
|
1578 |
#: includes/class-wp-job-manager-geocode.php:244
|
1579 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-geocode.php:241
|
1580 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-geocode.php:244
|
1581 |
msgid "Geocoding error"
|
1582 |
msgstr ""
|
1583 |
|
1584 |
#: includes/class-wp-job-manager-install.php:84
|
1585 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-install.php:84
|
1586 |
msgid "Employer"
|
1587 |
msgstr ""
|
1588 |
|
1589 |
#: includes/class-wp-job-manager-post-types.php:161
|
1590 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:155
|
1591 |
msgid "Job categories"
|
1592 |
msgstr ""
|
1593 |
|
1597 |
#: includes/class-wp-job-manager-post-types.php:189
|
1598 |
#: includes/class-wp-job-manager-post-types.php:252
|
1599 |
#: includes/class-wp-job-manager-post-types.php:350
|
1600 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:183
|
1601 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:246
|
1602 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:344
|
1603 |
msgid "Search %s"
|
1604 |
msgstr ""
|
1605 |
|
1609 |
#: includes/class-wp-job-manager-post-types.php:191
|
1610 |
#: includes/class-wp-job-manager-post-types.php:254
|
1611 |
#: includes/class-wp-job-manager-post-types.php:336
|
1612 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:185
|
1613 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:248
|
1614 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:330
|
1615 |
msgid "All %s"
|
1616 |
msgstr ""
|
1617 |
|
1621 |
#: includes/class-wp-job-manager-post-types.php:193
|
1622 |
#: includes/class-wp-job-manager-post-types.php:256
|
1623 |
#: includes/class-wp-job-manager-post-types.php:356
|
1624 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:187
|
1625 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:250
|
1626 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:350
|
1627 |
msgid "Parent %s"
|
1628 |
msgstr ""
|
1629 |
|
1631 |
#. translators: Placeholder %s is the singular label of the job listing job type taxonomy type.
|
1632 |
#: includes/class-wp-job-manager-post-types.php:195
|
1633 |
#: includes/class-wp-job-manager-post-types.php:258
|
1634 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:189
|
1635 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:252
|
1636 |
msgid "Parent %s:"
|
1637 |
msgstr ""
|
1638 |
|
1642 |
#: includes/class-wp-job-manager-post-types.php:197
|
1643 |
#: includes/class-wp-job-manager-post-types.php:260
|
1644 |
#: includes/class-wp-job-manager-post-types.php:342
|
1645 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:191
|
1646 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:254
|
1647 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:336
|
1648 |
msgid "Edit %s"
|
1649 |
msgstr ""
|
1650 |
|
1652 |
#. translators: Placeholder %s is the singular label of the job listing job type taxonomy type.
|
1653 |
#: includes/class-wp-job-manager-post-types.php:199
|
1654 |
#: includes/class-wp-job-manager-post-types.php:262
|
1655 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:193
|
1656 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:256
|
1657 |
msgid "Update %s"
|
1658 |
msgstr ""
|
1659 |
|
1661 |
#. translators: Placeholder %s is the singular label of the job listing job type taxonomy type.
|
1662 |
#: includes/class-wp-job-manager-post-types.php:201
|
1663 |
#: includes/class-wp-job-manager-post-types.php:264
|
1664 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:195
|
1665 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:258
|
1666 |
msgid "Add New %s"
|
1667 |
msgstr ""
|
1668 |
|
1670 |
#. translators: Placeholder %s is the singular label of the job listing job type taxonomy type.
|
1671 |
#: includes/class-wp-job-manager-post-types.php:203
|
1672 |
#: includes/class-wp-job-manager-post-types.php:266
|
1673 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:197
|
1674 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:260
|
1675 |
msgid "New %s Name"
|
1676 |
msgstr ""
|
1677 |
|
1678 |
#: includes/class-wp-job-manager-post-types.php:225
|
1679 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:219
|
1680 |
msgid "Job types"
|
1681 |
msgstr ""
|
1682 |
|
1683 |
#: includes/class-wp-job-manager-post-types.php:303
|
1684 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:297
|
1685 |
msgid "Job"
|
1686 |
msgstr ""
|
1687 |
|
1688 |
#: includes/class-wp-job-manager-post-types.php:304
|
1689 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:298
|
1690 |
msgid "Jobs"
|
1691 |
msgstr ""
|
1692 |
|
1693 |
#. translators: Placeholder %s is the plural label of the job listing post type.
|
1694 |
#: includes/class-wp-job-manager-post-types.php:337
|
1695 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:331
|
1696 |
msgid "Add New"
|
1697 |
msgstr ""
|
1698 |
|
1699 |
#. translators: Placeholder %s is the singular label of the job listing post type.
|
1700 |
#: includes/class-wp-job-manager-post-types.php:339
|
1701 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:333
|
1702 |
msgid "Add %s"
|
1703 |
msgstr ""
|
1704 |
|
1705 |
#. translators: Placeholder %s is the singular label of the job listing post type.
|
1706 |
#: includes/class-wp-job-manager-post-types.php:344
|
1707 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:338
|
1708 |
msgid "New %s"
|
1709 |
msgstr ""
|
1710 |
|
1711 |
#. translators: Placeholder %s is the singular label of the job listing post type.
|
1712 |
#: includes/class-wp-job-manager-post-types.php:346
|
1713 |
#: includes/class-wp-job-manager-post-types.php:348
|
1714 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:340
|
1715 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:342
|
1716 |
msgid "View %s"
|
1717 |
msgstr ""
|
1718 |
|
1719 |
#. translators: Placeholder %s is the singular label of the job listing post type.
|
1720 |
#: includes/class-wp-job-manager-post-types.php:352
|
1721 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:346
|
1722 |
msgid "No %s found"
|
1723 |
msgstr ""
|
1724 |
|
1725 |
#. translators: Placeholder %s is the plural label of the job listing post type.
|
1726 |
#: includes/class-wp-job-manager-post-types.php:354
|
1727 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:348
|
1728 |
msgid "No %s found in trash"
|
1729 |
msgstr ""
|
1730 |
|
1731 |
#: includes/class-wp-job-manager-post-types.php:358
|
1732 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:352
|
1733 |
msgid "Set company logo"
|
1734 |
msgstr ""
|
1735 |
|
1736 |
#: includes/class-wp-job-manager-post-types.php:359
|
1737 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:353
|
1738 |
msgid "Remove company logo"
|
1739 |
msgstr ""
|
1740 |
|
1741 |
#: includes/class-wp-job-manager-post-types.php:360
|
1742 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:354
|
1743 |
msgid "Use as company logo"
|
1744 |
msgstr ""
|
1745 |
|
1746 |
#. translators: Placeholder %s is the plural label of the job listing post type.
|
1747 |
#: includes/class-wp-job-manager-post-types.php:363
|
1748 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:357
|
1749 |
msgid "This is where you can create and manage %s."
|
1750 |
msgstr ""
|
1751 |
|
1752 |
#: includes/class-wp-job-manager-post-types.php:398
|
1753 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:391
|
1754 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:329
|
1755 |
#: wp-job-manager-functions.php:360
|
1756 |
msgctxt "post status"
|
1757 |
msgid "Expired"
|
1759 |
|
1760 |
#. translators: Placeholder %s is the number of expired posts of this type.
|
1761 |
#: includes/class-wp-job-manager-post-types.php:405
|
1762 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:398
|
1763 |
msgid "Expired <span class=\"count\">(%s)</span>"
|
1764 |
msgid_plural "Expired <span class=\"count\">(%s)</span>"
|
1765 |
msgstr[0] ""
|
1766 |
msgstr[1] ""
|
1767 |
|
1768 |
#: includes/class-wp-job-manager-post-types.php:411
|
1769 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:404
|
1770 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:330
|
1771 |
#: wp-job-manager-functions.php:361
|
1772 |
msgctxt "post status"
|
1773 |
msgid "Preview"
|
1775 |
|
1776 |
#. translators: Placeholder %s is the number of posts in a preview state.
|
1777 |
#: includes/class-wp-job-manager-post-types.php:417
|
1778 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:410
|
1779 |
msgid "Preview <span class=\"count\">(%s)</span>"
|
1780 |
msgid_plural "Preview <span class=\"count\">(%s)</span>"
|
1781 |
msgstr[0] ""
|
1782 |
msgstr[1] ""
|
1783 |
|
1784 |
#: includes/class-wp-job-manager-post-types.php:1163
|
1785 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:929
|
1786 |
msgctxt "Post type archive slug - resave permalinks after changing this"
|
1787 |
msgid "jobs"
|
1788 |
msgstr ""
|
1789 |
|
1790 |
#: includes/class-wp-job-manager-post-types.php:1480
|
1791 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:199
|
1792 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1209
|
1793 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:190
|
1794 |
msgid "Application email/URL"
|
1795 |
msgstr ""
|
1796 |
|
1797 |
#: includes/class-wp-job-manager-post-types.php:1481
|
1798 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:200
|
1799 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1210
|
1800 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:191
|
1801 |
msgid "Enter an email address or website URL"
|
1802 |
msgstr ""
|
1803 |
|
1804 |
#: includes/class-wp-job-manager-post-types.php:1484
|
1805 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:189
|
1806 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1213
|
1807 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:180
|
1808 |
msgid "Application email"
|
1809 |
msgstr ""
|
1810 |
|
1811 |
#: includes/class-wp-job-manager-post-types.php:1485
|
1812 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:190
|
1813 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1214
|
1814 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:181
|
1815 |
msgid "you@example.com"
|
1816 |
msgstr ""
|
1817 |
|
1818 |
#: includes/class-wp-job-manager-post-types.php:1487
|
1819 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:194
|
1820 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1216
|
1821 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:185
|
1822 |
msgid "Application URL"
|
1823 |
msgstr ""
|
1824 |
|
1825 |
#: includes/class-wp-job-manager-post-types.php:1488
|
1826 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:195
|
1827 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-post-types.php:1217
|
1828 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:186
|
1829 |
msgid "https://"
|
1830 |
msgstr ""
|
1831 |
|
1838 |
msgstr ""
|
1839 |
|
1840 |
#: includes/class-wp-job-manager-shortcodes.php:201
|
1841 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:108
|
1842 |
msgid "Invalid ID"
|
1843 |
msgstr ""
|
1844 |
|
1845 |
#: includes/class-wp-job-manager-shortcodes.php:208
|
1846 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:115
|
1847 |
msgid "This position has already been filled"
|
1848 |
msgstr ""
|
1849 |
|
1850 |
#. translators: Placeholder %s is the job listing title.
|
1851 |
#: includes/class-wp-job-manager-shortcodes.php:216
|
1852 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:123
|
1853 |
msgid "%s has been filled"
|
1854 |
msgstr ""
|
1855 |
|
1856 |
#: includes/class-wp-job-manager-shortcodes.php:221
|
1857 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:128
|
1858 |
msgid "This position is not filled"
|
1859 |
msgstr ""
|
1860 |
|
1861 |
#. translators: Placeholder %s is the job listing title.
|
1862 |
#: includes/class-wp-job-manager-shortcodes.php:229
|
1863 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:136
|
1864 |
msgid "%s has been marked as not filled"
|
1865 |
msgstr ""
|
1866 |
|
1867 |
#. translators: Placeholder %s is the job listing title.
|
1868 |
#: includes/class-wp-job-manager-shortcodes.php:237
|
1869 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:144
|
1870 |
msgid "%s has been deleted"
|
1871 |
msgstr ""
|
1872 |
|
1873 |
#: includes/class-wp-job-manager-shortcodes.php:242
|
1874 |
#: includes/class-wp-job-manager-shortcodes.php:256
|
1875 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:149
|
1876 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:163
|
1877 |
msgid "Missing submission page."
|
1878 |
msgstr ""
|
1879 |
|
1882 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:36
|
1883 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:52
|
1884 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:36
|
1885 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:256
|
1886 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:36
|
1887 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:52
|
1888 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-recent-jobs.php:36
|
1889 |
msgid "Title"
|
1890 |
msgstr ""
|
1891 |
|
1892 |
#: includes/class-wp-job-manager-shortcodes.php:394
|
1893 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:258
|
1894 |
msgid "Date Posted"
|
1895 |
msgstr ""
|
1896 |
|
1897 |
#: includes/class-wp-job-manager-shortcodes.php:395
|
1898 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:259
|
1899 |
msgid "Listing Expires"
|
1900 |
msgstr ""
|
1901 |
|
1902 |
#: includes/class-wp-job-manager-shortcodes.php:447
|
1903 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard.php:55
|
1904 |
msgid "Mark not filled"
|
1905 |
msgstr ""
|
1906 |
|
1907 |
#: includes/class-wp-job-manager-shortcodes.php:452
|
1908 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard.php:57
|
1909 |
msgid "Mark filled"
|
1910 |
msgstr ""
|
1911 |
|
1912 |
#: includes/class-wp-job-manager-shortcodes.php:458
|
1913 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard.php:60
|
1914 |
msgid "Duplicate"
|
1915 |
msgstr ""
|
1916 |
|
1917 |
#: includes/class-wp-job-manager-shortcodes.php:465
|
1918 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard.php:64
|
1919 |
msgid "Relist"
|
1920 |
msgstr ""
|
1921 |
|
1922 |
#: includes/class-wp-job-manager-shortcodes.php:482
|
1923 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard.php:75
|
1924 |
msgid "Continue Submission"
|
1925 |
msgstr ""
|
1926 |
|
1927 |
+
#: includes/class-wp-job-manager-shortcodes.php:677
|
1928 |
+
#: includes/class-wp-job-manager-shortcodes.php:715
|
1929 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:401
|
1930 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php:439
|
1931 |
msgid "Load more listings"
|
1932 |
msgstr ""
|
1933 |
|
1934 |
#. translators: Placeholder %s is a URL to the document on wpjobmanager.com with info on usage tracking.
|
1935 |
#: includes/class-wp-job-manager-usage-tracking.php:228
|
1936 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-usage-tracking.php:228
|
1937 |
msgid ""
|
1938 |
"We'd love if you helped us make WP Job Manager better by allowing us to collect\n"
|
1939 |
"\t\t\t\t<a href=\"%s\">usage tracking data</a>. No sensitive information is\n"
|
1942 |
|
1943 |
#. translators: the href tag contains the URL for the page telling users what data WPJM tracks.
|
1944 |
#: includes/class-wp-job-manager-usage-tracking.php:293
|
1945 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-usage-tracking.php:297
|
1946 |
msgid ""
|
1947 |
"Help us make WP Job Manager better by allowing us to collect\n"
|
1948 |
"\t\t\t\t<a href=\"%s\">usage tracking data</a>.\n"
|
1950 |
msgstr ""
|
1951 |
|
1952 |
#: includes/class-wp-job-manager-usage-tracking.php:320
|
1953 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager-usage-tracking.php:324
|
1954 |
msgid "Enable Usage Tracking"
|
1955 |
msgstr ""
|
1956 |
|
1962 |
msgstr ""
|
1963 |
|
1964 |
#: includes/class-wp-job-manager.php:361
|
1965 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager.php:276
|
1966 |
msgid "Load previous listings"
|
1967 |
msgstr ""
|
1968 |
|
1969 |
#: includes/class-wp-job-manager.php:489
|
1970 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager.php:403
|
1971 |
msgid "Invalid file type. Accepted types:"
|
1972 |
msgstr ""
|
1973 |
|
1978 |
#. translators: Placeholder %d is the number of files to that users are limited to.
|
1979 |
#: includes/class-wp-job-manager.php:523
|
1980 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:479
|
1981 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager.php:420
|
1982 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:406
|
1983 |
msgid "You are only allowed to upload a maximum of %d files."
|
1984 |
msgstr ""
|
1985 |
|
1986 |
#: includes/class-wp-job-manager.php:531
|
1987 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager.php:428
|
1988 |
msgid "Are you sure you want to delete this listing?"
|
1989 |
msgstr ""
|
1990 |
|
1991 |
#: includes/class-wp-job-manager.php:539
|
1992 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager.php:436
|
1993 |
msgid "This field is required."
|
1994 |
msgstr ""
|
1995 |
|
1996 |
#: includes/emails/class-wp-job-manager-email-admin-expiring-job.php:34
|
1997 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-admin-expiring-job.php:34
|
1998 |
msgid "Admin Notice of Expiring Job Listings"
|
1999 |
msgstr ""
|
2000 |
|
2001 |
#: includes/emails/class-wp-job-manager-email-admin-expiring-job.php:44
|
2002 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-admin-expiring-job.php:44
|
2003 |
msgid "Send notices to the site administrator before a job listing expires."
|
2004 |
msgstr ""
|
2005 |
|
2006 |
#: includes/emails/class-wp-job-manager-email-admin-new-job.php:34
|
2007 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-admin-new-job.php:34
|
2008 |
msgid "Admin Notice of New Listing"
|
2009 |
msgstr ""
|
2010 |
|
2011 |
#: includes/emails/class-wp-job-manager-email-admin-new-job.php:44
|
2012 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-admin-new-job.php:44
|
2013 |
msgid "Send a notice to the site administrator when a new job is submitted on the frontend."
|
2014 |
msgstr ""
|
2015 |
|
2016 |
#. translators: Placeholder %s is the job listing post title.
|
2017 |
#: includes/emails/class-wp-job-manager-email-admin-new-job.php:63
|
2018 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-admin-new-job.php:63
|
2019 |
msgid "New Job Listing Submitted: %s"
|
2020 |
msgstr ""
|
2021 |
|
2022 |
#: includes/emails/class-wp-job-manager-email-admin-updated-job.php:34
|
2023 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-admin-updated-job.php:34
|
2024 |
msgid "Admin Notice of Updated Listing"
|
2025 |
msgstr ""
|
2026 |
|
2027 |
#: includes/emails/class-wp-job-manager-email-admin-updated-job.php:44
|
2028 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-admin-updated-job.php:44
|
2029 |
msgid "Send a notice to the site administrator when a job is updated on the frontend."
|
2030 |
msgstr ""
|
2031 |
|
2032 |
#. translators: Placeholder %s is the job listing post title.
|
2033 |
#: includes/emails/class-wp-job-manager-email-admin-updated-job.php:63
|
2034 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-admin-updated-job.php:63
|
2035 |
msgid "Job Listing Updated: %s"
|
2036 |
msgstr ""
|
2037 |
|
2038 |
#: includes/emails/class-wp-job-manager-email-employer-expiring-job.php:37
|
2039 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-employer-expiring-job.php:37
|
2040 |
msgid "Employer Notice of Expiring Job Listings"
|
2041 |
msgstr ""
|
2042 |
|
2043 |
#: includes/emails/class-wp-job-manager-email-employer-expiring-job.php:47
|
2044 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-employer-expiring-job.php:47
|
2045 |
msgid "Send notices to employers before a job listing expires."
|
2046 |
msgstr ""
|
2047 |
|
2048 |
#. translators: Placeholder %s is the job listing post title.
|
2049 |
#: includes/emails/class-wp-job-manager-email-employer-expiring-job.php:79
|
2050 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-employer-expiring-job.php:79
|
2051 |
msgid "Job Listing Expiring: %s"
|
2052 |
msgstr ""
|
2053 |
|
2054 |
#: includes/emails/class-wp-job-manager-email-employer-expiring-job.php:132
|
2055 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-employer-expiring-job.php:132
|
2056 |
msgid "Notice Period"
|
2057 |
msgstr ""
|
2058 |
|
2059 |
#: includes/emails/class-wp-job-manager-email-employer-expiring-job.php:134
|
2060 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/emails/class-wp-job-manager-email-employer-expiring-job.php:134
|
2061 |
msgid "days"
|
2062 |
msgstr ""
|
2063 |
|
2064 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:104
|
2065 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-edit-job.php:108
|
2066 |
msgid "Invalid listing"
|
2067 |
msgstr ""
|
2068 |
|
2069 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:136
|
2070 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-edit-job.php:140
|
2071 |
msgid "Save changes"
|
2072 |
msgstr ""
|
2073 |
|
2074 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:141
|
2075 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-edit-job.php:145
|
2076 |
msgid "Submit changes for approval"
|
2077 |
msgstr ""
|
2078 |
|
2079 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:195
|
2080 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-edit-job.php:199
|
2081 |
msgid "Your changes have been saved."
|
2082 |
msgstr ""
|
2083 |
|
2084 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:201
|
2085 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-edit-job.php:205
|
2086 |
msgid "View →"
|
2087 |
msgstr ""
|
2088 |
|
2089 |
#: includes/forms/class-wp-job-manager-form-edit-job.php:203
|
2090 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-edit-job.php:207
|
2091 |
msgid "Your changes have been submitted and your listing will be visible again once approved."
|
2092 |
msgstr ""
|
2093 |
|
2094 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:87
|
2095 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:82
|
2096 |
msgid "Submit Details"
|
2097 |
msgstr ""
|
2098 |
|
2099 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:93
|
2100 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:669
|
2101 |
#: templates/job-preview.php:30
|
2102 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:88
|
2103 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:578
|
2104 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-preview.php:30
|
2105 |
msgid "Preview"
|
2106 |
msgstr ""
|
2107 |
|
2108 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:99
|
2109 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:94
|
2110 |
msgid "Done"
|
2111 |
msgstr ""
|
2112 |
|
2113 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:215
|
2114 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:206
|
2115 |
msgid "Job Title"
|
2116 |
msgstr ""
|
2117 |
|
2118 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:223
|
2119 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:214
|
2120 |
msgid "Leave this blank if the location is not important"
|
2121 |
msgstr ""
|
2122 |
|
2123 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:240
|
2124 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:224
|
2125 |
msgid "Choose job type…"
|
2126 |
msgstr ""
|
2127 |
|
2128 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:255
|
2129 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:239
|
2130 |
msgid "Description"
|
2131 |
msgstr ""
|
2132 |
|
2133 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:281
|
2134 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:258
|
2135 |
msgid "Enter the name of the company"
|
2136 |
msgstr ""
|
2137 |
|
2138 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:285
|
2139 |
#: templates/content-single-job_listing-company.php:30
|
2140 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:262
|
2141 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/content-single-job_listing-company.php:30
|
2142 |
msgid "Website"
|
2143 |
msgstr ""
|
2144 |
|
2145 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:289
|
2146 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:266
|
2147 |
msgid "http://"
|
2148 |
msgstr ""
|
2149 |
|
2150 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:293
|
2151 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:270
|
2152 |
msgid "Tagline"
|
2153 |
msgstr ""
|
2154 |
|
2155 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:296
|
2156 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:273
|
2157 |
msgid "Briefly describe your company"
|
2158 |
msgstr ""
|
2159 |
|
2160 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:301
|
2161 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:278
|
2162 |
msgid "Video"
|
2163 |
msgstr ""
|
2164 |
|
2165 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:305
|
2166 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:282
|
2167 |
msgid "A link to a video about your company"
|
2168 |
msgstr ""
|
2169 |
|
2170 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:309
|
2171 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:286
|
2172 |
msgid "Twitter username"
|
2173 |
msgstr ""
|
2174 |
|
2175 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:312
|
2176 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:289
|
2177 |
msgid "@yourcompany"
|
2178 |
msgstr ""
|
2179 |
|
2180 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:316
|
2181 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:293
|
2182 |
msgid "Logo"
|
2183 |
msgstr ""
|
2184 |
|
2185 |
#. translators: Placeholder %s is the label for the required field.
|
2186 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:400
|
2187 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:343
|
2188 |
msgid "%s is a required field"
|
2189 |
msgstr ""
|
2190 |
|
2191 |
#. translators: Placeholder %s is the field label that is did not validate.
|
2192 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:411
|
2193 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:354
|
2194 |
msgid "%s is invalid"
|
2195 |
msgstr ""
|
2196 |
|
2201 |
#. translators: Placeholder %1$s is field label; %2$s is the file mime type; %3$s is the allowed mime-types.
|
2202 |
#. translators: %1$s is the file field label; %2$s is the file type; %3$s is the list of allowed file types.
|
2203 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:452
|
2204 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:389
|
2205 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:1304
|
2206 |
#: wp-job-manager-functions.php:1393
|
2207 |
msgid "\"%1$s\" (filetype %2$s) needs to be one of the following file types: %3$s"
|
2208 |
msgstr ""
|
2209 |
|
2210 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:462
|
2211 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:371
|
2212 |
msgid "Invalid attachment provided."
|
2213 |
msgstr ""
|
2214 |
|
2215 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:506
|
2216 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:424
|
2217 |
msgid "Please enter a valid application email address"
|
2218 |
msgstr ""
|
2219 |
|
2220 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:511
|
2221 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:433
|
2222 |
msgid "Please enter a valid application URL"
|
2223 |
msgstr ""
|
2224 |
|
2225 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:517
|
2226 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:443
|
2227 |
msgid "Please enter a valid application email address or URL"
|
2228 |
msgstr ""
|
2229 |
|
2230 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:728
|
2231 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:637
|
2232 |
msgid "Please enter a username."
|
2233 |
msgstr ""
|
2234 |
|
2235 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:732
|
2236 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:641
|
2237 |
msgid "Please enter a password."
|
2238 |
msgstr ""
|
2239 |
|
2240 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:736
|
2241 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:645
|
2242 |
msgid "Please enter your email address."
|
2243 |
msgstr ""
|
2244 |
|
2245 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:742
|
2246 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:651
|
2247 |
msgid "Passwords must match."
|
2248 |
msgstr ""
|
2249 |
|
2250 |
#. translators: Placeholder %s is the password hint.
|
2251 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:748
|
2252 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:657
|
2253 |
msgid "Invalid Password: %s"
|
2254 |
msgstr ""
|
2255 |
|
2256 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:750
|
2257 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:659
|
2258 |
msgid "Password is not valid."
|
2259 |
msgstr ""
|
2260 |
|
2261 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:782
|
2262 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:682
|
2263 |
msgid "You must be signed in to post a new listing."
|
2264 |
msgstr ""
|
2265 |
|
2266 |
#. translators: placeholder is the URL to the job dashboard page.
|
2267 |
#: includes/forms/class-wp-job-manager-form-submit-job.php:808
|
2268 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:700
|
2269 |
msgid "Draft was saved. Job listing drafts can be resumed from the <a href=\"%s\">job dashboard</a>."
|
2270 |
msgstr ""
|
2271 |
|
2272 |
#: includes/helper/class-wp-job-manager-helper.php:279
|
2273 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/class-wp-job-manager-helper.php:279
|
2274 |
msgid "Manage License (Requires Attention)"
|
2275 |
msgstr ""
|
2276 |
|
2277 |
#: includes/helper/class-wp-job-manager-helper.php:282
|
2278 |
#: tests/php/tests/includes/helper/test_class.wp-job-manager-helper.php:262
|
2279 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/class-wp-job-manager-helper.php:282
|
2280 |
msgid "Manage License"
|
2281 |
msgstr ""
|
2282 |
|
2283 |
#: includes/helper/class-wp-job-manager-helper.php:285
|
2284 |
#: includes/helper/views/html-licences.php:75
|
2285 |
#: tests/php/tests/includes/helper/test_class.wp-job-manager-helper.php:278
|
2286 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/class-wp-job-manager-helper.php:285
|
2287 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/views/html-licences.php:75
|
2288 |
msgid "Activate License"
|
2289 |
msgstr ""
|
2290 |
|
2291 |
#: includes/helper/class-wp-job-manager-helper.php:494
|
2292 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/class-wp-job-manager-helper.php:494
|
2293 |
msgid "Please enter a valid license key and email address in order to activate this plugin's license."
|
2294 |
msgstr ""
|
2295 |
|
2296 |
#: includes/helper/class-wp-job-manager-helper.php:526
|
2297 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/class-wp-job-manager-helper.php:526
|
2298 |
msgid "Connection failed to the License Key API server - possible server issue."
|
2299 |
msgstr ""
|
2300 |
|
2301 |
#: includes/helper/class-wp-job-manager-helper.php:535
|
2302 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/class-wp-job-manager-helper.php:535
|
2303 |
msgid "Plugin license has been activated."
|
2304 |
msgstr ""
|
2305 |
|
2306 |
#: includes/helper/class-wp-job-manager-helper.php:538
|
2307 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/class-wp-job-manager-helper.php:538
|
2308 |
msgid "An unknown error occurred while attempting to activate the license"
|
2309 |
msgstr ""
|
2310 |
|
2311 |
#: includes/helper/class-wp-job-manager-helper.php:558
|
2312 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/class-wp-job-manager-helper.php:558
|
2313 |
msgid "license is not active."
|
2314 |
msgstr ""
|
2315 |
|
2316 |
#: includes/helper/class-wp-job-manager-helper.php:574
|
2317 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/class-wp-job-manager-helper.php:574
|
2318 |
msgid "Plugin license has been deactivated."
|
2319 |
msgstr ""
|
2320 |
|
2321 |
#: includes/helper/views/html-licence-key-error.php:13
|
2322 |
#: includes/helper/views/html-licence-key-notice.php:13
|
2323 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/views/html-licence-key-error.php:13
|
2324 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/views/html-licence-key-notice.php:13
|
2325 |
msgid "Hide notice"
|
2326 |
msgstr ""
|
2327 |
|
2337 |
|
2338 |
#: includes/helper/views/html-licences.php:56
|
2339 |
#: includes/helper/views/html-licences.php:69
|
2340 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/views/html-licences.php:56
|
2341 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/views/html-licences.php:69
|
2342 |
msgid "License"
|
2343 |
msgstr ""
|
2344 |
|
2345 |
#: includes/helper/views/html-licences.php:59
|
2346 |
#: includes/helper/views/html-licences.php:72
|
2347 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/views/html-licences.php:59
|
2348 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/views/html-licences.php:72
|
2349 |
msgid "Email"
|
2350 |
msgstr ""
|
2351 |
|
2355 |
msgstr ""
|
2356 |
|
2357 |
#: includes/helper/views/html-licences.php:63
|
2358 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/views/html-licences.php:63
|
2359 |
msgid "Deactivate License"
|
2360 |
msgstr ""
|
2361 |
|
2365 |
msgstr ""
|
2366 |
|
2367 |
#: includes/helper/views/html-licences.php:86
|
2368 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/helper/views/html-licences.php:85
|
2369 |
msgid "No plugins are activated that have licenses managed by WP Job Manager."
|
2370 |
msgstr ""
|
2371 |
|
2372 |
#. translators: Placeholder %s is the plural label for the job listing post type.
|
2373 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:27
|
2374 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:35
|
2375 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:27
|
2376 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:35
|
2377 |
msgid "Featured %s"
|
2378 |
msgstr ""
|
2379 |
|
2380 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:29
|
2381 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:29
|
2382 |
msgid "Display a list of featured listings on your site."
|
2383 |
msgstr ""
|
2384 |
|
2385 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:44
|
2386 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:54
|
2387 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:44
|
2388 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-recent-jobs.php:54
|
2389 |
msgid "Number of listings to show"
|
2390 |
msgstr ""
|
2391 |
|
2392 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:49
|
2393 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:49
|
2394 |
msgid "Sort By"
|
2395 |
msgstr ""
|
2396 |
|
2397 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:51
|
2398 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:51
|
2399 |
msgid "Date"
|
2400 |
msgstr ""
|
2401 |
|
2402 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:53
|
2403 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:53
|
2404 |
msgid "Author"
|
2405 |
msgstr ""
|
2406 |
|
2407 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:54
|
2408 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:54
|
2409 |
msgid "Random"
|
2410 |
msgstr ""
|
2411 |
|
2412 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:60
|
2413 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:60
|
2414 |
msgid "Sort Direction"
|
2415 |
msgstr ""
|
2416 |
|
2417 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:62
|
2418 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:62
|
2419 |
msgid "Ascending"
|
2420 |
msgstr ""
|
2421 |
|
2422 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:63
|
2423 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:63
|
2424 |
msgid "Descending"
|
2425 |
msgstr ""
|
2426 |
|
2427 |
#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:69
|
2428 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:59
|
2429 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-featured-jobs.php:69
|
2430 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-recent-jobs.php:59
|
2431 |
msgid "Show Company Logo"
|
2432 |
msgstr ""
|
2433 |
|
2434 |
#. translators: Placeholder %s is the plural label for the job listing post type.
|
2435 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:27
|
2436 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:35
|
2437 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-recent-jobs.php:27
|
2438 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-recent-jobs.php:35
|
2439 |
msgid "Recent %s"
|
2440 |
msgstr ""
|
2441 |
|
2442 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:29
|
2443 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-recent-jobs.php:29
|
2444 |
msgid "Display a list of recent listings on your site, optionally matching a keyword and location."
|
2445 |
msgstr ""
|
2446 |
|
2447 |
#: includes/widgets/class-wp-job-manager-widget-recent-jobs.php:41
|
2448 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/widgets/class-wp-job-manager-widget-recent-jobs.php:41
|
2449 |
msgid "Keyword"
|
2450 |
msgstr ""
|
2451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2452 |
#: templates/account-signin.php:21
|
2453 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/account-signin.php:21
|
2454 |
msgid "Your account"
|
2455 |
msgstr ""
|
2456 |
|
2457 |
#. translators: Placeholder %s is the username.
|
2458 |
#: templates/account-signin.php:26
|
2459 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/account-signin.php:25
|
2460 |
msgid "You are currently signed in as <strong>%s</strong>."
|
2461 |
msgstr ""
|
2462 |
|
2463 |
#: templates/account-signin.php:29
|
2464 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/account-signin.php:28
|
2465 |
msgid "Sign out"
|
2466 |
msgstr ""
|
2467 |
|
2468 |
#: templates/account-signin.php:40
|
2469 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/account-signin.php:39
|
2470 |
msgid "Have an account?"
|
2471 |
msgstr ""
|
2472 |
|
2473 |
#: templates/account-signin.php:42
|
2474 |
#: templates/job-dashboard-login.php:20
|
2475 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/account-signin.php:41
|
2476 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard-login.php:20
|
2477 |
msgid "Sign in"
|
2478 |
msgstr ""
|
2479 |
|
2482 |
msgstr ""
|
2483 |
|
2484 |
#: templates/account-signin.php:46
|
2485 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/account-signin.php:45
|
2486 |
msgid "optionally"
|
2487 |
msgstr ""
|
2488 |
|
2489 |
#: templates/account-signin.php:48
|
2490 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/account-signin.php:47
|
2491 |
msgid "Your account details will be confirmed via email."
|
2492 |
msgstr ""
|
2493 |
|
2494 |
#: templates/account-signin.php:53
|
2495 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/account-signin.php:52
|
2496 |
msgid "You must sign in to create a new listing."
|
2497 |
msgstr ""
|
2498 |
|
2499 |
#: templates/account-signin.php:64
|
2500 |
#: templates/job-submit.php:43
|
2501 |
#: templates/job-submit.php:60
|
2502 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/account-signin.php:63
|
2503 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-submit.php:43
|
2504 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-submit.php:60
|
2505 |
msgid "(optional)"
|
2506 |
msgstr ""
|
2507 |
|
2508 |
#: templates/content-no-jobs-found.php:20
|
2509 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/content-no-jobs-found.php:20
|
2510 |
msgid "There are no listings matching your search."
|
2511 |
msgstr ""
|
2512 |
|
2513 |
#: templates/content-no-jobs-found.php:22
|
2514 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/content-no-jobs-found.php:22
|
2515 |
msgid "There are currently no vacancies."
|
2516 |
msgstr ""
|
2517 |
|
2518 |
#: templates/content-single-job_listing-meta.php:44
|
2519 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/content-single-job_listing-meta.php:42
|
2520 |
msgid "This position has been filled"
|
2521 |
msgstr ""
|
2522 |
|
2523 |
#: templates/content-single-job_listing-meta.php:46
|
2524 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/content-single-job_listing-meta.php:44
|
2525 |
msgid "Applications have closed"
|
2526 |
msgstr ""
|
2527 |
|
2528 |
+
#: templates/content-single-job_listing.php:23
|
2529 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/content-single-job_listing.php:23
|
2530 |
msgid "This listing has expired."
|
2531 |
msgstr ""
|
2532 |
|
2533 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2534 |
#: templates/emails/admin-expiring-job.php:32
|
2535 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/admin-expiring-job.php:32
|
2536 |
msgid "The following job listing is expiring today from <a href=\"%1$s\">%2$s</a>."
|
2537 |
msgstr ""
|
2538 |
|
2539 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2540 |
#: templates/emails/admin-expiring-job.php:35
|
2541 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/admin-expiring-job.php:35
|
2542 |
msgid "The following job listing is expiring soon from <a href=\"%1$s\">%2$s</a>."
|
2543 |
msgstr ""
|
2544 |
|
2545 |
#. translators: Placeholder is URL to site's WP admin.
|
2546 |
#: templates/emails/admin-expiring-job.php:41
|
2547 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/admin-expiring-job.php:41
|
2548 |
msgid "Visit <a href=\"%s\">WordPress admin</a> to manage the listing."
|
2549 |
msgstr ""
|
2550 |
|
2551 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2552 |
#: templates/emails/admin-new-job.php:27
|
2553 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/admin-new-job.php:26
|
2554 |
msgid "A new job listing has been submitted to <a href=\"%s\">%s</a>."
|
2555 |
msgstr ""
|
2556 |
|
2557 |
#: templates/emails/admin-new-job.php:34
|
2558 |
#: templates/emails/plain/admin-new-job.php:27
|
2559 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/admin-new-job.php:33
|
2560 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/admin-new-job.php:26
|
2561 |
msgid "It has been published and is now available to the public."
|
2562 |
msgstr ""
|
2563 |
|
2564 |
#. translators: Placeholder %s is the admin job listings URL.
|
2565 |
#: templates/emails/admin-new-job.php:40
|
2566 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/admin-new-job.php:38
|
2567 |
msgid "It is awaiting approval by an administrator in <a href=\"%s\">WordPress admin</a>."
|
2568 |
msgstr ""
|
2569 |
|
2570 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2571 |
#: templates/emails/admin-updated-job.php:26
|
2572 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/admin-updated-job.php:25
|
2573 |
msgid "A job listing has been updated on <a href=\"%s\">%s</a>."
|
2574 |
msgstr ""
|
2575 |
|
2576 |
#: templates/emails/admin-updated-job.php:29
|
2577 |
#: templates/emails/plain/admin-updated-job.php:27
|
2578 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/admin-updated-job.php:28
|
2579 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/admin-updated-job.php:26
|
2580 |
msgid "The changes have been published and are now available to the public."
|
2581 |
msgstr ""
|
2582 |
|
2583 |
#. translators: Placeholder %s is the admin job listings URL.
|
2584 |
#: templates/emails/admin-updated-job.php:34
|
2585 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/admin-updated-job.php:32
|
2586 |
msgid "The job listing is not publicly available until the changes are approved by an administrator in the site's <a href=\"%s\">WordPress admin</a>."
|
2587 |
msgstr ""
|
2588 |
|
2589 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2590 |
#: templates/emails/employer-expiring-job.php:33
|
2591 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/employer-expiring-job.php:32
|
2592 |
msgid "The following job listing is expiring today from <a href=\"%s\">%s</a>."
|
2593 |
msgstr ""
|
2594 |
|
2595 |
#. translators: %1$s placeholder is URL to the blog. %2$s placeholder is the name of the site.
|
2596 |
#: templates/emails/employer-expiring-job.php:42
|
2597 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/employer-expiring-job.php:40
|
2598 |
msgid "The following job listing is expiring soon from <a href=\"%s\">%s</a>."
|
2599 |
msgstr ""
|
2600 |
|
2601 |
#. translators: Placeholder %s is the job listing dashboard URL.
|
2602 |
#: templates/emails/employer-expiring-job.php:51
|
2603 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/employer-expiring-job.php:48
|
2604 |
msgid "Visit the <a href=\"%s\">job listing dashboard</a> to manage the listing."
|
2605 |
msgstr ""
|
2606 |
|
2618 |
|
2619 |
#. translators: Placeholder %s is the edit job URL.
|
2620 |
#: templates/emails/plain/admin-expiring-job.php:46
|
2621 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/admin-expiring-job.php:43
|
2622 |
msgid "Visit WordPress admin (%s) to manage the listing."
|
2623 |
msgstr ""
|
2624 |
|
2629 |
|
2630 |
#. translators: Placeholder %s is the admin job listings URL.
|
2631 |
#: templates/emails/plain/admin-new-job.php:31
|
2632 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/admin-new-job.php:29
|
2633 |
msgid "It is awaiting approval by an administrator in WordPress admin (%s)."
|
2634 |
msgstr ""
|
2635 |
|
2640 |
|
2641 |
#. translators: Placeholder %s is the admin job listings URL.
|
2642 |
#: templates/emails/plain/admin-updated-job.php:31
|
2643 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/admin-updated-job.php:29
|
2644 |
msgid "The job listing is not publicly available until the changes are approved by an administrator in the site's WordPress admin (%s)."
|
2645 |
msgstr ""
|
2646 |
|
2647 |
#. translators: Placeholder %s is the job listing dashboard URL.
|
2648 |
#: templates/emails/plain/employer-expiring-job.php:36
|
2649 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/employer-expiring-job.php:33
|
2650 |
msgid "Visit the job listing dashboard (%s) to manage the listing."
|
2651 |
msgstr ""
|
2652 |
|
2653 |
#: templates/form-fields/file-field.php:60
|
2654 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/form-fields/file-field.php:60
|
2655 |
msgid "Maximum file size: %s."
|
2656 |
msgstr ""
|
2657 |
|
2658 |
#: templates/form-fields/multiselect-field.php:20
|
2659 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/form-fields/multiselect-field.php:20
|
2660 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:1086
|
2661 |
#: wp-job-manager-functions.php:1160
|
2662 |
msgid "No results match"
|
2663 |
msgstr ""
|
2664 |
|
2665 |
#: templates/form-fields/multiselect-field.php:20
|
2666 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/form-fields/multiselect-field.php:20
|
2667 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:1087
|
2668 |
#: wp-job-manager-functions.php:1161
|
2669 |
msgid "Select Some Options"
|
2670 |
msgstr ""
|
2671 |
|
2672 |
#: templates/form-fields/uploaded-file-html.php:28
|
2673 |
#: templates/form-fields/uploaded-file-html.php:30
|
2674 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/form-fields/uploaded-file-html.php:28
|
2675 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/form-fields/uploaded-file-html.php:30
|
2676 |
msgid "remove"
|
2677 |
msgstr ""
|
2678 |
|
2679 |
#. translators: %1$s is the email address, %2$s is the subject query args.
|
2680 |
#: templates/job-application-email.php:19
|
2681 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-application-email.php:18
|
2682 |
msgid "To apply for this job <strong>email your details to</strong> <a class=\"job_application_email\" href=\"mailto:%1$s%2$s\">%1$s</a>"
|
2683 |
msgstr ""
|
2684 |
|
2685 |
#: templates/job-application-url.php:18
|
2686 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-application-url.php:18
|
2687 |
msgid "To apply for this job please visit"
|
2688 |
msgstr ""
|
2689 |
|
2690 |
#: templates/job-application.php:24
|
2691 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-application.php:24
|
2692 |
msgid "Apply for job"
|
2693 |
msgstr ""
|
2694 |
|
2695 |
#: templates/job-dashboard-login.php:20
|
2696 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard-login.php:20
|
2697 |
msgid "You need to be signed in to manage your listings."
|
2698 |
msgstr ""
|
2699 |
|
2700 |
#: templates/job-dashboard.php:30
|
2701 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard.php:19
|
2702 |
msgid "Your listings are shown in the table below."
|
2703 |
msgstr ""
|
2704 |
|
2705 |
#: templates/job-dashboard.php:42
|
2706 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard.php:31
|
2707 |
msgid "You do not have any active listings."
|
2708 |
msgstr ""
|
2709 |
|
2710 |
#: templates/job-dashboard.php:55
|
2711 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-dashboard.php:44
|
2712 |
msgid "Featured Job"
|
2713 |
msgstr ""
|
2714 |
|
2718 |
|
2719 |
#: templates/job-filters.php:30
|
2720 |
#: templates/job-filters.php:31
|
2721 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-filters.php:30
|
2722 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-filters.php:31
|
2723 |
msgid "Keywords"
|
2724 |
msgstr ""
|
2725 |
|
2726 |
#: templates/job-filters.php:47
|
2727 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-filters.php:47
|
2728 |
msgid "Category"
|
2729 |
msgstr ""
|
2730 |
|
2731 |
#: templates/job-filters.php:51
|
2732 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-filters.php:51
|
2733 |
msgid "Any category"
|
2734 |
msgstr ""
|
2735 |
|
2736 |
#: templates/job-filters.php:68
|
2737 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-filters.php:68
|
2738 |
msgid "Search Jobs"
|
2739 |
msgstr ""
|
2740 |
|
2741 |
#: templates/job-filters.php:80
|
2742 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-filters.php:80
|
2743 |
msgid "Your browser does not support JavaScript, or it is disabled. JavaScript must be enabled in order to view listings."
|
2744 |
msgstr ""
|
2745 |
|
2746 |
#: templates/job-preview.php:28
|
2747 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-preview.php:28
|
2748 |
msgid "Submit Listing"
|
2749 |
msgstr ""
|
2750 |
|
2751 |
#: templates/job-preview.php:29
|
2752 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-preview.php:29
|
2753 |
msgid "Edit listing"
|
2754 |
msgstr ""
|
2755 |
|
2756 |
#: templates/job-submit.php:24
|
2757 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-submit.php:24
|
2758 |
msgid "You are editing an existing job. %s"
|
2759 |
msgstr ""
|
2760 |
|
2761 |
#: templates/job-submit.php:24
|
2762 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-submit.php:24
|
2763 |
msgid "Create A New Job"
|
2764 |
msgstr ""
|
2765 |
|
2766 |
#: templates/job-submit.php:54
|
2767 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-submit.php:54
|
2768 |
msgid "Company Details"
|
2769 |
msgstr ""
|
2770 |
|
2771 |
#: templates/job-submit.php:79
|
2772 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-submit.php:79
|
2773 |
msgid "Save Draft"
|
2774 |
msgstr ""
|
2775 |
|
2780 |
|
2781 |
#. translators: Placeholder %s is the job listing post type name.
|
2782 |
#: templates/job-submitted.php:35
|
2783 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-submitted.php:33
|
2784 |
msgid "%s submitted successfully. Your listing will be visible once approved."
|
2785 |
msgstr ""
|
2786 |
|
2793 |
msgid " <a href=\"%s\"> %s</a>"
|
2794 |
msgstr ""
|
2795 |
|
2796 |
+
#. translators: jQuery date format, see http://api.jqueryui.com/datepicker/#utility-formatDate
|
2797 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-admin.php:123
|
2798 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php:490
|
2799 |
+
msgctxt "Date format for jQuery datepicker."
|
2800 |
+
msgid "yy-mm-dd"
|
2801 |
+
msgstr ""
|
2802 |
+
|
2803 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:114
|
2804 |
+
msgid "Delete WP Job Manager data when the plugin is deleted. Once removed, this data cannot be restored."
|
2805 |
+
msgstr ""
|
2806 |
+
|
2807 |
+
#. translators: Placeholder %s is URL to set up Google reCAPTCHA API key.
|
2808 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:325
|
2809 |
+
msgid "You can retrieve your site key from <a href=\"%s\">Google's reCAPTCHA admin dashboard</a>."
|
2810 |
msgstr ""
|
2811 |
|
2812 |
+
#. translators: Placeholder %s is URL to set up Google reCAPTCHA API key.
|
2813 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/admin/class-wp-job-manager-settings.php:334
|
2814 |
+
msgid "You can retrieve your secret key from <a href=\"%s\">Google's reCAPTCHA admin dashboard</a>."
|
2815 |
+
msgstr ""
|
2816 |
+
|
2817 |
+
#. translators: Placeholders %1$s and %2$s are the names of the two cookies used in WP Job Manager.
|
2818 |
+
#: tmp/release-svn/wp-job-manager/trunk/includes/class-wp-job-manager.php:138
|
2819 |
+
msgid ""
|
2820 |
+
"This site adds the following cookies to help users resume job submissions that they \n"
|
2821 |
+
"\t\t\t\thave started but have not completed: %1$s and %2$s"
|
2822 |
+
msgstr ""
|
2823 |
+
|
2824 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/account-signin.php:45
|
2825 |
+
msgid "If you don't have an account you can %screate one below by entering your email address/username."
|
2826 |
+
msgstr ""
|
2827 |
+
|
2828 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/admin-expiring-job.php:30
|
2829 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/employer-expiring-job.php:29
|
2830 |
+
msgid "The following job listing is expiring today from %s (%s)."
|
2831 |
+
msgstr ""
|
2832 |
+
|
2833 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/admin-expiring-job.php:36
|
2834 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/employer-expiring-job.php:31
|
2835 |
+
msgid "The following job listing is expiring soon from %s (%s)."
|
2836 |
+
msgstr ""
|
2837 |
+
|
2838 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/admin-new-job.php:23
|
2839 |
+
msgid "A new job listing has been submitted to %s (%s)."
|
2840 |
+
msgstr ""
|
2841 |
+
|
2842 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/emails/plain/admin-updated-job.php:23
|
2843 |
+
msgid "A job listing has been updated on %s (%s)."
|
2844 |
+
msgstr ""
|
2845 |
+
|
2846 |
+
#: tmp/release-svn/wp-job-manager/trunk/templates/job-submitted.php:24
|
2847 |
+
msgid "%s listed successfully. To view your listing <a href=\"%s\">click here</a>."
|
2848 |
+
msgstr ""
|
2849 |
+
|
2850 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:328
|
2851 |
#: wp-job-manager-functions.php:359
|
2852 |
msgctxt "post status"
|
2853 |
msgid "Draft"
|
2854 |
msgstr ""
|
2855 |
|
2856 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:331
|
2857 |
#: wp-job-manager-functions.php:362
|
2858 |
msgctxt "post status"
|
2859 |
msgid "Pending approval"
|
2860 |
msgstr ""
|
2861 |
|
2862 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:332
|
2863 |
#: wp-job-manager-functions.php:363
|
2864 |
msgctxt "post status"
|
2865 |
msgid "Pending payment"
|
2866 |
msgstr ""
|
2867 |
|
2868 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:333
|
2869 |
#: wp-job-manager-functions.php:364
|
2870 |
msgctxt "post status"
|
2871 |
msgid "Active"
|
2872 |
msgstr ""
|
2873 |
|
2874 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:454
|
2875 |
#: wp-job-manager-functions.php:485
|
2876 |
msgid "Reset"
|
2877 |
msgstr ""
|
2878 |
|
2879 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:458
|
2880 |
#: wp-job-manager-functions.php:489
|
2881 |
msgid "RSS"
|
2882 |
msgstr ""
|
2883 |
|
2884 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:566
|
2885 |
#: wp-job-manager-functions.php:597
|
2886 |
msgid "Invalid email address."
|
2887 |
msgstr ""
|
2888 |
|
2889 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:574
|
2890 |
#: wp-job-manager-functions.php:605
|
2891 |
msgid "Your email address isn’t correct."
|
2892 |
msgstr ""
|
2893 |
|
2894 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:578
|
2895 |
#: wp-job-manager-functions.php:609
|
2896 |
msgid "This email is already registered, please choose another one."
|
2897 |
msgstr ""
|
2898 |
|
2899 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:892
|
2900 |
#: wp-job-manager-functions.php:920
|
2901 |
msgid "Full Time"
|
2902 |
msgstr ""
|
2903 |
|
2904 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:893
|
2905 |
#: wp-job-manager-functions.php:921
|
2906 |
msgid "Part Time"
|
2907 |
msgstr ""
|
2908 |
|
2909 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:894
|
2910 |
#: wp-job-manager-functions.php:922
|
2911 |
msgid "Contractor"
|
2912 |
msgstr ""
|
2913 |
|
2914 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:895
|
2915 |
#: wp-job-manager-functions.php:923
|
2916 |
msgid "Temporary"
|
2917 |
msgstr ""
|
2918 |
|
2919 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:896
|
2920 |
#: wp-job-manager-functions.php:924
|
2921 |
msgid "Intern"
|
2922 |
msgstr ""
|
2923 |
|
2924 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:897
|
2925 |
#: wp-job-manager-functions.php:925
|
2926 |
msgid "Volunteer"
|
2927 |
msgstr ""
|
2928 |
|
2929 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:898
|
2930 |
#: wp-job-manager-functions.php:926
|
2931 |
msgid "Per Diem"
|
2932 |
msgstr ""
|
2933 |
|
2934 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:899
|
2935 |
#: wp-job-manager-functions.php:927
|
2936 |
msgid "Other"
|
2937 |
msgstr ""
|
2938 |
|
2939 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:966
|
2940 |
#: wp-job-manager-functions.php:994
|
2941 |
msgid "Passwords must be at least 8 characters long."
|
2942 |
msgstr ""
|
2943 |
|
2944 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:1085
|
2945 |
#: wp-job-manager-functions.php:1159
|
2946 |
msgid "Choose a category…"
|
2947 |
msgstr ""
|
2948 |
|
2949 |
#. translators: %s is the list of allowed file types.
|
2950 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-functions.php:1307
|
2951 |
#: wp-job-manager-functions.php:1396
|
2952 |
msgid "Uploaded files need to be one of the following file types: %s"
|
2953 |
msgstr ""
|
2954 |
|
2955 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-template.php:155
|
2956 |
#: wp-job-manager-template.php:155
|
2957 |
msgid "Inactive"
|
2958 |
msgstr ""
|
2959 |
|
2960 |
#. translators: %1$s is the job listing title; %2$s is the URL for the current WordPress instance.
|
2961 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-template.php:249
|
2962 |
#: wp-job-manager-template.php:249
|
2963 |
msgid "Application via %1$s listing on %2$s"
|
2964 |
msgstr ""
|
2965 |
|
2966 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-template.php:693
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2967 |
#: wp-job-manager-template.php:716
|
2968 |
msgid "Username"
|
2969 |
msgstr ""
|
2970 |
|
2971 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-template.php:702
|
2972 |
#: wp-job-manager-template.php:725
|
2973 |
msgid "Password"
|
2974 |
msgstr ""
|
2975 |
|
2976 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-template.php:712
|
2977 |
#: wp-job-manager-template.php:735
|
2978 |
msgid "Verify Password"
|
2979 |
msgstr ""
|
2980 |
|
2981 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-template.php:719
|
2982 |
+
#: wp-job-manager-template.php:707
|
2983 |
+
msgid "Your email"
|
2984 |
+
msgstr ""
|
2985 |
+
|
2986 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-template.php:720
|
2987 |
+
#: wp-job-manager-template.php:708
|
2988 |
+
msgid "you@yourdomain.com"
|
2989 |
+
msgstr ""
|
2990 |
+
|
2991 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-template.php:747
|
2992 |
#: wp-job-manager-template.php:762
|
2993 |
msgid "Posted on "
|
2994 |
msgstr ""
|
2995 |
|
2996 |
#. translators: Placeholder %s is the relative, human readable time since the job listing was posted.
|
2997 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-template.php:750
|
2998 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-template.php:771
|
2999 |
#: wp-job-manager-template.php:765
|
3000 |
#: wp-job-manager-template.php:786
|
3001 |
msgid "Posted %s ago"
|
3002 |
msgstr ""
|
3003 |
|
3004 |
+
#: tmp/release-svn/wp-job-manager/trunk/wp-job-manager-template.php:801
|
|
|
|
|
|
|
3005 |
#: wp-job-manager-template.php:825
|
3006 |
msgid "Anywhere"
|
3007 |
msgstr ""
|
3008 |
+
|
3009 |
+
#. translators: This one is used to determine if the user is searching for remote work type.
|
3010 |
+
#: wp-job-manager-functions.php:78
|
3011 |
+
msgid "remote"
|
3012 |
+
msgstr ""
|
3013 |
+
|
3014 |
+
#: wp-job-manager-template.php:801
|
3015 |
+
msgid "Remote"
|
3016 |
+
msgstr ""
|
lib/wpjm_rest/class-wp-job-manager-rest-bootstrap.php
ADDED
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Bootstrap
|
4 |
+
*
|
5 |
+
* Loads classes and creates an Environment subclass instance from
|
6 |
+
* the specified lib location, with the specified prefix
|
7 |
+
*
|
8 |
+
* @package Mixtape
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Class WP_Job_Manager_REST_Bootstrap
|
17 |
+
*
|
18 |
+
* This is the entry point for.
|
19 |
+
*/
|
20 |
+
class WP_Job_Manager_REST_Bootstrap {
|
21 |
+
const MINIMUM_PHP_VERSION = '5.2.0';
|
22 |
+
|
23 |
+
/**
|
24 |
+
* The Environment we will use
|
25 |
+
*
|
26 |
+
* @var null|object the Environment implementation.
|
27 |
+
*/
|
28 |
+
private $environment = null;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* The class loader we will use
|
32 |
+
*
|
33 |
+
* @var null|WP_Job_Manager_REST_Classloader
|
34 |
+
*/
|
35 |
+
private $class_loader = null;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Construct a new Bootstrap
|
39 |
+
*
|
40 |
+
* @param null|WP_Job_Manager_REST_Interfaces_Classloader $class_loader The class loader to use.
|
41 |
+
*/
|
42 |
+
private function __construct( $class_loader = null ) {
|
43 |
+
$this->class_loader = $class_loader;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Check compatibility of PHP Version.
|
48 |
+
*
|
49 |
+
* @return bool
|
50 |
+
*/
|
51 |
+
public static function is_compatible() {
|
52 |
+
return version_compare( phpversion(), self::MINIMUM_PHP_VERSION, '>=' );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Get Base Dir
|
57 |
+
*
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public static function get_base_dir() {
|
61 |
+
return untrailingslashit( dirname( __FILE__ ) );
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Create a Bootstrap, unless we are using a really early php version (< 5.3.0)
|
66 |
+
*
|
67 |
+
* @param WP_Job_Manager_REST_Interfaces_Classloader|null $class_loader The class loader to use.
|
68 |
+
* @return WP_Job_Manager_REST_Bootstrap|null
|
69 |
+
*/
|
70 |
+
public static function create( $class_loader = null ) {
|
71 |
+
if ( empty( $class_loader ) ) {
|
72 |
+
include_once( 'interfaces/class-wp-job-manager-rest-interfaces-classloader.php' );
|
73 |
+
include_once( 'class-wp-job-manager-rest-classloader.php' );
|
74 |
+
$prefix = str_replace( '_Bootstrap', '', __CLASS__ );
|
75 |
+
$base_dir = self::get_base_dir();
|
76 |
+
$class_loader = new WP_Job_Manager_REST_Classloader( $prefix, $base_dir );
|
77 |
+
}
|
78 |
+
return new self( $class_loader );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Run the app
|
83 |
+
*
|
84 |
+
* @return bool
|
85 |
+
*/
|
86 |
+
public function run() {
|
87 |
+
if ( ! self::is_compatible() ) {
|
88 |
+
return false;
|
89 |
+
}
|
90 |
+
$this->load()
|
91 |
+
->environment()->start();
|
92 |
+
return true;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Optional: Instead of calling load() you can
|
97 |
+
* register as an auto-loader
|
98 |
+
*
|
99 |
+
* @return WP_Job_Manager_REST_Bootstrap $this
|
100 |
+
*/
|
101 |
+
function register_autoload() {
|
102 |
+
if ( function_exists( 'spl_autoload_register' ) ) {
|
103 |
+
spl_autoload_register( array( $this->class_loader(), 'load_class' ), true );
|
104 |
+
}
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Loads all classes
|
110 |
+
*
|
111 |
+
* @return WP_Job_Manager_REST_Bootstrap $this
|
112 |
+
* @throws Exception In case a class/file is not found.
|
113 |
+
*/
|
114 |
+
function load() {
|
115 |
+
$this->class_loader()
|
116 |
+
->load_class( 'Interfaces_Data_Store' )
|
117 |
+
->load_class( 'Interfaces_Registrable' )
|
118 |
+
->load_class( 'Interfaces_Type' )
|
119 |
+
->load_class( 'Interfaces_Model' )
|
120 |
+
->load_class( 'Interfaces_Builder' )
|
121 |
+
->load_class( 'Interfaces_Model_Collection' )
|
122 |
+
->load_class( 'Interfaces_Controller' )
|
123 |
+
->load_class( 'Interfaces_Controller_Bundle' )
|
124 |
+
->load_class( 'Interfaces_Permissions_Provider' )
|
125 |
+
->load_class( 'Exception' )
|
126 |
+
->load_class( 'Expect' )
|
127 |
+
->load_class( 'Events' )
|
128 |
+
->load_class( 'Environment' )
|
129 |
+
->load_class( 'Type' )
|
130 |
+
->load_class( 'Type_String' )
|
131 |
+
->load_class( 'Type_Integer' )
|
132 |
+
->load_class( 'Type_Number' )
|
133 |
+
->load_class( 'Type_Boolean' )
|
134 |
+
->load_class( 'Type_Array' )
|
135 |
+
->load_class( 'Type_TypedArray' )
|
136 |
+
->load_class( 'Type_Nullable' )
|
137 |
+
->load_class( 'Type_Model' )
|
138 |
+
->load_class( 'Type_Registry' )
|
139 |
+
->load_class( 'Data_Store_Nil' )
|
140 |
+
->load_class( 'Data_Store_Abstract' )
|
141 |
+
->load_class( 'Data_Store_CustomPostType' )
|
142 |
+
->load_class( 'Data_Store_Option' )
|
143 |
+
->load_class( 'Permissions_Any' )
|
144 |
+
->load_class( 'Field_Declaration' )
|
145 |
+
->load_class( 'Field_Declaration_Builder' )
|
146 |
+
->load_class( 'Model' )
|
147 |
+
->load_class( 'Model_Settings' )
|
148 |
+
->load_class( 'Model_Collection' )
|
149 |
+
->load_class( 'Controller' )
|
150 |
+
->load_class( 'Controller_Action' )
|
151 |
+
->load_class( 'Controller_Model' )
|
152 |
+
->load_class( 'Controller_Settings' )
|
153 |
+
->load_class( 'Controller_Route' )
|
154 |
+
->load_class( 'Controller_CRUD' )
|
155 |
+
->load_class( 'Controller_Bundle' )
|
156 |
+
->load_class( 'Controller_Extension' )
|
157 |
+
->load_class( 'Controller_Bundle_Builder' );
|
158 |
+
|
159 |
+
return $this;
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Load Unit Testing Base Classes
|
164 |
+
*
|
165 |
+
* @return WP_Job_Manager_REST_Bootstrap $this
|
166 |
+
*/
|
167 |
+
function load_testing_classes() {
|
168 |
+
$this->class_loader()
|
169 |
+
->load_class( 'Testing_TestCase' )
|
170 |
+
->load_class( 'Testing_Model_TestCase' )
|
171 |
+
->load_class( 'Testing_Controller_TestCase' );
|
172 |
+
return $this;
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Get the class loader
|
177 |
+
*
|
178 |
+
* @return WP_Job_Manager_REST_Classloader
|
179 |
+
*/
|
180 |
+
function class_loader() {
|
181 |
+
return $this->class_loader;
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Lazy-load the environment
|
186 |
+
*
|
187 |
+
* @return WP_Job_Manager_REST_Environment
|
188 |
+
*/
|
189 |
+
public function environment() {
|
190 |
+
if ( null === $this->environment ) {
|
191 |
+
$this->load();
|
192 |
+
$this->environment = new WP_Job_Manager_REST_Environment( $this );
|
193 |
+
}
|
194 |
+
return $this->environment;
|
195 |
+
}
|
196 |
+
}
|
lib/wpjm_rest/class-wp-job-manager-rest-classloader.php
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Default Mixtape_Interfaces_Class_Loader Implementation
|
4 |
+
*
|
5 |
+
* Loads classes in nested folders.
|
6 |
+
*
|
7 |
+
* @package Mixtape
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class WP_Job_Manager_REST_Class_Loader
|
16 |
+
*/
|
17 |
+
class WP_Job_Manager_REST_Classloader implements WP_Job_Manager_REST_Interfaces_Classloader {
|
18 |
+
/**
|
19 |
+
* Keep a record of classes loaded
|
20 |
+
*
|
21 |
+
* @var array The loaded class map.
|
22 |
+
*/
|
23 |
+
private $loaded_classes;
|
24 |
+
/**
|
25 |
+
* The prefix to use (e.g. Mixtape)
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
private $prefix;
|
30 |
+
/**
|
31 |
+
* The directory the loader looks for classes.
|
32 |
+
*
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
private $base_dir;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* WP_Job_Manager_REST_Class_Loader constructor.
|
39 |
+
*
|
40 |
+
* @param string $prefix The prefix to use (e.g. Mixtape).
|
41 |
+
* @param string $base_dir The directory the loader looks for classes.
|
42 |
+
*
|
43 |
+
* @throws Exception Throws if an invalid directory is provided.
|
44 |
+
*/
|
45 |
+
public function __construct( $prefix, $base_dir ) {
|
46 |
+
$this->loaded_classes = array();
|
47 |
+
$this->prefix = $prefix;
|
48 |
+
$this->base_dir = $base_dir;
|
49 |
+
if ( ! is_dir( $this->base_dir ) ) {
|
50 |
+
throw new Exception( 'base_dir does not exist: ' . $this->base_dir );
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Loads a class
|
56 |
+
*
|
57 |
+
* @param string $class_name The class to load.
|
58 |
+
*
|
59 |
+
* @return WP_Job_Manager_REST_Interfaces_Classloader
|
60 |
+
* @throws Exception Throws in case include_class_file fails.
|
61 |
+
*/
|
62 |
+
public function load_class( $class_name ) {
|
63 |
+
$path = $this->get_path_to_class_file( $class_name );
|
64 |
+
return $this->include_class_file( $path );
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Get path_to_class_file
|
69 |
+
*
|
70 |
+
* @param string $class_name The class.
|
71 |
+
*
|
72 |
+
* @return string The full path to the file.
|
73 |
+
*/
|
74 |
+
public function get_path_to_class_file( $class_name ) {
|
75 |
+
return path_join( $this->base_dir, $this->class_name_to_relative_path( $class_name ) );
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Class_name_to_relative_path
|
80 |
+
*
|
81 |
+
* @param string $class_name The class name.
|
82 |
+
* @param null|string $prefix The prefix.
|
83 |
+
*
|
84 |
+
* @return string
|
85 |
+
*/
|
86 |
+
public function class_name_to_relative_path( $class_name, $prefix = null ) {
|
87 |
+
$lowercase = strtolower( $this->prefixed_class_name( $class_name, $prefix ) );
|
88 |
+
$file_name = 'class-' . str_replace( '_', '-', $lowercase ) . '.php';
|
89 |
+
$parts = explode( '_', strtolower( $this->strip_prefix( $class_name, $prefix ) ) );
|
90 |
+
array_pop( $parts );
|
91 |
+
$parts[] = $file_name;
|
92 |
+
return implode( DIRECTORY_SEPARATOR, $parts );
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Prefixed_class_name
|
97 |
+
*
|
98 |
+
* @param string $class_name The class name.
|
99 |
+
* @param null|string $prefix The prefix.
|
100 |
+
*
|
101 |
+
* @return string
|
102 |
+
*/
|
103 |
+
public function prefixed_class_name( $class_name, $prefix = null ) {
|
104 |
+
if ( empty( $prefix ) ) {
|
105 |
+
$prefix = $this->prefix;
|
106 |
+
}
|
107 |
+
return $prefix . '_' . $this->strip_prefix( $class_name, $prefix );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Strip_prefix
|
112 |
+
*
|
113 |
+
* @param string $class_name The class name.
|
114 |
+
* @param null|string $prefix The prefix.
|
115 |
+
*
|
116 |
+
* @return string
|
117 |
+
*/
|
118 |
+
private function strip_prefix( $class_name, $prefix = null ) {
|
119 |
+
if ( empty( $prefix ) ) {
|
120 |
+
$prefix = $this->prefix;
|
121 |
+
}
|
122 |
+
return str_replace( $prefix, '', $class_name );
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Include_class_file
|
127 |
+
*
|
128 |
+
* @param string $path_to_the_class The file path.
|
129 |
+
*
|
130 |
+
* @return string
|
131 |
+
* @throws Exception Throws when the file does not exist.
|
132 |
+
*/
|
133 |
+
private function include_class_file( $path_to_the_class ) {
|
134 |
+
if ( isset( $this->loaded_classes[ $path_to_the_class ] ) ) {
|
135 |
+
return $this;
|
136 |
+
}
|
137 |
+
if ( ! file_exists( $path_to_the_class ) ) {
|
138 |
+
throw new Exception( $path_to_the_class . ' not found' );
|
139 |
+
}
|
140 |
+
$included = include_once( $path_to_the_class );
|
141 |
+
$this->loaded_classes[ $path_to_the_class ] = $included;
|
142 |
+
|
143 |
+
return $this;
|
144 |
+
}
|
145 |
+
}
|
lib/wpjm_rest/class-wp-job-manager-rest-controller.php
ADDED
@@ -0,0 +1,285 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Controller
|
4 |
+
*
|
5 |
+
* @package Mixtape/Controller
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Controller
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Controller extends WP_REST_Controller implements WP_Job_Manager_REST_Interfaces_Controller {
|
16 |
+
const HTTP_CREATED = 201;
|
17 |
+
const HTTP_OK = 200;
|
18 |
+
const HTTP_BAD_REQUEST = 400;
|
19 |
+
const HTTP_NOT_FOUND = 404;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* The bundle this belongs to.
|
23 |
+
*
|
24 |
+
* @var WP_Job_Manager_REST_Controller_Bundle
|
25 |
+
*/
|
26 |
+
protected $controller_bundle;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The endpoint base (e.g. /users). Override in subclasses.
|
30 |
+
*
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
protected $base = null;
|
34 |
+
/**
|
35 |
+
* Our Handlers
|
36 |
+
*
|
37 |
+
* @var array
|
38 |
+
*/
|
39 |
+
private $routes = array();
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Optional, an enviromnent.
|
43 |
+
*
|
44 |
+
* @var null|WP_Job_Manager_REST_Environment
|
45 |
+
*/
|
46 |
+
protected $environment = null;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* WP_Job_Manager_REST_Rest_Api_Controller constructor.
|
50 |
+
*/
|
51 |
+
public function __construct() {
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Set Controller Bundle
|
56 |
+
*
|
57 |
+
* @param WP_Job_Manager_REST_Controller_Bundle $controller_bundle Controller Bundle this belongs to.
|
58 |
+
*
|
59 |
+
* @return WP_Job_Manager_REST_Controller $this
|
60 |
+
*/
|
61 |
+
public function set_controller_bundle( $controller_bundle ) {
|
62 |
+
$this->controller_bundle = $controller_bundle;
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Set the Environment for this Controller.
|
68 |
+
*
|
69 |
+
* @param WP_Job_Manager_REST_Environment|null $environment The Environment.
|
70 |
+
* @return WP_Job_Manager_REST_Controller
|
71 |
+
*/
|
72 |
+
public function set_environment( $environment ) {
|
73 |
+
$this->environment = $environment;
|
74 |
+
return $this;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Register This Controller
|
79 |
+
*
|
80 |
+
* @param WP_Job_Manager_REST_Controller_Bundle $bundle The bundle to register with.
|
81 |
+
* @param WP_Job_Manager_REST_Environment $environment The Environment to use.
|
82 |
+
* @throws WP_Job_Manager_REST_Exception Throws.
|
83 |
+
*
|
84 |
+
* @return bool|WP_Error true if valid otherwise error.
|
85 |
+
*/
|
86 |
+
public function register( $bundle, $environment ) {
|
87 |
+
$this->set_controller_bundle( $bundle );
|
88 |
+
$this->set_environment( $environment );
|
89 |
+
$this->setup();
|
90 |
+
WP_Job_Manager_REST_Expect::that( ! empty( $this->base ), 'Need to put a string with a backslash in $base' );
|
91 |
+
$prefix = $this->controller_bundle->get_prefix();
|
92 |
+
foreach ( $this->routes as $pattern => $route ) {
|
93 |
+
/**
|
94 |
+
* The route we want to register.
|
95 |
+
*
|
96 |
+
* @var WP_Job_Manager_REST_Controller_Route $route
|
97 |
+
*/
|
98 |
+
$params = $route->as_array();
|
99 |
+
$result = register_rest_route( $prefix, $this->base . $params['pattern'], $params['actions'] );
|
100 |
+
if ( false === $result ) {
|
101 |
+
// For now we throw on error, maybe we just need to warn though.
|
102 |
+
throw new WP_Job_Manager_REST_Exception( 'Registration failed' );
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
return true;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Create Action
|
111 |
+
*
|
112 |
+
* @param string $action_name Action Name.
|
113 |
+
* @param null|string|array|callable $callback Callback.
|
114 |
+
* @return WP_Job_Manager_REST_Controller_Action
|
115 |
+
*/
|
116 |
+
public function action( $action_name, $callback = null ) {
|
117 |
+
$route_action = new WP_Job_Manager_REST_Controller_Action( $this, $action_name );
|
118 |
+
if ( null !== $callback ) {
|
119 |
+
$route_action->callback( $callback );
|
120 |
+
}
|
121 |
+
|
122 |
+
return $route_action;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Do any additional Configuration. Runs inside register before any register_rest_route
|
127 |
+
*
|
128 |
+
* This is a good place for overriding classes to define routes and handlers
|
129 |
+
*/
|
130 |
+
protected function setup() {
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Succeed
|
135 |
+
*
|
136 |
+
* @param array $data The dto.
|
137 |
+
*
|
138 |
+
* @return WP_REST_Response
|
139 |
+
*/
|
140 |
+
public function ok( $data ) {
|
141 |
+
return $this->respond( $data, self::HTTP_OK );
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Created
|
146 |
+
*
|
147 |
+
* @param array $data The dto.
|
148 |
+
*
|
149 |
+
* @return WP_REST_Response
|
150 |
+
*/
|
151 |
+
public function created( $data ) {
|
152 |
+
return $this->respond( $data, self::HTTP_CREATED );
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Bad request
|
157 |
+
*
|
158 |
+
* @param array|WP_Error $data The dto.
|
159 |
+
*
|
160 |
+
* @return WP_REST_Response
|
161 |
+
*/
|
162 |
+
public function bad_request( $data ) {
|
163 |
+
return $this->respond( $data, self::HTTP_BAD_REQUEST );
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Not Found (404)
|
168 |
+
*
|
169 |
+
* @param string $message The message.
|
170 |
+
*
|
171 |
+
* @return WP_REST_Response
|
172 |
+
*/
|
173 |
+
public function not_found( $message ) {
|
174 |
+
return $this->respond( array(
|
175 |
+
'message' => $message,
|
176 |
+
), self::HTTP_NOT_FOUND );
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Respond
|
181 |
+
*
|
182 |
+
* @param array|WP_REST_Response|WP_Error|mixed $data The thing.
|
183 |
+
* @param int $status The Status.
|
184 |
+
*
|
185 |
+
* @return mixed|WP_REST_Response
|
186 |
+
*/
|
187 |
+
public function respond( $data, $status ) {
|
188 |
+
if ( is_a( $data, 'WP_REST_Response' ) ) {
|
189 |
+
return $data;
|
190 |
+
}
|
191 |
+
|
192 |
+
return new WP_REST_Response( $data, $status );
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Permissions for get_items
|
197 |
+
*
|
198 |
+
* @param WP_REST_Request $request Request.
|
199 |
+
* @return bool
|
200 |
+
*/
|
201 |
+
public function index_permissions_check( $request ) {
|
202 |
+
return $this->permissions_check( $request, 'index' );
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Permissions for get_item
|
207 |
+
*
|
208 |
+
* @param WP_REST_Request $request The request.
|
209 |
+
* @return bool
|
210 |
+
*/
|
211 |
+
public function show_permissions_check( $request ) {
|
212 |
+
return $this->permissions_check( $request, 'show' );
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Permissions for create_item
|
217 |
+
*
|
218 |
+
* @param WP_REST_Request $request Request.
|
219 |
+
* @return bool
|
220 |
+
*/
|
221 |
+
public function create_permissions_check( $request ) {
|
222 |
+
return $this->permissions_check( $request, 'create' );
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Permissions for update_item
|
227 |
+
*
|
228 |
+
* @param WP_REST_Request $request Request.
|
229 |
+
* @return bool
|
230 |
+
*/
|
231 |
+
public function update_permissions_check( $request ) {
|
232 |
+
return $this->permissions_check( $request, 'update' );
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Permissions for delete
|
237 |
+
*
|
238 |
+
* @param WP_REST_Request $request Request.
|
239 |
+
* @return bool
|
240 |
+
*/
|
241 |
+
public function delete_permissions_check( $request ) {
|
242 |
+
return $this->permissions_check( $request, 'delete' );
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Generic Permissions Check.
|
247 |
+
*
|
248 |
+
* @param WP_REST_Request $request Request.
|
249 |
+
* @param string $action One of (index, show, create, update, delete, any).
|
250 |
+
* @return bool
|
251 |
+
*/
|
252 |
+
function permissions_check( $request, $action = 'any' ) {
|
253 |
+
return true;
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Add a route
|
258 |
+
*
|
259 |
+
* @param string $pattern The route pattern (e.g. '/').
|
260 |
+
* @return WP_Job_Manager_REST_Controller_Route
|
261 |
+
*/
|
262 |
+
function add_route( $pattern = '' ) {
|
263 |
+
$route = new WP_Job_Manager_REST_Controller_Route( $this, $pattern );
|
264 |
+
$this->routes[ $pattern ] = $route;
|
265 |
+
return $this->routes[ $pattern ];
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Get Environment
|
270 |
+
*
|
271 |
+
* @return WP_Job_Manager_REST_Environment
|
272 |
+
*/
|
273 |
+
protected function environment() {
|
274 |
+
return $this->environment;
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Get base url
|
279 |
+
*
|
280 |
+
* @return string
|
281 |
+
*/
|
282 |
+
function get_base() {
|
283 |
+
return rest_url( $this->controller_bundle->get_prefix() . $this->base );
|
284 |
+
}
|
285 |
+
}
|
lib/wpjm_rest/class-wp-job-manager-rest-environment.php
ADDED
@@ -0,0 +1,426 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Environment
|
4 |
+
*
|
5 |
+
* Contains variables, rest api, type and model definitions
|
6 |
+
*
|
7 |
+
* @package Mixtape
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class WP_Job_Manager_REST_Environment
|
16 |
+
*
|
17 |
+
* Our global Environment
|
18 |
+
*
|
19 |
+
* @package Mixtape
|
20 |
+
*/
|
21 |
+
class WP_Job_Manager_REST_Environment {
|
22 |
+
const REGISTRABLE = 'IRegistrable';
|
23 |
+
const BUNDLES = 'Bundles';
|
24 |
+
const MODELS = 'Models';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* This environment's registered REST bundles
|
28 |
+
*
|
29 |
+
* (used for versioned APIs, or logical grouping of related api parts)
|
30 |
+
*
|
31 |
+
* @var array
|
32 |
+
*/
|
33 |
+
protected $rest_apis;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* This environment's model definitions
|
37 |
+
*
|
38 |
+
* @var array
|
39 |
+
*/
|
40 |
+
protected $model_definitions;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* The Environment Variables
|
44 |
+
*
|
45 |
+
* A key-value array of things.
|
46 |
+
*
|
47 |
+
* @var array
|
48 |
+
*/
|
49 |
+
protected $variables;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Did this Environment start?
|
53 |
+
*
|
54 |
+
* @var bool
|
55 |
+
*/
|
56 |
+
private $has_started;
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Our Bootstrap
|
60 |
+
*
|
61 |
+
* @var WP_Job_Manager_REST_Bootstrap
|
62 |
+
*/
|
63 |
+
private $bootstrap;
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Our Type Registry
|
67 |
+
*
|
68 |
+
* @var WP_Job_Manager_REST_Type_Registry
|
69 |
+
*/
|
70 |
+
private $type_registry;
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Events
|
74 |
+
*
|
75 |
+
* @var WP_Job_Manager_REST_Events
|
76 |
+
*/
|
77 |
+
private $event_dispatcher;
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Mixtape_Environment constructor.
|
81 |
+
*
|
82 |
+
* @param WP_Job_Manager_REST_Bootstrap $bootstrap The bootstrap.
|
83 |
+
*/
|
84 |
+
public function __construct( $bootstrap ) {
|
85 |
+
$this->event_dispatcher = new WP_Job_Manager_REST_Events();
|
86 |
+
$this->bootstrap = $bootstrap;
|
87 |
+
$this->has_started = false;
|
88 |
+
$this->rest_apis = array();
|
89 |
+
$this->variables = array();
|
90 |
+
$this->model_definitions = array();
|
91 |
+
$this->type_registry = new WP_Job_Manager_REST_Type_Registry();
|
92 |
+
$this->type_registry->initialize( $this );
|
93 |
+
// initialize our array vars.
|
94 |
+
$this->array_var( self::MODELS )
|
95 |
+
->array_var( self::REGISTRABLE )
|
96 |
+
->array_var( self::BUNDLES );
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Get Event Dispacher
|
101 |
+
*
|
102 |
+
* @return WP_Job_Manager_REST_Events
|
103 |
+
*/
|
104 |
+
public function get_event_dispatcher() {
|
105 |
+
return $this->event_dispatcher;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Push a Builder to the Environment.
|
110 |
+
*
|
111 |
+
* All builders are evaluated lazily when needed
|
112 |
+
*
|
113 |
+
* @param string $where The queue to push the builder to.
|
114 |
+
* @param WP_Job_Manager_REST_Interfaces_Builder $builder The builder to push.
|
115 |
+
*
|
116 |
+
* @return WP_Job_Manager_REST_Environment $this
|
117 |
+
* @throws WP_Job_Manager_REST_Exception In case the $builder is not a Mixtape_Interfaces_Builder.
|
118 |
+
*/
|
119 |
+
public function push_builder( $where, $builder ) {
|
120 |
+
WP_Job_Manager_REST_Expect::that( is_string( $where ), '$where should be a string' );
|
121 |
+
WP_Job_Manager_REST_Expect::is_a( $builder, 'WP_Job_Manager_REST_Interfaces_Builder' );
|
122 |
+
return $this->array_var( $where, $builder );
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Retrieve a previously defined WP_Job_Manager_REST_Model
|
127 |
+
*
|
128 |
+
* @param string $class the class name.
|
129 |
+
* @return WP_Job_Manager_REST_Model the definition.
|
130 |
+
* @throws WP_Job_Manager_REST_Exception Throws in case the model is not registered.
|
131 |
+
*/
|
132 |
+
public function model( $class ) {
|
133 |
+
if ( ! class_exists( $class ) ) {
|
134 |
+
throw new WP_Job_Manager_REST_Exception( $class . ' does not exist' );
|
135 |
+
}
|
136 |
+
WP_Job_Manager_REST_Expect::that( isset( $this->model_definitions[ $class ] ), $class . ' definition does not exist' );
|
137 |
+
return $this->model_definitions[ $class ];
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Time to build pending models and bundles
|
142 |
+
*
|
143 |
+
* @param string $type One of (models, bundles).
|
144 |
+
* @return WP_Job_Manager_REST_Environment
|
145 |
+
*/
|
146 |
+
private function load_pending_builders( $type ) {
|
147 |
+
$things = $this->get( $type );
|
148 |
+
if ( ! empty( $things ) && is_array( $things ) ) {
|
149 |
+
foreach ( $things as $pending ) {
|
150 |
+
/**
|
151 |
+
* Our pending builder.
|
152 |
+
*
|
153 |
+
* @var WP_Job_Manager_REST_Interfaces_Builder $pending Our builder.
|
154 |
+
*/
|
155 |
+
if ( self::BUNDLES === $type ) {
|
156 |
+
$this->add_rest_bundle( $pending->build() );
|
157 |
+
}
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
return $this;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Start things up
|
166 |
+
*
|
167 |
+
* This should be called once our Environment is set up to our liking.
|
168 |
+
* Evaluates all Builders, creating missing REST Api and Model Definitions.
|
169 |
+
*
|
170 |
+
*
|
171 |
+
* It is recommended we hook this into 'rest_api_init'.
|
172 |
+
*
|
173 |
+
* @return WP_Job_Manager_REST_Environment $this
|
174 |
+
*/
|
175 |
+
public function start() {
|
176 |
+
if ( ! $this->bootstrap->is_compatible() ) {
|
177 |
+
// Do not even start on an incompatible system.
|
178 |
+
return $this;
|
179 |
+
}
|
180 |
+
|
181 |
+
if ( false === $this->has_started ) {
|
182 |
+
$this->get_event_dispatcher()->do_action( 'environment_before_start', $this, get_class( $this ) );
|
183 |
+
$this->load_pending_builders( self::MODELS );
|
184 |
+
$this->load_pending_builders( self::BUNDLES );
|
185 |
+
$registrables = $this->get( self::REGISTRABLE ) ? $this->get( self::REGISTRABLE ) : array();
|
186 |
+
foreach ( $registrables as $registrable ) {
|
187 |
+
/**
|
188 |
+
* A Registrable
|
189 |
+
*
|
190 |
+
* @var WP_Job_Manager_REST_Interfaces_Registrable $registrable
|
191 |
+
*/
|
192 |
+
$registrable->register( $this );
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Use this hook to add/remove rest api bundles
|
197 |
+
*
|
198 |
+
* @param array $rest_apis The existing rest apis.
|
199 |
+
* @param WP_Job_Manager_REST_Environment $this The Environment.
|
200 |
+
*/
|
201 |
+
$rest_apis = (array) $this->get_event_dispatcher()->apply_filters( 'environment_get_rest_apis', $this->rest_apis, $this );
|
202 |
+
|
203 |
+
foreach ( $rest_apis as $k => $bundle ) {
|
204 |
+
/**
|
205 |
+
* Register this bundle
|
206 |
+
*
|
207 |
+
* @var WP_Job_Manager_REST_Interfaces_Controller_Bundle
|
208 |
+
*/
|
209 |
+
$bundle->register( $this );
|
210 |
+
}
|
211 |
+
$this->has_started = true;
|
212 |
+
$this->get_event_dispatcher()->do_action( 'environment_after_start', $this );
|
213 |
+
}
|
214 |
+
|
215 |
+
return $this;
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Add Registrable
|
220 |
+
*
|
221 |
+
* @param WP_Job_Manager_REST_Interfaces_Registrable $registrable_thing Registrable.
|
222 |
+
* @return WP_Job_Manager_REST_Environment
|
223 |
+
* @throws WP_Job_Manager_REST_Exception When not a WP_Job_Manager_REST_Interfaces_Registrable.
|
224 |
+
*/
|
225 |
+
public function add_registrable( $registrable_thing ) {
|
226 |
+
WP_Job_Manager_REST_Expect::is_a( $registrable_thing, 'WP_Job_Manager_REST_Interfaces_Registrable' );
|
227 |
+
$this->array_var( self::REGISTRABLE, $registrable_thing );
|
228 |
+
return $this->define_var( get_class( $registrable_thing ), $registrable_thing );
|
229 |
+
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Has Variable
|
233 |
+
*
|
234 |
+
* @param string $name Is this variable Set.
|
235 |
+
* @return bool
|
236 |
+
*/
|
237 |
+
public function has_variable( $name ) {
|
238 |
+
return isset( $this->variables[ $name ] );
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Append to an array
|
243 |
+
*
|
244 |
+
* @param string $name The VarArray Name.
|
245 |
+
* @param mixed $thing The thing.
|
246 |
+
* @return WP_Job_Manager_REST_Environment
|
247 |
+
*/
|
248 |
+
public function array_var( $name, $thing = null ) {
|
249 |
+
return $this->define_var( $name, $thing, true );
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Get A Variable
|
254 |
+
*
|
255 |
+
* @param string $name The Variable Name.
|
256 |
+
* @return mixed|null The variable or null
|
257 |
+
*
|
258 |
+
* @throws WP_Job_Manager_REST_Exception Name should be a string.
|
259 |
+
*/
|
260 |
+
public function get( $name ) {
|
261 |
+
WP_Job_Manager_REST_Expect::that( is_string( $name ), '$name should be a string' );
|
262 |
+
$value = $this->has_variable( $name ) ? $this->variables[ $name ] : null;
|
263 |
+
/**
|
264 |
+
* Filter the variable value
|
265 |
+
*
|
266 |
+
* @param mixed $value The value.
|
267 |
+
* @param WP_Job_Manager_REST_Environment $this The Environemnt.
|
268 |
+
* @param string $name The var name.
|
269 |
+
*
|
270 |
+
* @return mixed
|
271 |
+
*/
|
272 |
+
return $this->get_event_dispatcher()->apply_filters( 'variable_get', $value, $this, $name );
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Def.
|
277 |
+
*
|
278 |
+
* @param string $name The Variable To Add.
|
279 |
+
* @param mixed $thing The thing that is associated with the var.
|
280 |
+
* @param bool $append If true, this var is a list.
|
281 |
+
*
|
282 |
+
* @return $this
|
283 |
+
*
|
284 |
+
* @throws WP_Job_Manager_REST_Exception When name is not a string.
|
285 |
+
*/
|
286 |
+
public function define_var( $name, $thing = null, $append = false ) {
|
287 |
+
WP_Job_Manager_REST_Expect::that( is_string( $name ), '$name should be a string' );
|
288 |
+
if ( $append && ! $this->has_variable( $name ) ) {
|
289 |
+
$this->variables[ $name ] = array();
|
290 |
+
}
|
291 |
+
if ( null !== $thing ) {
|
292 |
+
if ( $append ) {
|
293 |
+
$this->variables[ $name ][] = $thing;
|
294 |
+
} else {
|
295 |
+
$this->variables[ $name ] = $thing;
|
296 |
+
}
|
297 |
+
}
|
298 |
+
return $this;
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Auto start on rest_api_init. For more control, use ::start();
|
303 |
+
*/
|
304 |
+
public function auto_start() {
|
305 |
+
add_action( 'rest_api_init', array( $this, 'start' ) );
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Get this Environment's bootstrap instance
|
310 |
+
*
|
311 |
+
* @return WP_Job_Manager_REST_Bootstrap our bootstrap.
|
312 |
+
*/
|
313 |
+
public function get_bootstrap() {
|
314 |
+
return $this->bootstrap;
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* Create a new Field Declaration Builder
|
319 |
+
*
|
320 |
+
* @param null|string $name Optional, the field name.
|
321 |
+
* @param null|string $description Optional, the description.
|
322 |
+
* @param null|string $field_kind The field kind (default 'field').
|
323 |
+
*
|
324 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
325 |
+
*/
|
326 |
+
public function field( $name = null, $description = null, $field_kind = null ) {
|
327 |
+
$builder = new WP_Job_Manager_REST_Field_Declaration_Builder();
|
328 |
+
|
329 |
+
if ( ! empty( $name ) ) {
|
330 |
+
$builder->with_name( $name );
|
331 |
+
}
|
332 |
+
|
333 |
+
if ( ! empty( $description ) ) {
|
334 |
+
$builder->with_description( $description );
|
335 |
+
}
|
336 |
+
|
337 |
+
if ( empty( $field_kind ) ) {
|
338 |
+
$field_kind = WP_Job_Manager_REST_Field_Declaration::FIELD;
|
339 |
+
}
|
340 |
+
|
341 |
+
$builder->with_kind( $field_kind );
|
342 |
+
|
343 |
+
return $builder;
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Get our registered types
|
348 |
+
*
|
349 |
+
* @return WP_Job_Manager_REST_Type_Registry
|
350 |
+
*/
|
351 |
+
public function get_type_registry() {
|
352 |
+
return $this->type_registry;
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Get a known type definition
|
357 |
+
*
|
358 |
+
* @param string $type_name The type name.
|
359 |
+
* @return WP_Job_Manager_REST_Interfaces_Type
|
360 |
+
*
|
361 |
+
* @throws WP_Job_Manager_REST_Exception When provided with an unknown/invalid type.
|
362 |
+
*/
|
363 |
+
public function type( $type_name ) {
|
364 |
+
return $this->get_type_registry()->definition( $type_name );
|
365 |
+
}
|
366 |
+
|
367 |
+
/**
|
368 |
+
* Define a new REST API Bundle.
|
369 |
+
*
|
370 |
+
* @param null|string|WP_Job_Manager_REST_Interfaces_Controller_Bundle $maybe_bundle_or_prefix The bundle name.
|
371 |
+
* @return WP_Job_Manager_REST_Controller_Bundle_Builder
|
372 |
+
*/
|
373 |
+
public function rest_api( $maybe_bundle_or_prefix = null ) {
|
374 |
+
if ( is_a( $maybe_bundle_or_prefix, 'WP_Job_Manager_REST_Interfaces_Controller_Bundle' ) ) {
|
375 |
+
$builder = new WP_Job_Manager_REST_Controller_Bundle_Builder( $maybe_bundle_or_prefix );
|
376 |
+
} else {
|
377 |
+
$builder = new WP_Job_Manager_REST_Controller_Bundle_Builder();
|
378 |
+
if ( is_string( $maybe_bundle_or_prefix ) ) {
|
379 |
+
$builder->with_prefix( $maybe_bundle_or_prefix );
|
380 |
+
}
|
381 |
+
$builder->with_environment( $this );
|
382 |
+
}
|
383 |
+
|
384 |
+
$this->push_builder( self::BUNDLES, $builder );
|
385 |
+
return $builder;
|
386 |
+
}
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Define a new Model
|
390 |
+
*
|
391 |
+
* @param string $declaration A Model class string.
|
392 |
+
*
|
393 |
+
* @return WP_Job_Manager_REST_Model
|
394 |
+
*/
|
395 |
+
function define_model( $declaration ) {
|
396 |
+
WP_Job_Manager_REST_Expect::that( class_exists( $declaration ), '$declaration string should be an existing class' );
|
397 |
+
WP_Job_Manager_REST_Expect::that( in_array( 'WP_Job_Manager_REST_Interfaces_Model', class_implements( $declaration ), true ), '$declaration does not implement WP_Job_Manager_REST_Interfaces_Model' );
|
398 |
+
|
399 |
+
/**
|
400 |
+
* Create an empty Model to act as our factory (I know this is weird, see php5.2)
|
401 |
+
*
|
402 |
+
* @var WP_Job_Manager_REST_Model $factory
|
403 |
+
*/
|
404 |
+
$factory = new $declaration();
|
405 |
+
$factory->with_environment( $this );
|
406 |
+
$factory->with_data_store( new WP_Job_Manager_REST_Data_Store_Nil() );
|
407 |
+
$factory->with_permissions_provider( new WP_Job_Manager_REST_Permissions_Any() );
|
408 |
+
$this->model_definitions[ $declaration ] = $factory;
|
409 |
+
return $factory;
|
410 |
+
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Add a Bundle to our bundles (muse be Mixtape_Interfaces_Rest_Api_Controller_Bundle)
|
414 |
+
*
|
415 |
+
* @param WP_Job_Manager_REST_Interfaces_Controller_Bundle $bundle the bundle.
|
416 |
+
*
|
417 |
+
* @return WP_Job_Manager_REST_Environment $this
|
418 |
+
* @throws WP_Job_Manager_REST_Exception In case it's not a WP_Job_Manager_REST_Interfaces_Controller_Bundle.
|
419 |
+
*/
|
420 |
+
private function add_rest_bundle( $bundle ) {
|
421 |
+
WP_Job_Manager_REST_Expect::is_a( $bundle, 'WP_Job_Manager_REST_Interfaces_Controller_Bundle' );
|
422 |
+
$key = $bundle->get_prefix();
|
423 |
+
$this->rest_apis[ $key ] = $bundle;
|
424 |
+
return $this;
|
425 |
+
}
|
426 |
+
}
|
lib/wpjm_rest/class-wp-job-manager-rest-events.php
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WP_Job_Manager_REST_Events: Simple event bus
|
4 |
+
*
|
5 |
+
* @package Mixtape
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Events
|
14 |
+
*
|
15 |
+
* Simple event bus
|
16 |
+
*
|
17 |
+
* @package Mixtape
|
18 |
+
*/
|
19 |
+
class WP_Job_Manager_REST_Events {
|
20 |
+
/**
|
21 |
+
* Events
|
22 |
+
*
|
23 |
+
* @var array
|
24 |
+
*/
|
25 |
+
private $events = array();
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Add Filter
|
29 |
+
*
|
30 |
+
* @param string $event Event.
|
31 |
+
* @param callable $func Func.
|
32 |
+
* @param int $priority Priority.
|
33 |
+
* @param int $accepted_args Accepted Args.
|
34 |
+
*
|
35 |
+
* @return $this
|
36 |
+
*/
|
37 |
+
public function add_filter( $event, $func, $priority = 10, $accepted_args = 1 ) {
|
38 |
+
WP_Job_Manager_REST_Expect::that( is_callable( $func ), sprintf( '$func is not callable' ) );
|
39 |
+
if ( ! isset( $this->events[ $event ] ) ) {
|
40 |
+
$this->events[ $event ] = new WP_Hook();
|
41 |
+
}
|
42 |
+
/**
|
43 |
+
* The hook.
|
44 |
+
*
|
45 |
+
* @var WP_Hook $hook
|
46 |
+
*/
|
47 |
+
$hook = $this->events[ $event ];
|
48 |
+
$hook->add_filter( $event, $func, $priority, $accepted_args );
|
49 |
+
return $this;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Add Action
|
54 |
+
*
|
55 |
+
* @param string $event Event.
|
56 |
+
* @param callable $func Func.
|
57 |
+
* @param int $priority Priority.
|
58 |
+
* @param int $accepted_args Accepted Args.
|
59 |
+
*
|
60 |
+
* @return $this
|
61 |
+
*/
|
62 |
+
public function add_action( $event, $func, $priority = 10, $accepted_args = 1 ) {
|
63 |
+
return $this->add_filter( $event, $func, $priority, $accepted_args );
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Apply Filters
|
68 |
+
*
|
69 |
+
* @param string $event Event.
|
70 |
+
* @param mixed $value Value.
|
71 |
+
*
|
72 |
+
* @return mixed
|
73 |
+
*/
|
74 |
+
public function apply_filters( $event, $value ) {
|
75 |
+
$func_args = func_get_args();
|
76 |
+
if ( ! isset( $this->events[ $event ] ) ) {
|
77 |
+
return $value;
|
78 |
+
}
|
79 |
+
/**
|
80 |
+
* The hook.
|
81 |
+
*
|
82 |
+
* @var WP_Hook $hook
|
83 |
+
*/
|
84 |
+
$hook = $this->events[ $event ];
|
85 |
+
$func_args = array_slice( $func_args, 1 );
|
86 |
+
return $hook->apply_filters( $value, $func_args );
|
87 |
+
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Do Action
|
92 |
+
*
|
93 |
+
* @param string $event Event.
|
94 |
+
*
|
95 |
+
* @return mixed
|
96 |
+
*/
|
97 |
+
public function do_action( $event ) {
|
98 |
+
$func_args = func_get_args();
|
99 |
+
if ( ! isset( $this->events[ $event ] ) ) {
|
100 |
+
return;
|
101 |
+
}
|
102 |
+
/**
|
103 |
+
* The hook.
|
104 |
+
*
|
105 |
+
* @var WP_Hook $hook
|
106 |
+
*/
|
107 |
+
$hook = $this->events[ $event ];
|
108 |
+
array_shift( $func_args );
|
109 |
+
$hook->do_action( $func_args );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Remove
|
114 |
+
*
|
115 |
+
* @param string $event The Event.
|
116 |
+
* @param bool|callable $function_to_remove The callable.
|
117 |
+
* @param int $priority Priority.
|
118 |
+
* @return $this
|
119 |
+
*/
|
120 |
+
public function remove( $event, $function_to_remove = false, $priority = 10 ) {
|
121 |
+
if ( isset( $this->events[ $event ] ) ) {
|
122 |
+
if ( false === $function_to_remove ) {
|
123 |
+
/**
|
124 |
+
* The hook.
|
125 |
+
*
|
126 |
+
* @var WP_Hook $hook
|
127 |
+
*/
|
128 |
+
$hook = $this->events[ $event ];
|
129 |
+
$hook->remove_all_filters();
|
130 |
+
unset( $this->events[ $event ] );
|
131 |
+
}
|
132 |
+
/**
|
133 |
+
* The hook.
|
134 |
+
*
|
135 |
+
* @var WP_Hook $hook
|
136 |
+
*/
|
137 |
+
$hook = $this->events[ $event ];
|
138 |
+
if ( $hook->has_filter( $event, $function_to_remove ) ) {
|
139 |
+
$hook->remove_filter( $event, $function_to_remove, $priority );
|
140 |
+
}
|
141 |
+
}
|
142 |
+
return $this;
|
143 |
+
}
|
144 |
+
}
|
lib/wpjm_rest/class-wp-job-manager-rest-exception.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Mixtape_Exception
|
4 |
+
*
|
5 |
+
* @package Mixtape
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Base Exception class
|
14 |
+
* Class WP_Job_Manager_REST_Exception
|
15 |
+
*/
|
16 |
+
class WP_Job_Manager_REST_Exception extends Exception {
|
17 |
+
}
|
lib/wpjm_rest/class-wp-job-manager-rest-expect.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Mixtape_Expect
|
4 |
+
*
|
5 |
+
* Asserts about invariants
|
6 |
+
*
|
7 |
+
* @package Mixtape
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class Mixtape_Expect
|
16 |
+
*/
|
17 |
+
class WP_Job_Manager_REST_Expect {
|
18 |
+
/**
|
19 |
+
* Expect a certain class
|
20 |
+
*
|
21 |
+
* @param mixed $thing The thing to test.
|
22 |
+
* @param string $class_name The class.
|
23 |
+
*
|
24 |
+
* @throws WP_Job_Manager_REST_Exception Fail if we got an unexpected class.
|
25 |
+
*/
|
26 |
+
static function is_a( $thing, $class_name ) {
|
27 |
+
self::is_object( $thing );
|
28 |
+
self::that( is_a( $thing, $class_name ), 'Expected ' . $class_name . ', got ' . get_class( $thing ) );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Expect that something implements an interface.
|
33 |
+
*
|
34 |
+
* @param object|string|mixed $thing The thing to check.
|
35 |
+
* @param string $interface_name The interface name.
|
36 |
+
*/
|
37 |
+
static function implements_interface( $thing, $interface_name ) {
|
38 |
+
$thing_class = is_object( $thing ) ? get_class( $thing ) : (string) $thing;
|
39 |
+
$interfaces = class_implements( $thing );
|
40 |
+
self::that( in_array( $interface_name, $interfaces, true ), 'Class ' . $thing_class . ' does not implement interface ' . $interface_name );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Expect that thing is an object
|
45 |
+
*
|
46 |
+
* @param mixed $thing The thing.
|
47 |
+
* @throws WP_Job_Manager_REST_Exception Throw if not an object.
|
48 |
+
*/
|
49 |
+
static function is_object( $thing ) {
|
50 |
+
self::that( is_object( $thing ), 'Variable is is not an Object' );
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Express an invariant.
|
55 |
+
*
|
56 |
+
* @param bool $cond The boolean condition that needs to hold.
|
57 |
+
* @param string $fail_message In case of failure, the reason this failed.
|
58 |
+
*
|
59 |
+
* @throws WP_Job_Manager_REST_Exception Fail if condition doesn't hold.
|
60 |
+
*/
|
61 |
+
static function that( $cond, $fail_message ) {
|
62 |
+
if ( ! $cond ) {
|
63 |
+
throw new WP_Job_Manager_REST_Exception( $fail_message );
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* This method should be Overridden
|
69 |
+
*
|
70 |
+
* @param string $method The method name.
|
71 |
+
*
|
72 |
+
* @throws WP_Job_Manager_REST_Exception To Overrride this.
|
73 |
+
*/
|
74 |
+
static function should_override( $method ) {
|
75 |
+
throw new WP_Job_Manager_REST_Exception( $method . ' should be overriden' );
|
76 |
+
}
|
77 |
+
}
|
lib/wpjm_rest/class-wp-job-manager-rest-model.php
ADDED
@@ -0,0 +1,686 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Abstract Mixtape_Interfaces_Model Base Class
|
4 |
+
*
|
5 |
+
* @package Mixtape/Model
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Model
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Model implements
|
16 |
+
WP_Job_Manager_REST_Interfaces_Model,
|
17 |
+
WP_Job_Manager_REST_Interfaces_Permissions_Provider {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Fields By Class Name
|
21 |
+
*
|
22 |
+
* @var array
|
23 |
+
*/
|
24 |
+
private static $fields_by_class_name = array();
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Data Stores By Class Name
|
28 |
+
*
|
29 |
+
* @var array
|
30 |
+
*/
|
31 |
+
private static $data_stores_by_class_name = array();
|
32 |
+
|
33 |
+
/**
|
34 |
+
* The Environment the model exists in
|
35 |
+
*
|
36 |
+
* @var WP_Job_Manager_REST_Environment
|
37 |
+
*/
|
38 |
+
private static $environments_by_class_name = array();
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Permissions Providers by class Name
|
42 |
+
*
|
43 |
+
* @var array
|
44 |
+
*/
|
45 |
+
private static $permissions_providers_by_class_name = array();
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Our data
|
49 |
+
*
|
50 |
+
* @var array
|
51 |
+
*/
|
52 |
+
private $data;
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Our raw data
|
56 |
+
*
|
57 |
+
* @var array
|
58 |
+
*/
|
59 |
+
private $raw_data;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Mixtape_Model constructor.
|
63 |
+
*
|
64 |
+
* @param array $data The data array.
|
65 |
+
* @param array $args Args.
|
66 |
+
*
|
67 |
+
* @throws WP_Job_Manager_REST_Exception Throws when data is not an array.
|
68 |
+
*/
|
69 |
+
function __construct( $data = array(), $args = array() ) {
|
70 |
+
WP_Job_Manager_REST_Expect::that( is_array( $data ), '$data should be an array' );
|
71 |
+
$this->data = array();
|
72 |
+
|
73 |
+
if ( isset( $args['deserialize'] ) && true === $args['deserialize'] ) {
|
74 |
+
unset( $args['deserialize'] );
|
75 |
+
$data = $this->deserialize( $data );
|
76 |
+
}
|
77 |
+
$this->raw_data = $data;
|
78 |
+
$data_keys = array_keys( $data );
|
79 |
+
|
80 |
+
foreach ( $data_keys as $key ) {
|
81 |
+
$this->set( $key, $this->raw_data[ $key ] );
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Gets the value of a previously defined field.
|
87 |
+
*
|
88 |
+
* @param string $field_name The field name.
|
89 |
+
* @param array $args Any args.
|
90 |
+
*
|
91 |
+
* @return mixed
|
92 |
+
* @throws WP_Job_Manager_REST_Exception Fails when field is unknown.
|
93 |
+
*/
|
94 |
+
public function get( $field_name, $args = array() ) {
|
95 |
+
WP_Job_Manager_REST_Expect::that( $this->has( $field_name ), 'Field ' . $field_name . 'is not defined' );
|
96 |
+
$fields = $this->get_fields();
|
97 |
+
$field_declaration = $fields[ $field_name ];
|
98 |
+
$this->set_field_if_unset( $field_declaration );
|
99 |
+
|
100 |
+
return $this->prepare_value( $field_declaration );
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Sets a field value.
|
105 |
+
*
|
106 |
+
* @param string $field The field name.
|
107 |
+
* @param mixed $value The new field value.
|
108 |
+
*
|
109 |
+
* @return $this
|
110 |
+
* @throws WP_Job_Manager_REST_Exception Throws when trying to set an unknown field.
|
111 |
+
*/
|
112 |
+
public function set( $field, $value ) {
|
113 |
+
WP_Job_Manager_REST_Expect::that( $this->has( $field ), 'Field ' . $field . 'is not defined' );
|
114 |
+
$fields = self::get_fields();
|
115 |
+
/**
|
116 |
+
* The declaration.
|
117 |
+
*
|
118 |
+
* @var WP_Job_Manager_REST_Field_Declaration $field_declaration The declaration.
|
119 |
+
*/
|
120 |
+
$field_declaration = $fields[ $field ];
|
121 |
+
if ( isset( $args['deserializing'] ) && $args['deserializing'] ) {
|
122 |
+
$value = $this->deserialize_field( $field_declaration, $value );
|
123 |
+
}
|
124 |
+
if ( null !== $field_declaration->before_set() ) {
|
125 |
+
$val = $this->call( $field_declaration->before_set(), array( $value, $field_declaration->get_name() ) );
|
126 |
+
} else {
|
127 |
+
$val = $field_declaration->cast_value( $value );
|
128 |
+
}
|
129 |
+
$this->data[ $field_declaration->get_name() ] = $val;
|
130 |
+
return $this;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Check if this model has a field
|
135 |
+
*
|
136 |
+
* @param string $field The field name to check.
|
137 |
+
* @return bool
|
138 |
+
*/
|
139 |
+
public function has( $field ) {
|
140 |
+
$fields = $this->get_fields();
|
141 |
+
return isset( $fields[ $field ] );
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Validate this Model's current state.
|
146 |
+
*
|
147 |
+
* @return bool|WP_Error Either true or WP_Error on failure.
|
148 |
+
*/
|
149 |
+
public function validate() {
|
150 |
+
$validation_errors = array();
|
151 |
+
$fields = self::get_fields();
|
152 |
+
foreach ( $fields as $key => $field_declaration ) {
|
153 |
+
$is_valid = $this->run_field_validations( $field_declaration );
|
154 |
+
if ( is_wp_error( $is_valid ) ) {
|
155 |
+
$validation_errors[] = $is_valid->get_error_data();
|
156 |
+
}
|
157 |
+
}
|
158 |
+
if ( count( $validation_errors ) > 0 ) {
|
159 |
+
return $this->validation_error( $validation_errors );
|
160 |
+
}
|
161 |
+
return true;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Sanitize this Model's current data.
|
166 |
+
*
|
167 |
+
* @return WP_Job_Manager_REST_Interfaces_Model $this
|
168 |
+
*/
|
169 |
+
public function sanitize() {
|
170 |
+
$fields = self::get_fields();
|
171 |
+
foreach ( $fields as $key => $field_declaration ) {
|
172 |
+
/**
|
173 |
+
* Field Declaration.
|
174 |
+
*
|
175 |
+
* @var WP_Job_Manager_REST_Field_Declaration $field_declaration
|
176 |
+
*/
|
177 |
+
$field_name = $field_declaration->get_name();
|
178 |
+
$value = $this->get( $field_name );
|
179 |
+
$custom_sanitization = $field_declaration->get_sanitizer();
|
180 |
+
if ( ! empty( $custom_sanitization ) ) {
|
181 |
+
$value = $this->call( $custom_sanitization, array( $this, $value ) );
|
182 |
+
} else {
|
183 |
+
$value = $field_declaration->get_type()->sanitize( $value );
|
184 |
+
}
|
185 |
+
$this->set( $field_name, $value );
|
186 |
+
}
|
187 |
+
return $this;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* We got a Validation Error
|
192 |
+
*
|
193 |
+
* @param array $error_data The details.
|
194 |
+
* @return WP_Error
|
195 |
+
*/
|
196 |
+
protected function validation_error( $error_data ) {
|
197 |
+
return new WP_Error( 'validation-error', 'validation-error', $error_data );
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Run Validations for this field.
|
202 |
+
*
|
203 |
+
* @param WP_Job_Manager_REST_Field_Declaration $field_declaration The field.
|
204 |
+
*
|
205 |
+
* @return bool|WP_Error
|
206 |
+
*/
|
207 |
+
protected function run_field_validations( $field_declaration ) {
|
208 |
+
if ( $field_declaration->is_kind( WP_Job_Manager_REST_Field_Declaration::DERIVED ) ) {
|
209 |
+
return true;
|
210 |
+
}
|
211 |
+
$value = $this->get( $field_declaration->get_name() );
|
212 |
+
if ( $field_declaration->is_required() && empty( $value ) ) {
|
213 |
+
// translators: %s is usually a field name.
|
214 |
+
$message = sprintf( __( '%s cannot be empty', 'mixtape' ), $field_declaration->get_name() );
|
215 |
+
return new WP_Error( 'required-field-empty', $message );
|
216 |
+
} elseif ( ! $field_declaration->is_required() && ! empty( $value ) ) {
|
217 |
+
foreach ( $field_declaration->get_validations() as $validation ) {
|
218 |
+
$result = $this->call( $validation, array( $value ) );
|
219 |
+
if ( is_wp_error( $result ) ) {
|
220 |
+
$result->add_data(array(
|
221 |
+
'reason' => $result->get_error_messages(),
|
222 |
+
'field' => $field_declaration->get_data_transfer_name(),
|
223 |
+
'value' => $value,
|
224 |
+
) );
|
225 |
+
return $result;
|
226 |
+
}
|
227 |
+
}
|
228 |
+
}
|
229 |
+
return true;
|
230 |
+
}
|
231 |
+
|
232 |
+
/**
|
233 |
+
* Prepare the value associated with this declaraton for output.
|
234 |
+
*
|
235 |
+
* @param WP_Job_Manager_REST_Field_Declaration $field_declaration The declaration to use.
|
236 |
+
* @return mixed
|
237 |
+
*/
|
238 |
+
private function prepare_value( $field_declaration ) {
|
239 |
+
$key = $field_declaration->get_name();
|
240 |
+
$value = $this->data[ $key ];
|
241 |
+
$before_return = $field_declaration->before_get();
|
242 |
+
if ( isset( $before_return ) && ! empty( $before_return ) ) {
|
243 |
+
$value = $this->call( $before_return, array( $value, $key ) );
|
244 |
+
}
|
245 |
+
|
246 |
+
return $value;
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Sets this field's value. Used for derived fields.
|
251 |
+
*
|
252 |
+
* @param WP_Job_Manager_REST_Field_Declaration $field_declaration The field declaration.
|
253 |
+
*/
|
254 |
+
private function set_field_if_unset( $field_declaration ) {
|
255 |
+
$field_name = $field_declaration->get_name();
|
256 |
+
if ( ! isset( $this->data[ $field_name ] ) ) {
|
257 |
+
if ( $field_declaration->is_kind( WP_Job_Manager_REST_Field_Declaration::DERIVED ) ) {
|
258 |
+
$map_from = $field_declaration->get_map_from();
|
259 |
+
$value = $this->call( $map_from );
|
260 |
+
$this->set( $field_name, $value );
|
261 |
+
} else {
|
262 |
+
$this->set( $field_name, $field_declaration->get_default_value() );
|
263 |
+
}
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Get this model class fields
|
269 |
+
*
|
270 |
+
* @param null|string $filter_by_type Filter.
|
271 |
+
* @return array
|
272 |
+
*/
|
273 |
+
public function get_fields( $filter_by_type = null ) {
|
274 |
+
$class_name = get_class( $this );
|
275 |
+
/**
|
276 |
+
* Out model
|
277 |
+
*
|
278 |
+
* @var WP_Job_Manager_REST_Interfaces_Model $instance
|
279 |
+
*/
|
280 |
+
$instance = new $class_name();
|
281 |
+
if ( ! isset( self::$fields_by_class_name[ $class_name ] ) ) {
|
282 |
+
$fields = $instance->declare_fields();
|
283 |
+
self::$fields_by_class_name[ $class_name ] = self::initialize_field_map( $fields );
|
284 |
+
}
|
285 |
+
|
286 |
+
if ( null === $filter_by_type ) {
|
287 |
+
return self::$fields_by_class_name[ $class_name ];
|
288 |
+
}
|
289 |
+
|
290 |
+
$filtered = array();
|
291 |
+
|
292 |
+
foreach ( self::$fields_by_class_name[ $class_name ] as $field_declaration ) {
|
293 |
+
/**
|
294 |
+
* The field declaration.
|
295 |
+
*
|
296 |
+
* @var WP_Job_Manager_REST_Field_Declaration $field_declaration
|
297 |
+
*/
|
298 |
+
if ( $field_declaration->get_kind() === $filter_by_type ) {
|
299 |
+
$filtered[] = $field_declaration;
|
300 |
+
}
|
301 |
+
}
|
302 |
+
return $filtered;
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Initialize_field_map
|
307 |
+
*
|
308 |
+
* @param array $declared_field_builders Array<Mixtape_Model_Field_Declaration_Builder>.
|
309 |
+
*
|
310 |
+
* @return array
|
311 |
+
*/
|
312 |
+
private static function initialize_field_map( $declared_field_builders ) {
|
313 |
+
$fields = array();
|
314 |
+
foreach ( $declared_field_builders as $field_builder ) {
|
315 |
+
/**
|
316 |
+
* Builder
|
317 |
+
*
|
318 |
+
* @var WP_Job_Manager_REST_Field_Declaration $field Field Builder.
|
319 |
+
*/
|
320 |
+
$field = $field_builder->build();
|
321 |
+
$fields[ $field->get_name() ] = $field;
|
322 |
+
}
|
323 |
+
return $fields;
|
324 |
+
}
|
325 |
+
|
326 |
+
/**
|
327 |
+
* Get this model's data store
|
328 |
+
*
|
329 |
+
* @return WP_Job_Manager_REST_Interfaces_Data_Store
|
330 |
+
*/
|
331 |
+
public function get_data_store() {
|
332 |
+
$class_name = get_class( $this );
|
333 |
+
if ( ! isset( self::$data_stores_by_class_name[ $class_name ] ) ) {
|
334 |
+
self::$data_stores_by_class_name[ $class_name ] = new WP_Job_Manager_REST_Data_Store_Nil();
|
335 |
+
}
|
336 |
+
return self::$data_stores_by_class_name[ $class_name ];
|
337 |
+
}
|
338 |
+
|
339 |
+
/**
|
340 |
+
* Set this model's data store
|
341 |
+
*
|
342 |
+
* @param WP_Job_Manager_REST_Interfaces_Data_Store $data_store A builder or a Data store.
|
343 |
+
* @throws WP_Job_Manager_REST_Exception Throws when Data Store Invalid.
|
344 |
+
*/
|
345 |
+
public function with_data_store( $data_store ) {
|
346 |
+
$class_name = get_class( $this );
|
347 |
+
// at this point we should have a data store.
|
348 |
+
WP_Job_Manager_REST_Expect::is_a( $data_store, 'WP_Job_Manager_REST_Interfaces_Data_Store' );
|
349 |
+
self::$data_stores_by_class_name[ $class_name ] = $data_store;
|
350 |
+
}
|
351 |
+
|
352 |
+
/**
|
353 |
+
* Get this model's environment
|
354 |
+
*
|
355 |
+
* @return WP_Job_Manager_REST_Environment|null
|
356 |
+
*/
|
357 |
+
public function get_environment() {
|
358 |
+
$class_name = get_class( $this );
|
359 |
+
if ( isset( self::$environments_by_class_name[ $class_name ] ) ) {
|
360 |
+
return self::$environments_by_class_name[ $class_name ];
|
361 |
+
}
|
362 |
+
return null;
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Set the model base class environment (change effective in all subclasses)
|
367 |
+
*
|
368 |
+
* @param WP_Job_Manager_REST_Environment $environment The Environment.
|
369 |
+
*
|
370 |
+
* @return WP_Job_Manager_REST_Interfaces_Model
|
371 |
+
*
|
372 |
+
* @throws WP_Job_Manager_REST_Exception If an WP_Job_Manager_REST_Environment is not provided.
|
373 |
+
*/
|
374 |
+
public function with_environment( $environment ) {
|
375 |
+
WP_Job_Manager_REST_Expect::is_a( $environment, 'WP_Job_Manager_REST_Environment' );
|
376 |
+
$class_name = get_class( $this );
|
377 |
+
self::$environments_by_class_name[ $class_name ] = $environment;
|
378 |
+
return $this;
|
379 |
+
}
|
380 |
+
|
381 |
+
/**
|
382 |
+
* Create a new Model Instance
|
383 |
+
*
|
384 |
+
* @param array $data The data.
|
385 |
+
* @param array $args Args.
|
386 |
+
*
|
387 |
+
* @return WP_Job_Manager_REST_Interfaces_Model
|
388 |
+
* @throws WP_Job_Manager_REST_Exception Throws if data not an array.
|
389 |
+
*/
|
390 |
+
public function create( $data, $args = array() ) {
|
391 |
+
WP_Job_Manager_REST_Expect::that( is_array( $data ), '$data should be an array' );
|
392 |
+
WP_Job_Manager_REST_Expect::that( is_array( $args ), '$args should be an array' );
|
393 |
+
$class_name = get_class( $this );
|
394 |
+
return new $class_name( $data, $args );
|
395 |
+
}
|
396 |
+
|
397 |
+
/**
|
398 |
+
* Merge values from array with current values.
|
399 |
+
* Note: Values change in place.
|
400 |
+
*
|
401 |
+
* @param array $data The data (key-value assumed).
|
402 |
+
* @param bool $updating Is this an update?.
|
403 |
+
*
|
404 |
+
* @return WP_Job_Manager_REST_Interfaces_Model|WP_Error
|
405 |
+
* @throws WP_Job_Manager_REST_Exception Throws.
|
406 |
+
*/
|
407 |
+
function update_from_array( $data, $updating = false ) {
|
408 |
+
$mapped_data = self::map_data( $data, $updating );
|
409 |
+
foreach ( $mapped_data as $name => $value ) {
|
410 |
+
$this->set( $name, $value );
|
411 |
+
}
|
412 |
+
return $this->sanitize();
|
413 |
+
}
|
414 |
+
|
415 |
+
/**
|
416 |
+
* Creates a new Model From a Data Array
|
417 |
+
*
|
418 |
+
* @param array $data The Data.
|
419 |
+
*
|
420 |
+
* @return WP_Job_Manager_REST_Model|WP_Error
|
421 |
+
*/
|
422 |
+
public function new_from_array( $data ) {
|
423 |
+
$field_data = $this->map_data( $data, false );
|
424 |
+
return $this->create( $field_data )->sanitize();
|
425 |
+
}
|
426 |
+
|
427 |
+
/**
|
428 |
+
* Get field DTO Mappings
|
429 |
+
*
|
430 |
+
* @return array
|
431 |
+
*/
|
432 |
+
public function get_dto_field_mappings() {
|
433 |
+
$mappings = array();
|
434 |
+
foreach ( $this->get_fields() as $field_declaration ) {
|
435 |
+
/**
|
436 |
+
* Declaration
|
437 |
+
*
|
438 |
+
* @var WP_Job_Manager_REST_Field_Declaration $field_declaration
|
439 |
+
*/
|
440 |
+
if ( ! $field_declaration->supports_output_type( 'json' ) ) {
|
441 |
+
continue;
|
442 |
+
}
|
443 |
+
$mappings[ $field_declaration->get_data_transfer_name() ] = $field_declaration->get_name();
|
444 |
+
}
|
445 |
+
return $mappings;
|
446 |
+
}
|
447 |
+
|
448 |
+
/**
|
449 |
+
* Prepare the Model for Data Transfer
|
450 |
+
*
|
451 |
+
* @return array
|
452 |
+
*/
|
453 |
+
function to_dto() {
|
454 |
+
$result = array();
|
455 |
+
foreach ( $this->get_dto_field_mappings() as $mapping_name => $field_name ) {
|
456 |
+
$value = $this->get( $field_name );
|
457 |
+
$result[ $mapping_name ] = $value;
|
458 |
+
}
|
459 |
+
|
460 |
+
return $result;
|
461 |
+
}
|
462 |
+
|
463 |
+
/**
|
464 |
+
* Map data names
|
465 |
+
*
|
466 |
+
* @param array $data The data to map.
|
467 |
+
* @param bool $updating Are we Updating.
|
468 |
+
* @return array
|
469 |
+
*/
|
470 |
+
private function map_data( $data, $updating = false ) {
|
471 |
+
$request_data = array();
|
472 |
+
$fields = $this->get_fields();
|
473 |
+
foreach ( $fields as $field ) {
|
474 |
+
/**
|
475 |
+
* Field
|
476 |
+
*
|
477 |
+
* @var WP_Job_Manager_REST_Field_Declaration $field Field.
|
478 |
+
*/
|
479 |
+
if ( $field->is_kind( WP_Job_Manager_REST_Field_Declaration::DERIVED ) ) {
|
480 |
+
continue;
|
481 |
+
}
|
482 |
+
$dto_name = $field->get_data_transfer_name();
|
483 |
+
$field_name = $field->get_name();
|
484 |
+
if ( isset( $data[ $dto_name ] ) && ! ( $updating && $field->is_primary() ) ) {
|
485 |
+
$value = $data[ $dto_name ];
|
486 |
+
$request_data[ $field_name ] = $value;
|
487 |
+
}
|
488 |
+
}
|
489 |
+
return $request_data;
|
490 |
+
}
|
491 |
+
|
492 |
+
/**
|
493 |
+
* Call a method.
|
494 |
+
*
|
495 |
+
* @param string $method The method.
|
496 |
+
* @param array $args The args.
|
497 |
+
*
|
498 |
+
* @return mixed
|
499 |
+
* @throws WP_Job_Manager_REST_Exception Throw if method nonexistent.
|
500 |
+
*/
|
501 |
+
private function call( $method, $args = array() ) {
|
502 |
+
if ( is_callable( $method ) ) {
|
503 |
+
return call_user_func_array( $method, $args );
|
504 |
+
}
|
505 |
+
WP_Job_Manager_REST_Expect::that( method_exists( $this, $method ), $method . ' does not exist' );
|
506 |
+
return call_user_func_array( array( $this, $method ), $args );
|
507 |
+
}
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Get name
|
511 |
+
*
|
512 |
+
* @return string
|
513 |
+
*/
|
514 |
+
public function get_name() {
|
515 |
+
return strtolower( get_class( $this ) );
|
516 |
+
}
|
517 |
+
|
518 |
+
/**
|
519 |
+
* Declare fields.
|
520 |
+
*
|
521 |
+
* @return array
|
522 |
+
*/
|
523 |
+
public function declare_fields() {
|
524 |
+
WP_Job_Manager_REST_Expect::should_override( __METHOD__ );
|
525 |
+
return array();
|
526 |
+
}
|
527 |
+
|
528 |
+
/**
|
529 |
+
* Get the id
|
530 |
+
*
|
531 |
+
* @return mixed|null
|
532 |
+
*/
|
533 |
+
function get_id() {
|
534 |
+
return $this->get( 'id' );
|
535 |
+
}
|
536 |
+
|
537 |
+
/**
|
538 |
+
* Set the id
|
539 |
+
*
|
540 |
+
* @param mixed $new_id The new id.
|
541 |
+
*
|
542 |
+
* @return mixed|null
|
543 |
+
*/
|
544 |
+
function set_id( $new_id ) {
|
545 |
+
return $this->set( 'id', $new_id );
|
546 |
+
}
|
547 |
+
|
548 |
+
/**
|
549 |
+
* Create from Post.
|
550 |
+
*
|
551 |
+
* @param WP_Post $post Post.
|
552 |
+
* @return WP_Job_Manager_REST_Model
|
553 |
+
* @throws WP_Job_Manager_REST_Exception If something goes wrong.
|
554 |
+
*/
|
555 |
+
public static function from_raw_data( $post ) {
|
556 |
+
$raw_post_data = $post->to_array();
|
557 |
+
$raw_meta_data = get_post_meta( $post->ID ); // assumes we are only ever adding one postmeta per key.
|
558 |
+
|
559 |
+
$flattened_meta = array();
|
560 |
+
foreach ( $raw_meta_data as $key => $value_arr ) {
|
561 |
+
$flattened_meta[ $key ] = $value_arr[0];
|
562 |
+
}
|
563 |
+
$merged_data = array_merge( $raw_post_data, $flattened_meta );
|
564 |
+
|
565 |
+
return self::create( $merged_data, array(
|
566 |
+
'deserialize' => true,
|
567 |
+
) );
|
568 |
+
}
|
569 |
+
|
570 |
+
/**
|
571 |
+
* Transform raw data to model data
|
572 |
+
*
|
573 |
+
* @param array $data Data.
|
574 |
+
* @return array
|
575 |
+
*/
|
576 |
+
public function deserialize( $data ) {
|
577 |
+
$field_declarations = $this->get_fields();
|
578 |
+
$raw_data = array();
|
579 |
+
$post_array_keys = array_keys( $data );
|
580 |
+
foreach ( $field_declarations as $declaration ) {
|
581 |
+
/**
|
582 |
+
* Declaration
|
583 |
+
*
|
584 |
+
* @var WP_Job_Manager_REST_Field_Declaration $declaration
|
585 |
+
*/
|
586 |
+
$key = $declaration->get_name();
|
587 |
+
$mapping = $declaration->get_map_from();
|
588 |
+
$value = null;
|
589 |
+
if ( in_array( $key, $post_array_keys, true ) ) {
|
590 |
+
// simplest case: we got a $key for this, so just map it.
|
591 |
+
$value = $this->deserialize_field( $declaration, $data[ $key ] );
|
592 |
+
} elseif ( in_array( $mapping, $post_array_keys, true ) ) {
|
593 |
+
// other case: we got a mapping.
|
594 |
+
$value = $this->deserialize_field( $declaration, $data[ $mapping ] );
|
595 |
+
} else {
|
596 |
+
// just provide a default.
|
597 |
+
$value = $declaration->get_default_value();
|
598 |
+
}
|
599 |
+
$raw_data[ $key ] = $declaration->cast_value( $value );
|
600 |
+
}
|
601 |
+
return $raw_data;
|
602 |
+
}
|
603 |
+
|
604 |
+
/**
|
605 |
+
* Transform Model to raw data array
|
606 |
+
*
|
607 |
+
* @param null|string $field_type Type.
|
608 |
+
*
|
609 |
+
* @return array
|
610 |
+
*/
|
611 |
+
function serialize( $field_type = null ) {
|
612 |
+
$field_values_to_insert = array();
|
613 |
+
foreach ( $this->get_fields( $field_type ) as $field_declaration ) {
|
614 |
+
/**
|
615 |
+
* Declaration
|
616 |
+
*
|
617 |
+
* @var WP_Job_Manager_REST_Field_Declaration $field_declaration
|
618 |
+
*/
|
619 |
+
$what_to_map_to = $field_declaration->get_map_from();
|
620 |
+
$value = $this->get( $field_declaration->get_name() );
|
621 |
+
$field_values_to_insert[ $what_to_map_to ] = $this->serialize_field( $field_declaration, $value );
|
622 |
+
}
|
623 |
+
|
624 |
+
return $field_values_to_insert;
|
625 |
+
}
|
626 |
+
|
627 |
+
/**
|
628 |
+
* Deserialize
|
629 |
+
*
|
630 |
+
* @param WP_Job_Manager_REST_Field_Declaration $field_declaration Declaration.
|
631 |
+
* @param mixed $value Value.
|
632 |
+
* @return mixed the deserialized value
|
633 |
+
*/
|
634 |
+
private function deserialize_field( $field_declaration, $value ) {
|
635 |
+
$deserializer = $field_declaration->get_deserializer();
|
636 |
+
if ( isset( $deserializer ) && ! empty( $deserializer ) ) {
|
637 |
+
return $this->call( $deserializer, array( $value ) );
|
638 |
+
}
|
639 |
+
return $value;
|
640 |
+
}
|
641 |
+
|
642 |
+
/**
|
643 |
+
* Serialize
|
644 |
+
*
|
645 |
+
* @param WP_Job_Manager_REST_Field_Declaration $field_declaration Declaration.
|
646 |
+
* @param mixed $value Value.
|
647 |
+
* @return mixed
|
648 |
+
* @throws WP_Job_Manager_REST_Exception If call fails.
|
649 |
+
*/
|
650 |
+
private function serialize_field( $field_declaration, $value ) {
|
651 |
+
$serializer = $field_declaration->get_serializer();
|
652 |
+
if ( isset( $serializer ) && ! empty( $serializer ) ) {
|
653 |
+
return $this->call( $serializer, array( $value ) );
|
654 |
+
}
|
655 |
+
return $value;
|
656 |
+
}
|
657 |
+
|
658 |
+
/**
|
659 |
+
* Handle Permissions for a REST Controller Action
|
660 |
+
*
|
661 |
+
* @param WP_REST_Request $request The request.
|
662 |
+
* @param string $action The action (e.g. index, create update etc).
|
663 |
+
* @return bool
|
664 |
+
*/
|
665 |
+
public function permissions_check( $request, $action ) {
|
666 |
+
$class_name = get_class( $this );
|
667 |
+
if ( isset( self::$permissions_providers_by_class_name[ $class_name ] ) ) {
|
668 |
+
$permissions_provider = self::$permissions_providers_by_class_name[ $class_name ];
|
669 |
+
return call_user_func_array( array( $permissions_provider, 'permissions_check' ), array( $request, $action ) );
|
670 |
+
}
|
671 |
+
return true;
|
672 |
+
}
|
673 |
+
|
674 |
+
/**
|
675 |
+
* Set a Proxy Permission Provider for this class
|
676 |
+
*
|
677 |
+
* @param WP_Job_Manager_REST_Interfaces_Permissions_Provider $permissions_provider PP.
|
678 |
+
* @return WP_Job_Manager_REST_Model $this
|
679 |
+
*/
|
680 |
+
public function with_permissions_provider( $permissions_provider ) {
|
681 |
+
WP_Job_Manager_REST_Expect::is_a( $permissions_provider, 'WP_Job_Manager_REST_Interfaces_Permissions_Provider' );
|
682 |
+
$class_name = get_class( $this );
|
683 |
+
self::$permissions_providers_by_class_name[ $class_name ] = $permissions_provider;
|
684 |
+
return $this;
|
685 |
+
}
|
686 |
+
}
|
lib/wpjm_rest/class-wp-job-manager-rest-type.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The default Mixtape_Interfaces_Type Implementation
|
4 |
+
*
|
5 |
+
* @package Mixtape/Type
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class Mixtape_Type
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Type implements WP_Job_Manager_REST_Interfaces_Type {
|
16 |
+
/**
|
17 |
+
* The unique identifier of this type.
|
18 |
+
*
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
protected $identifier;
|
22 |
+
/**
|
23 |
+
* Mixtape_Type constructor.
|
24 |
+
*
|
25 |
+
* @param string $identifier The identifier.
|
26 |
+
*/
|
27 |
+
function __construct( $identifier ) {
|
28 |
+
$this->identifier = $identifier;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* The name
|
33 |
+
*
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
function name() {
|
37 |
+
return $this->identifier;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* The default value
|
42 |
+
*
|
43 |
+
* @return null
|
44 |
+
*/
|
45 |
+
function default_value() {
|
46 |
+
return null;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Cast value to be Type
|
51 |
+
*
|
52 |
+
* @param mixed $value The value that needs casting.
|
53 |
+
*
|
54 |
+
* @return mixed
|
55 |
+
*/
|
56 |
+
function cast( $value ) {
|
57 |
+
return $value;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Sanitize this value
|
62 |
+
*
|
63 |
+
* @param mixed $value The value to sanitize.
|
64 |
+
*
|
65 |
+
* @return mixed
|
66 |
+
*/
|
67 |
+
function sanitize( $value ) {
|
68 |
+
return $value;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Get this type's JSON Schema.
|
73 |
+
*
|
74 |
+
* @return array
|
75 |
+
*/
|
76 |
+
function schema() {
|
77 |
+
return array(
|
78 |
+
'type' => $this->name(),
|
79 |
+
);
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Get our "Any" type
|
84 |
+
*
|
85 |
+
* @return WP_Job_Manager_REST_Type
|
86 |
+
*/
|
87 |
+
static function any() {
|
88 |
+
return new self( 'any' );
|
89 |
+
}
|
90 |
+
}
|
lib/wpjm_rest/controller/bundle/class-wp-job-manager-rest-controller-bundle-builder.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Build a Bundle
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Controller
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Controller_Bundle_Builder
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Controller_Bundle_Builder implements WP_Job_Manager_REST_Interfaces_Builder {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Prefix.
|
19 |
+
*
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
private $bundle_prefix;
|
23 |
+
/**
|
24 |
+
* Env.
|
25 |
+
*
|
26 |
+
* @var WP_Job_Manager_REST_Environment
|
27 |
+
*/
|
28 |
+
private $environment;
|
29 |
+
/**
|
30 |
+
* Endpoint Builders.
|
31 |
+
*
|
32 |
+
* @var array
|
33 |
+
*/
|
34 |
+
private $endpoint_builders = array();
|
35 |
+
/**
|
36 |
+
* Bundle.
|
37 |
+
*
|
38 |
+
* @var WP_Job_Manager_REST_Controller_Bundle|null
|
39 |
+
*/
|
40 |
+
private $bundle = null;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* WP_Job_Manager_REST_Controller_Bundle_Builder constructor.
|
44 |
+
*
|
45 |
+
* @param WP_Job_Manager_REST_Interfaces_Controller_Bundle|null $bundle Bundle.
|
46 |
+
*/
|
47 |
+
function __construct( $bundle = null ) {
|
48 |
+
$this->bundle = $bundle;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Build it
|
53 |
+
*
|
54 |
+
* @return WP_Job_Manager_REST_Interfaces_Controller_Bundle
|
55 |
+
*/
|
56 |
+
public function build() {
|
57 |
+
if ( is_a( $this->bundle, 'WP_Job_Manager_REST_Interfaces_Controller_Bundle' ) ) {
|
58 |
+
return $this->bundle;
|
59 |
+
}
|
60 |
+
return new WP_Job_Manager_REST_Controller_Bundle( $this->bundle_prefix, $this->endpoint_builders );
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Prefix.
|
65 |
+
*
|
66 |
+
* @param string $bundle_prefix Prefix.
|
67 |
+
* @return WP_Job_Manager_REST_Controller_Bundle_Builder $this
|
68 |
+
*/
|
69 |
+
public function with_prefix( $bundle_prefix ) {
|
70 |
+
$this->bundle_prefix = $bundle_prefix;
|
71 |
+
return $this;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Env.
|
76 |
+
*
|
77 |
+
* @param WP_Job_Manager_REST_Environment $env Env.
|
78 |
+
* @return WP_Job_Manager_REST_Controller_Bundle_Builder $this
|
79 |
+
*/
|
80 |
+
public function with_environment( $env ) {
|
81 |
+
$this->environment = $env;
|
82 |
+
return $this;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Endpoint.
|
87 |
+
*
|
88 |
+
* Adds a new WP_Job_Manager_REST_Controller_Builder to our builders and returns it for further setup.
|
89 |
+
*
|
90 |
+
* @param null|WP_Job_Manager_REST_Interfaces_Controller $controller_object The (optional) controller object.
|
91 |
+
* @return WP_Job_Manager_REST_Controller_Bundle_Builder $this
|
92 |
+
*/
|
93 |
+
public function add_endpoint( $controller_object = null ) {
|
94 |
+
WP_Job_Manager_REST_Expect::is_a( $controller_object, 'WP_Job_Manager_REST_Interfaces_Controller' );
|
95 |
+
$this->endpoint_builders[] = $controller_object;
|
96 |
+
return $this;
|
97 |
+
}
|
98 |
+
}
|
lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-action.php
ADDED
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* An Acton that is part of a Route.
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Controller
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Controller_Action
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Controller_Action {
|
16 |
+
/**
|
17 |
+
* Permitted actions
|
18 |
+
*
|
19 |
+
* @var array
|
20 |
+
*/
|
21 |
+
private $actions_to_http_methods = array(
|
22 |
+
'index' => WP_REST_Server::READABLE,
|
23 |
+
'show' => WP_REST_Server::READABLE,
|
24 |
+
'create' => WP_REST_Server::CREATABLE,
|
25 |
+
'update' => WP_REST_Server::EDITABLE,
|
26 |
+
'delete' => WP_REST_Server::DELETABLE,
|
27 |
+
'any' => WP_REST_Server::ALLMETHODS,
|
28 |
+
);
|
29 |
+
|
30 |
+
/**
|
31 |
+
* The action name
|
32 |
+
*
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
private $action_name;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* The Handler
|
39 |
+
*
|
40 |
+
* @var null|array|string
|
41 |
+
*/
|
42 |
+
private $handler;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* The Permissions Callback
|
46 |
+
*
|
47 |
+
* @var null|array|string
|
48 |
+
*/
|
49 |
+
private $permission_callback;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* The Args
|
53 |
+
*
|
54 |
+
* @var null|array|string
|
55 |
+
*/
|
56 |
+
private $args;
|
57 |
+
|
58 |
+
/**
|
59 |
+
* WP_Job_Manager_REST_Controller_Action constructor.
|
60 |
+
*
|
61 |
+
* @param WP_Job_Manager_REST_Controller $controller Controller.
|
62 |
+
* @param string $action_name The action Name.
|
63 |
+
*/
|
64 |
+
public function __construct( $controller, $action_name ) {
|
65 |
+
$is_known_action = in_array( $action_name, array_keys( $this->actions_to_http_methods ), true );
|
66 |
+
WP_Job_Manager_REST_Expect::that( $is_known_action, 'Unknown method: ' . $action_name );
|
67 |
+
|
68 |
+
$this->controller = $controller;
|
69 |
+
$this->action_name = $action_name;
|
70 |
+
$this->handler = null;
|
71 |
+
$this->args = null;
|
72 |
+
$this->permission_callback = null;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Get Name
|
77 |
+
*
|
78 |
+
* @return string
|
79 |
+
*/
|
80 |
+
public function name() {
|
81 |
+
return $this->action_name;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Set Permissions
|
86 |
+
*
|
87 |
+
* @param mixed $callable A Callable.
|
88 |
+
*
|
89 |
+
* @return WP_Job_Manager_REST_Controller_Action
|
90 |
+
*/
|
91 |
+
public function permissions( $callable ) {
|
92 |
+
$this->permission_callback = $callable;
|
93 |
+
return $this;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Set Handler
|
98 |
+
*
|
99 |
+
* @param mixed $callable A Callable.
|
100 |
+
*
|
101 |
+
* @return WP_Job_Manager_REST_Controller_Action
|
102 |
+
*/
|
103 |
+
public function callback( $callable ) {
|
104 |
+
$this->handler = $callable;
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Set Handler
|
110 |
+
*
|
111 |
+
* @param mixed $callable A Callable.
|
112 |
+
*
|
113 |
+
* @return WP_Job_Manager_REST_Controller_Action
|
114 |
+
*/
|
115 |
+
public function args( $callable ) {
|
116 |
+
$this->args = $callable;
|
117 |
+
return $this;
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Used in register rest route
|
122 |
+
*
|
123 |
+
* @return array
|
124 |
+
*/
|
125 |
+
public function as_array() {
|
126 |
+
$callable_func = $this->expect_callable( $this->handler );
|
127 |
+
if ( null !== $this->permission_callback ) {
|
128 |
+
$permission_callback = $this->expect_callable( $this->permission_callback );
|
129 |
+
} else {
|
130 |
+
$permission_callback = $this->expect_callable( array( $this->controller, $this->action_name . '_permissions_check' ) );
|
131 |
+
}
|
132 |
+
|
133 |
+
if ( null !== $this->args ) {
|
134 |
+
$args = call_user_func( $this->expect_callable( $this->args ), $this->actions_to_http_methods[ $this->action_name ] );
|
135 |
+
} else {
|
136 |
+
$args = $this->controller->get_endpoint_args_for_item_schema( $this->actions_to_http_methods[ $this->action_name ] );
|
137 |
+
}
|
138 |
+
|
139 |
+
$result = array(
|
140 |
+
'methods' => $this->actions_to_http_methods[ $this->action_name ],
|
141 |
+
'callback' => $callable_func,
|
142 |
+
'permission_callback' => $permission_callback,
|
143 |
+
'args' => $args,
|
144 |
+
);
|
145 |
+
|
146 |
+
return $result;
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Expect a callable
|
151 |
+
*
|
152 |
+
* @param mixed $callable_func A Callable.
|
153 |
+
* @return array
|
154 |
+
* @throws WP_Job_Manager_REST_Exception If not a callable.
|
155 |
+
*/
|
156 |
+
private function expect_callable( $callable_func ) {
|
157 |
+
if ( ! is_callable( $callable_func ) ) {
|
158 |
+
// Check if controller has a public method called $callable_func.
|
159 |
+
if ( is_string( $callable_func ) && method_exists( $this->controller, $callable_func ) ) {
|
160 |
+
return array( $this->controller, $callable_func );
|
161 |
+
}
|
162 |
+
WP_Job_Manager_REST_Expect::that( is_callable( $callable_func ), 'Callable Expected: $callable_func' );
|
163 |
+
}
|
164 |
+
return $callable_func;
|
165 |
+
}
|
166 |
+
}
|
lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-bundle.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* A Collection of Controllers, under the same prefix
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Controller
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Controller_Bundle
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Controller_Bundle implements WP_Job_Manager_REST_Interfaces_Controller_Bundle {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* The prefix of this bundle (required)
|
19 |
+
*
|
20 |
+
* @var string|null
|
21 |
+
*/
|
22 |
+
protected $prefix = null;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Collection of Mixtape_Rest_Api_Controller subclasses
|
26 |
+
*
|
27 |
+
* @var array
|
28 |
+
*/
|
29 |
+
protected $endpoints = array();
|
30 |
+
/**
|
31 |
+
* Our Endpoint Builders
|
32 |
+
*
|
33 |
+
* @var array
|
34 |
+
*/
|
35 |
+
private $endpoint_builders;
|
36 |
+
/**
|
37 |
+
* Environment.
|
38 |
+
*
|
39 |
+
* @var WP_Job_Manager_REST_Environment
|
40 |
+
*/
|
41 |
+
private $environment;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* WP_Job_Manager_REST_Controller_Bundle_Definition constructor.
|
45 |
+
*
|
46 |
+
* @param string $bundle_prefix Prefix.
|
47 |
+
* @param array $endpoints Builders.
|
48 |
+
*/
|
49 |
+
function __construct( $bundle_prefix, $endpoints ) {
|
50 |
+
$this->prefix = $bundle_prefix;
|
51 |
+
$this->endpoints = $endpoints;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Register this bundle with the environment.
|
56 |
+
*
|
57 |
+
* @param WP_Job_Manager_REST_Environment $environment The Environment.
|
58 |
+
* @return WP_Job_Manager_REST_Controller_Bundle $this
|
59 |
+
* @throws WP_Job_Manager_REST_Exception When no prefix is defined.
|
60 |
+
*/
|
61 |
+
function register( $environment ) {
|
62 |
+
WP_Job_Manager_REST_Expect::that( null !== $this->prefix, 'prefix should be defined' );
|
63 |
+
$this->environment = $environment;
|
64 |
+
/**
|
65 |
+
* Add/remove endpoints. Useful for extensions
|
66 |
+
*
|
67 |
+
* @param array $endpoints An array of WP_Job_Manager_REST_Interfaces_Controller
|
68 |
+
* @param $bundle WP_Job_Manager_REST_Controller_Bundle The bundle instance.
|
69 |
+
*
|
70 |
+
* @return array
|
71 |
+
*/
|
72 |
+
$endpoints = (array) $this->environment->get_event_dispatcher()->apply_filters(
|
73 |
+
'rest_api_controller_bundle_get_endpoints',
|
74 |
+
$this->endpoints,
|
75 |
+
$this
|
76 |
+
);
|
77 |
+
|
78 |
+
foreach ( $endpoints as $endpoint ) {
|
79 |
+
/**
|
80 |
+
* Controller
|
81 |
+
*
|
82 |
+
* @var WP_Job_Manager_REST_Interfaces_Controller
|
83 |
+
*/
|
84 |
+
$endpoint->register( $this, $this->environment );
|
85 |
+
}
|
86 |
+
|
87 |
+
return $this;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Get Prefix.
|
92 |
+
*
|
93 |
+
* @return string
|
94 |
+
*/
|
95 |
+
function get_prefix() {
|
96 |
+
return $this->prefix;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-crud.php
ADDED
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Classic Create, Read, Update, Delete Controller
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Controller
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
} // End if().
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Controller_CRUD
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Controller_CRUD extends WP_Job_Manager_REST_Controller_Model implements WP_Job_Manager_REST_Interfaces_Controller {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Setup
|
19 |
+
*/
|
20 |
+
public function setup() {
|
21 |
+
$this->add_route( '/' )
|
22 |
+
->add_action( $this->action( 'index', array( $this, 'get_items' ) ) )
|
23 |
+
->add_action( $this->action( 'create', array( $this, 'create_item' ) ) );
|
24 |
+
|
25 |
+
$this->add_route( '/(?P<id>\d+)' )
|
26 |
+
->add_action( $this->action( 'show', array( $this, 'get_item' ) ) )
|
27 |
+
->add_action( $this->action( 'update', array( $this, 'update_item' ) ) )
|
28 |
+
->add_action( $this->action( 'delete', array( $this, 'delete_item' ) ) );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get Items.
|
33 |
+
*
|
34 |
+
* @param WP_REST_Request $request Request.
|
35 |
+
* @return WP_REST_Response
|
36 |
+
*/
|
37 |
+
public function get_items( $request ) {
|
38 |
+
$item_id = isset( $request['id'] ) ? absint( $request['id'] ) : null;
|
39 |
+
|
40 |
+
if ( null === $item_id ) {
|
41 |
+
$models = $this->get_model_data_store()->get_entities();
|
42 |
+
$data = $this->prepare_dto( $models );
|
43 |
+
return $this->ok( $data );
|
44 |
+
}
|
45 |
+
|
46 |
+
$model = $this->model_prototype->get_data_store()->get_entity( $item_id );
|
47 |
+
if ( empty( $model ) ) {
|
48 |
+
return $this->not_found( __( 'Model not found' ) );
|
49 |
+
}
|
50 |
+
|
51 |
+
return $this->ok( $this->prepare_dto( $model ) );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Get Item
|
56 |
+
*
|
57 |
+
* @param WP_REST_Request $request Request.
|
58 |
+
* @return WP_REST_Response
|
59 |
+
*/
|
60 |
+
public function get_item( $request ) {
|
61 |
+
return $this->get_items( $request );
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Create Item
|
67 |
+
*
|
68 |
+
* @param WP_REST_Request $request Request.
|
69 |
+
* @return WP_REST_Response
|
70 |
+
*/
|
71 |
+
public function create_item( $request ) {
|
72 |
+
$is_update = false;
|
73 |
+
return $this->create_or_update( $request, $is_update );
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Update Item
|
78 |
+
*
|
79 |
+
* @param WP_REST_Request $request Request.
|
80 |
+
* @return WP_REST_Response
|
81 |
+
*/
|
82 |
+
public function update_item( $request ) {
|
83 |
+
$is_update = true;
|
84 |
+
return $this->create_or_update( $request, $is_update );
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Create Or Update Item
|
89 |
+
*
|
90 |
+
* @param WP_REST_Request $request Request.
|
91 |
+
* @param bool $is_update Is Update.
|
92 |
+
*
|
93 |
+
* @return WP_REST_Response
|
94 |
+
*/
|
95 |
+
protected function create_or_update( $request, $is_update = false ) {
|
96 |
+
$model_to_update = null;
|
97 |
+
if ( $is_update ) {
|
98 |
+
$id = isset( $request['id'] ) ? absint( $request['id'] ) : null;
|
99 |
+
if ( ! empty( $id ) ) {
|
100 |
+
$model_to_update = $this->model_prototype->get_data_store()->get_entity( $id );
|
101 |
+
if ( empty( $model_to_update ) ) {
|
102 |
+
return $this->not_found( 'Model does not exist' );
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
if ( $is_update && $model_to_update ) {
|
108 |
+
$model = $model_to_update->update_from_array( $request->get_params(), $is_update );
|
109 |
+
} else {
|
110 |
+
$model = $this->get_model_prototype()->new_from_array( $request->get_params() );
|
111 |
+
}
|
112 |
+
|
113 |
+
if ( is_wp_error( $model ) ) {
|
114 |
+
$wp_err = $model;
|
115 |
+
return $this->bad_request( $wp_err );
|
116 |
+
}
|
117 |
+
|
118 |
+
$validation = $model->validate();
|
119 |
+
if ( is_wp_error( $validation ) ) {
|
120 |
+
return $this->bad_request( $validation );
|
121 |
+
}
|
122 |
+
|
123 |
+
$id_or_error = $this->model_data_store->upsert( $model );
|
124 |
+
|
125 |
+
if ( is_wp_error( $id_or_error ) ) {
|
126 |
+
return $this->bad_request( $id_or_error );
|
127 |
+
}
|
128 |
+
|
129 |
+
$dto = $this->prepare_dto( array(
|
130 |
+
'id' => absint( $id_or_error ),
|
131 |
+
) );
|
132 |
+
|
133 |
+
return $is_update ? $this->ok( $dto ) : $this->created( $dto );
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Delete an Item
|
138 |
+
*
|
139 |
+
* @param WP_REST_Request $request Request.
|
140 |
+
* @return WP_REST_Response
|
141 |
+
*/
|
142 |
+
public function delete_item( $request ) {
|
143 |
+
$id = isset( $request['id'] ) ? absint( $request['id'] ) : null;
|
144 |
+
if ( empty( $id ) ) {
|
145 |
+
return $this->bad_request( 'No Model ID provided' );
|
146 |
+
}
|
147 |
+
$model = $this->model_prototype->get_data_store()->get_entity( $id );
|
148 |
+
if ( null === $model ) {
|
149 |
+
return $this->not_found( 'Model does not exist' );
|
150 |
+
}
|
151 |
+
$result = $this->model_data_store->delete( $model );
|
152 |
+
return $this->ok( $result );
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Model To Dto
|
157 |
+
*
|
158 |
+
* @param WP_Job_Manager_REST_Interfaces_Model $model The Model.
|
159 |
+
* @return array
|
160 |
+
*/
|
161 |
+
protected function model_to_dto( $model ) {
|
162 |
+
$result = parent::model_to_dto( $model );
|
163 |
+
$result['_links'] = $this->add_links( $model );
|
164 |
+
return $result;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Add Links
|
169 |
+
*
|
170 |
+
* @param WP_Job_Manager_REST_Interfaces_Model $model Model.
|
171 |
+
* @return array
|
172 |
+
*/
|
173 |
+
protected function add_links( $model ) {
|
174 |
+
$base_url = rest_url() . $this->controller_bundle->get_prefix() . $this->base . '/';
|
175 |
+
|
176 |
+
$result = array(
|
177 |
+
'collection' => array(
|
178 |
+
array(
|
179 |
+
'href' => esc_url( $base_url ),
|
180 |
+
),
|
181 |
+
),
|
182 |
+
);
|
183 |
+
if ( $model->get_id() ) {
|
184 |
+
$result['self'] = array(
|
185 |
+
array(
|
186 |
+
'href' => esc_url( $base_url . $model->get_id() ),
|
187 |
+
),
|
188 |
+
);
|
189 |
+
}
|
190 |
+
if ( $model->has( 'author' ) ) {
|
191 |
+
$result['author'] = array(
|
192 |
+
array(
|
193 |
+
'href' => esc_url( rest_url() . 'wp/v2/users/' . $model->get( 'author' ) ),
|
194 |
+
),
|
195 |
+
);
|
196 |
+
}
|
197 |
+
return $result;
|
198 |
+
}
|
199 |
+
}
|
lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-extension.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Controller-like class used for extending existing object types (e.g. post)
|
4 |
+
* With custom fields. Needs a model definition that will provide the extra fields.
|
5 |
+
*
|
6 |
+
* @package WP_Job_Manager_REST/Controller
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Class WP_Job_Manager_REST_Controller_Extension
|
11 |
+
*/
|
12 |
+
class WP_Job_Manager_REST_Controller_Extension implements WP_Job_Manager_REST_Interfaces_Registrable {
|
13 |
+
/**
|
14 |
+
* Environment
|
15 |
+
*
|
16 |
+
* @var WP_Job_Manager_REST_Environment
|
17 |
+
*/
|
18 |
+
private $environment;
|
19 |
+
/**
|
20 |
+
* Object to extend
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
private $object_to_extend;
|
25 |
+
/**
|
26 |
+
* Model def.
|
27 |
+
*
|
28 |
+
* @var WP_Job_Manager_REST_Model_Definition
|
29 |
+
*/
|
30 |
+
private $model_definition;
|
31 |
+
/**
|
32 |
+
* Model Definition name, This should be a valid Model definition at registration time, otherwise register will throw
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
private $model_definition_name;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* WP_Job_Manager_REST_Controller_Extension constructor.
|
40 |
+
*
|
41 |
+
* @param string $object_to_extend Post type.
|
42 |
+
* @param string $model_definition_name Model Definition name.
|
43 |
+
*/
|
44 |
+
function __construct( $object_to_extend, $model_definition_name ) {
|
45 |
+
$this->model_definition_name = $model_definition_name;
|
46 |
+
$this->object_to_extend = $object_to_extend;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Register This Controller
|
51 |
+
*
|
52 |
+
* @param WP_Job_Manager_REST_Environment $environment The Environment to use.
|
53 |
+
* @throws WP_Job_Manager_REST_Exception Throws.
|
54 |
+
*
|
55 |
+
* @return bool|WP_Error true if valid otherwise error.
|
56 |
+
*/
|
57 |
+
function register( $environment ) {
|
58 |
+
$this->environment = $environment;
|
59 |
+
$this->model_definition = $this->environment->model( $this->model_definition_name );
|
60 |
+
if ( ! $this->model_definition ) {
|
61 |
+
return new WP_Error( 'model-not-found' );
|
62 |
+
}
|
63 |
+
$fields = $this->model_definition->get_fields();
|
64 |
+
foreach ( $fields as $field ) {
|
65 |
+
$this->register_field( $field );
|
66 |
+
}
|
67 |
+
|
68 |
+
return true;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Register Field
|
73 |
+
*
|
74 |
+
* @param WP_Job_Manager_REST_Field_Declaration $field Field.
|
75 |
+
*/
|
76 |
+
private function register_field( $field ) {
|
77 |
+
register_rest_field( $this->object_to_extend, $field->get_data_transfer_name(), array(
|
78 |
+
'get_callback' => $field->get_reader(),
|
79 |
+
'update_callback' => $field->get_updater(),
|
80 |
+
'schema' => $field->as_item_schema_property(),
|
81 |
+
) );
|
82 |
+
}
|
83 |
+
}
|
lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-model.php
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* A Controller that is related to a Model Declaration.
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Controller
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Controller_Model
|
14 |
+
* Knows about models
|
15 |
+
*/
|
16 |
+
class WP_Job_Manager_REST_Controller_Model extends WP_Job_Manager_REST_Controller implements WP_Job_Manager_REST_Interfaces_Controller {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* The Factory
|
20 |
+
*
|
21 |
+
* @var WP_Job_Manager_REST_Model
|
22 |
+
*/
|
23 |
+
protected $model_prototype;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The data Store
|
27 |
+
*
|
28 |
+
* @var WP_Job_Manager_REST_Interfaces_Data_Store
|
29 |
+
*/
|
30 |
+
protected $model_data_store;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Model Definition Name
|
34 |
+
*
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
private $model_class_name;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* WP_Job_Manager_REST_Controller_Model constructor.
|
41 |
+
*
|
42 |
+
* @param string $base The baser.
|
43 |
+
* @param string $model_class_name A Definition or a definition name.
|
44 |
+
*/
|
45 |
+
public function __construct( $base, $model_class_name ) {
|
46 |
+
$this->base = $base;
|
47 |
+
$this->model_class_name = $model_class_name;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get our model factory
|
52 |
+
*
|
53 |
+
* @return WP_Job_Manager_REST_Model
|
54 |
+
*/
|
55 |
+
protected function get_model_prototype() {
|
56 |
+
return $this->model_prototype;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Register this controller, initialize model-related object fields.
|
61 |
+
*
|
62 |
+
* @param WP_Job_Manager_REST_Controller_Bundle $bundle The bundle to use.
|
63 |
+
* @param WP_Job_Manager_REST_Environment $environment The Environment.
|
64 |
+
*
|
65 |
+
* @throws WP_Job_Manager_REST_Exception If an invalid model is provided.
|
66 |
+
*
|
67 |
+
* @return bool|WP_Error true if valid otherwise error.
|
68 |
+
*/
|
69 |
+
public function register( $bundle, $environment ) {
|
70 |
+
$this->model_prototype = $environment->model( $this->model_class_name );
|
71 |
+
$this->model_data_store = $this->model_prototype->get_data_store();
|
72 |
+
return parent::register( $bundle, $environment );
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Retrieves the item's schema, conforming to JSON Schema.
|
77 |
+
*
|
78 |
+
* In our case, it gets fields/types from our definition's declared fields.
|
79 |
+
*
|
80 |
+
* @access public
|
81 |
+
*
|
82 |
+
* @return array Item schema data.
|
83 |
+
*/
|
84 |
+
public function get_item_schema() {
|
85 |
+
$model_definition = $this->get_model_prototype();
|
86 |
+
$fields = $model_definition->get_fields();
|
87 |
+
$properties = array();
|
88 |
+
$required = array();
|
89 |
+
foreach ( $fields as $field_declaration ) {
|
90 |
+
/**
|
91 |
+
* Our declaration
|
92 |
+
*
|
93 |
+
* @var WP_Job_Manager_REST_Field_Declaration $field_declaration
|
94 |
+
*/
|
95 |
+
$properties[ $field_declaration->get_data_transfer_name() ] = $field_declaration->as_item_schema_property();
|
96 |
+
if ( $field_declaration->is_required() ) {
|
97 |
+
$required[] = $field_declaration->get_data_transfer_name();
|
98 |
+
}
|
99 |
+
}
|
100 |
+
$schema = array(
|
101 |
+
'$schema' => 'http://json-schema.org/schema#',
|
102 |
+
'title' => $model_definition->get_name(),
|
103 |
+
'type' => 'object',
|
104 |
+
'properties' => (array) $this->environment()->get_event_dispatcher()->apply_filters( 'rest_api_schema_properties', $properties, $this->get_model_prototype() ),
|
105 |
+
);
|
106 |
+
|
107 |
+
if ( ! empty( $required ) ) {
|
108 |
+
$schema['required'] = $required;
|
109 |
+
}
|
110 |
+
|
111 |
+
return $this->add_additional_fields_schema( $schema );
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Get Model DataStore
|
116 |
+
*
|
117 |
+
* @return WP_Job_Manager_REST_Interfaces_Data_Store
|
118 |
+
*/
|
119 |
+
protected function get_model_data_store() {
|
120 |
+
return $this->model_data_store;
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Generic Permissions Check.
|
125 |
+
*
|
126 |
+
* @param WP_REST_Request $request Request.
|
127 |
+
* @param string $action One of (index, show, create, update, delete).
|
128 |
+
* @return bool
|
129 |
+
*/
|
130 |
+
public function permissions_check( $request, $action = 'any' ) {
|
131 |
+
return $this->get_model_prototype()->permissions_check( $request, $action );
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Prepare Entity to be a DTO
|
136 |
+
*
|
137 |
+
* @param array|WP_Job_Manager_REST_Model_Collection|WP_Job_Manager_REST_Interfaces_Model $entity The Entity.
|
138 |
+
* @return array
|
139 |
+
*/
|
140 |
+
protected function prepare_dto( $entity ) {
|
141 |
+
if ( is_a( $entity, 'WP_Job_Manager_REST_Model_Collection' ) ) {
|
142 |
+
$results = array();
|
143 |
+
foreach ( $entity->get_items() as $model ) {
|
144 |
+
$results[] = $this->model_to_dto( $model );
|
145 |
+
}
|
146 |
+
return $results;
|
147 |
+
}
|
148 |
+
|
149 |
+
if ( is_a( $entity, 'WP_Job_Manager_REST_Interfaces_Model' ) ) {
|
150 |
+
return $this->model_to_dto( $entity );
|
151 |
+
}
|
152 |
+
|
153 |
+
return $entity;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Map a model to a Data Transfer Object (plain array)
|
158 |
+
*
|
159 |
+
* @param WP_Job_Manager_REST_Interfaces_Model $model The Model.
|
160 |
+
* @return array
|
161 |
+
*/
|
162 |
+
protected function model_to_dto( $model ) {
|
163 |
+
return $model->to_dto();
|
164 |
+
}
|
165 |
+
}
|
lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-route.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* A Route that is part of a controller.
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Controller
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Controller_Route
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Controller_Route {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Our pattern
|
19 |
+
*
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
private $pattern;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Our Handlers
|
26 |
+
*
|
27 |
+
* @var array
|
28 |
+
*/
|
29 |
+
private $actions;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Our Controller
|
33 |
+
*
|
34 |
+
* @var WP_Job_Manager_REST_Controller
|
35 |
+
*/
|
36 |
+
private $controller;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* HTTP Methods
|
40 |
+
*
|
41 |
+
* @var array
|
42 |
+
*/
|
43 |
+
private $http_methods;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* WP_Job_Manager_REST_Controller_Route constructor.
|
47 |
+
*
|
48 |
+
* @param WP_Job_Manager_REST_Controller $controller A Controller.
|
49 |
+
* @param string $pattern Pattern.
|
50 |
+
*/
|
51 |
+
public function __construct( $controller, $pattern ) {
|
52 |
+
$this->controller = $controller;
|
53 |
+
$this->pattern = $pattern;
|
54 |
+
$this->actions = array();
|
55 |
+
$this->http_methods = explode( ', ', WP_REST_Server::ALLMETHODS );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Add/Get an action
|
60 |
+
*
|
61 |
+
* @param WP_Job_Manager_REST_Controller_Action $action Action.
|
62 |
+
*
|
63 |
+
* @return WP_Job_Manager_REST_Controller_Route
|
64 |
+
*/
|
65 |
+
public function add_action( $action ) {
|
66 |
+
$this->actions[ $action->name() ] = $action;
|
67 |
+
return $this;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Gets Route info to use in Register rest route.
|
72 |
+
*
|
73 |
+
* @throws WP_Job_Manager_REST_Exception If invalid callable.
|
74 |
+
* @return array
|
75 |
+
*/
|
76 |
+
public function as_array() {
|
77 |
+
$result = array();
|
78 |
+
$result['pattern'] = $this->pattern;
|
79 |
+
$result['actions'] = array();
|
80 |
+
foreach ( $this->actions as $action => $route_action ) {
|
81 |
+
/**
|
82 |
+
* The route action.
|
83 |
+
*
|
84 |
+
* @var WP_Job_Manager_REST_Controller_Action $route_action
|
85 |
+
*/
|
86 |
+
$result['actions'][] = $route_action->as_array();
|
87 |
+
}
|
88 |
+
return $result;
|
89 |
+
}
|
90 |
+
}
|
lib/wpjm_rest/controller/class-wp-job-manager-rest-controller-settings.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Controller for handling settings
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Controller
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Controller_Settings
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Controller_Settings extends WP_Job_Manager_REST_Controller_Model {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Setup
|
19 |
+
*/
|
20 |
+
public function setup() {
|
21 |
+
$this->add_route()
|
22 |
+
->add_action( $this->action( 'index', array( $this, 'get_items' ) ) )
|
23 |
+
->add_action( $this->action( 'update', array( $this, 'create_item' ) ) );
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Get Settings
|
28 |
+
*
|
29 |
+
* @param WP_REST_Request $request The request.
|
30 |
+
* @return WP_REST_Response
|
31 |
+
*/
|
32 |
+
public function get_items( $request ) {
|
33 |
+
$model = $this->model_prototype->get_data_store()->get_entity( null );
|
34 |
+
if ( empty( $model ) ) {
|
35 |
+
return $this->not_found( __( 'Settings not found' ) );
|
36 |
+
}
|
37 |
+
|
38 |
+
return $this->ok( $this->prepare_dto( $model ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Create or Update settings.
|
43 |
+
*
|
44 |
+
* @param WP_REST_Request $request Request.
|
45 |
+
* @return WP_REST_Response
|
46 |
+
*/
|
47 |
+
public function create_item( $request ) {
|
48 |
+
return $this->create_or_update( $request );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Create or Update a Model
|
53 |
+
*
|
54 |
+
* @param WP_REST_Request $request Request.
|
55 |
+
* @return WP_REST_Response
|
56 |
+
*/
|
57 |
+
protected function create_or_update( $request ) {
|
58 |
+
$is_update = $request->get_method() !== 'POST';
|
59 |
+
$model_to_update = $this->model_prototype->get_data_store()->get_entity( null );
|
60 |
+
if ( empty( $model_to_update ) ) {
|
61 |
+
return $this->not_found( 'Model does not exist' );
|
62 |
+
}
|
63 |
+
|
64 |
+
$model = $model_to_update->update_from_array( $request->get_params(), true );
|
65 |
+
|
66 |
+
if ( is_wp_error( $model ) ) {
|
67 |
+
return $this->bad_request( $model );
|
68 |
+
}
|
69 |
+
|
70 |
+
$validation = $model->validate();
|
71 |
+
if ( is_wp_error( $validation ) ) {
|
72 |
+
return $this->bad_request( $validation );
|
73 |
+
}
|
74 |
+
|
75 |
+
$id_or_error = $this->model_data_store->upsert( $model );
|
76 |
+
|
77 |
+
if ( is_wp_error( $id_or_error ) ) {
|
78 |
+
return $this->bad_request( $id_or_error );
|
79 |
+
}
|
80 |
+
|
81 |
+
$model = $this->model_prototype->get_data_store()->get_entity( null );
|
82 |
+
$dto = $this->prepare_dto( $model );
|
83 |
+
|
84 |
+
return $is_update ? $this->ok( $dto ) : $this->created( $dto );
|
85 |
+
}
|
86 |
+
}
|
lib/wpjm_rest/data/store/class-wp-job-manager-rest-data-store-abstract.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Data Store Abstract
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Data
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Data_Store_Abstract
|
14 |
+
* An abstract Data_Store class that contains a model factory
|
15 |
+
*/
|
16 |
+
abstract class WP_Job_Manager_REST_Data_Store_Abstract implements WP_Job_Manager_REST_Interfaces_Data_Store {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Definition
|
20 |
+
*
|
21 |
+
* @var WP_Job_Manager_REST_Model
|
22 |
+
*/
|
23 |
+
protected $model_prototype;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Type Serializers
|
27 |
+
*
|
28 |
+
* @var array
|
29 |
+
*/
|
30 |
+
private $type_serializers;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* WP_Job_Manager_REST_Data_Store_Abstract constructor.
|
34 |
+
*
|
35 |
+
* @param null|WP_Job_Manager_REST_Model $model_prototype Def.
|
36 |
+
* @param array $args Args.
|
37 |
+
*/
|
38 |
+
public function __construct( $model_prototype = null, $args = array() ) {
|
39 |
+
$this->type_serializers = array();
|
40 |
+
$this->args = $args;
|
41 |
+
WP_Job_Manager_REST_Expect::is_a( $model_prototype, 'WP_Job_Manager_REST_Interfaces_Model' );
|
42 |
+
$this->set_model_factory( $model_prototype );
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Set Definition
|
47 |
+
*
|
48 |
+
* @param WP_Job_Manager_REST_Model $factory Def.
|
49 |
+
*
|
50 |
+
* @return WP_Job_Manager_REST_Interfaces_Data_Store $this
|
51 |
+
*/
|
52 |
+
private function set_model_factory( $factory ) {
|
53 |
+
$this->model_prototype = $factory;
|
54 |
+
$this->configure();
|
55 |
+
return $this;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Configure
|
60 |
+
*/
|
61 |
+
protected function configure() {
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Get Definition
|
66 |
+
*
|
67 |
+
* @return WP_Job_Manager_REST_Model
|
68 |
+
*/
|
69 |
+
public function get_model_prototype() {
|
70 |
+
return $this->model_prototype;
|
71 |
+
}
|
72 |
+
}
|
lib/wpjm_rest/data/store/class-wp-job-manager-rest-data-store-customposttype.php
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Data Store For custom Post types
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Data
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Data_Store_CustomPostType
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Data_Store_CustomPostType extends WP_Job_Manager_REST_Data_Store_Abstract {
|
16 |
+
/**
|
17 |
+
* The post type name
|
18 |
+
*
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
private $post_type;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Mixtape_Data_Store_CustomPostType constructor.
|
25 |
+
*
|
26 |
+
* @param null|WP_Job_Manager_REST_Interfaces_Model $model_prototype Def.
|
27 |
+
* @param array $args Args.
|
28 |
+
*/
|
29 |
+
public function __construct( $model_prototype = null, $args = array() ) {
|
30 |
+
$this->post_type = isset( $args['post_type'] ) ? $args['post_type'] : 'post';
|
31 |
+
parent::__construct( $model_prototype, $args );
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get Entities
|
36 |
+
*
|
37 |
+
* @param null|mixed $filter Filter.
|
38 |
+
*
|
39 |
+
* @return WP_Job_Manager_REST_Model_Collection
|
40 |
+
*/
|
41 |
+
public function get_entities( $filter = null ) {
|
42 |
+
$query = new WP_Query( array(
|
43 |
+
'post_type' => $this->post_type,
|
44 |
+
'post_status' => 'any',
|
45 |
+
) );
|
46 |
+
$posts = $query->get_posts();
|
47 |
+
$collection = array();
|
48 |
+
foreach ( $posts as $post ) {
|
49 |
+
$collection[] = $this->create_from_post( $post );
|
50 |
+
}
|
51 |
+
return new WP_Job_Manager_REST_Model_Collection( $collection );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Get Entity
|
56 |
+
*
|
57 |
+
* @param int $id The id of the entity.
|
58 |
+
* @return WP_Job_Manager_REST_Interfaces_Model|null
|
59 |
+
*/
|
60 |
+
public function get_entity( $id ) {
|
61 |
+
$post = get_post( absint( $id ) );
|
62 |
+
if ( empty( $post ) || $post->post_type !== $this->post_type ) {
|
63 |
+
return null;
|
64 |
+
}
|
65 |
+
|
66 |
+
return $this->create_from_post( $post );
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Create from Post.
|
71 |
+
*
|
72 |
+
* @param WP_Post $post Post.
|
73 |
+
* @return WP_Job_Manager_REST_Interfaces_Model
|
74 |
+
* @throws WP_Job_Manager_REST_Exception If something goes wrong.
|
75 |
+
*/
|
76 |
+
private function create_from_post( $post ) {
|
77 |
+
$field_declarations = $this->get_model_prototype()->get_fields();
|
78 |
+
$raw_post_data = $post->to_array();
|
79 |
+
$raw_meta_data = get_post_meta( $post->ID ); // assumes we are only ever adding one postmeta per key.
|
80 |
+
|
81 |
+
$flattened_meta = array();
|
82 |
+
foreach ( $raw_meta_data as $key => $value_arr ) {
|
83 |
+
$flattened_meta[ $key ] = $value_arr[0];
|
84 |
+
}
|
85 |
+
$merged_data = array_merge( $raw_post_data, $flattened_meta );
|
86 |
+
|
87 |
+
return $this->get_model_prototype()->create( $merged_data, array(
|
88 |
+
'deserialize' => true,
|
89 |
+
) );
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Delete
|
94 |
+
*
|
95 |
+
* @param WP_Job_Manager_REST_Interfaces_Model $model Model.
|
96 |
+
* @param array $args Args.
|
97 |
+
* @return mixed
|
98 |
+
*/
|
99 |
+
public function delete( $model, $args = array() ) {
|
100 |
+
$id = $model->get_id();
|
101 |
+
|
102 |
+
$args = wp_parse_args( $args, array(
|
103 |
+
'force_delete' => false,
|
104 |
+
) );
|
105 |
+
|
106 |
+
$this->get_model_prototype()
|
107 |
+
->get_environment()
|
108 |
+
->get_event_dispatcher()
|
109 |
+
->do_action( 'data_store_delete_model_before', $model, $id );
|
110 |
+
|
111 |
+
if ( $args['force_delete'] ) {
|
112 |
+
$result = wp_delete_post( $model->get_id() );
|
113 |
+
$model->set( 'id', 0 );
|
114 |
+
$this->get_model_prototype()
|
115 |
+
->get_environment()
|
116 |
+
->get_event_dispatcher()
|
117 |
+
->do_action( 'data_store_delete_model', $model, $id );
|
118 |
+
} else {
|
119 |
+
$result = wp_trash_post( $model->get_id() );
|
120 |
+
$model->set( 'status', 'trash' );
|
121 |
+
$this->get_model_prototype()
|
122 |
+
->get_environment()
|
123 |
+
->get_event_dispatcher()
|
124 |
+
->do_action( 'data_store_trash_model', $model, $id );
|
125 |
+
}
|
126 |
+
|
127 |
+
if ( false === $result ) {
|
128 |
+
$this->get_model_prototype()
|
129 |
+
->get_environment()
|
130 |
+
->get_event_dispatcher()
|
131 |
+
->do_action( 'data_store_delete_model_fail', $model, $id );
|
132 |
+
return new WP_Error( 'delete-failed', 'delete-failed' );
|
133 |
+
}
|
134 |
+
return $result;
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Upsert
|
139 |
+
*
|
140 |
+
* @param WP_Job_Manager_REST_Interfaces_Model $model Model.
|
141 |
+
*
|
142 |
+
* @return mixed|WP_Error
|
143 |
+
*/
|
144 |
+
public function upsert( $model ) {
|
145 |
+
$id = $model->get_id();
|
146 |
+
$updating = ! empty( $id );
|
147 |
+
$fields = $model->serialize( WP_Job_Manager_REST_Field_Declaration::FIELD );
|
148 |
+
$meta_fields = $model->serialize( WP_Job_Manager_REST_Field_Declaration::META );
|
149 |
+
if ( ! isset( $fields['post_type'] ) ) {
|
150 |
+
$fields['post_type'] = $this->post_type;
|
151 |
+
}
|
152 |
+
if ( isset( $fields['ID'] ) && empty( $fields['ID'] ) ) {
|
153 |
+
// ID of 0 is not acceptable on CPTs, so remove it.
|
154 |
+
unset( $fields['ID'] );
|
155 |
+
}
|
156 |
+
|
157 |
+
$this->get_model_prototype()
|
158 |
+
->get_environment()
|
159 |
+
->get_event_dispatcher()
|
160 |
+
->do_action( 'data_store_model_upsert_before', $model );
|
161 |
+
|
162 |
+
$id_or_error = wp_insert_post( $fields, true );
|
163 |
+
if ( is_wp_error( $id_or_error ) ) {
|
164 |
+
$this->get_model_prototype()
|
165 |
+
->get_environment()
|
166 |
+
->get_event_dispatcher()
|
167 |
+
->do_action( 'data_store_model_upsert_error', $model );
|
168 |
+
return $id_or_error;
|
169 |
+
}
|
170 |
+
$model->set( 'id', absint( $id_or_error ) );
|
171 |
+
foreach ( $meta_fields as $meta_key => $meta_value ) {
|
172 |
+
if ( $updating ) {
|
173 |
+
$id_or_bool = update_post_meta( $id_or_error, $meta_key, $meta_value );
|
174 |
+
} else {
|
175 |
+
$id_or_bool = add_post_meta( $id_or_error, $meta_key, $meta_value );
|
176 |
+
}
|
177 |
+
|
178 |
+
if ( false === $id_or_bool ) {
|
179 |
+
$this->get_model_prototype()
|
180 |
+
->get_environment()
|
181 |
+
->get_event_dispatcher()
|
182 |
+
->do_action( 'data_store_model_upsert_error', $model );
|
183 |
+
// Something was wrong with this update/create. TODO: Should we stop mid create/update?
|
184 |
+
return new WP_Error(
|
185 |
+
'mixtape-error-creating-meta',
|
186 |
+
'There was an error updating/creating an entity field',
|
187 |
+
array(
|
188 |
+
'field_key' => $meta_key,
|
189 |
+
'field_value' => $meta_value,
|
190 |
+
)
|
191 |
+
);
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
$this->get_model_prototype()
|
196 |
+
->get_environment()
|
197 |
+
->get_event_dispatcher()
|
198 |
+
->do_action( 'data_store_model_upsert_after', $model );
|
199 |
+
|
200 |
+
return absint( $id_or_error );
|
201 |
+
}
|
202 |
+
}
|
lib/wpjm_rest/data/store/class-wp-job-manager-rest-data-store-nil.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Data Store Nil (empty)
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Data
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Data_Store_Nil
|
14 |
+
* Null object for datastores
|
15 |
+
*/
|
16 |
+
class WP_Job_Manager_REST_Data_Store_Nil implements WP_Job_Manager_REST_Interfaces_Data_Store {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Get Entities
|
20 |
+
*
|
21 |
+
* @param null $filter F.
|
22 |
+
* @return WP_Job_Manager_REST_Model_Collection
|
23 |
+
*/
|
24 |
+
public function get_entities( $filter = null ) {
|
25 |
+
return new WP_Job_Manager_REST_Model_Collection( array() );
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Get Entity
|
30 |
+
*
|
31 |
+
* @param int $id Id.
|
32 |
+
* @return null
|
33 |
+
*/
|
34 |
+
public function get_entity( $id ) {
|
35 |
+
return null;
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Delete
|
40 |
+
*
|
41 |
+
* @param WP_Job_Manager_REST_Interfaces_Model $model Model.
|
42 |
+
* @param array $args Args.
|
43 |
+
* @return bool
|
44 |
+
*/
|
45 |
+
public function delete( $model, $args = array() ) {
|
46 |
+
return true;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Upsert
|
51 |
+
*
|
52 |
+
* @param WP_Job_Manager_REST_Interfaces_Model $model Model.
|
53 |
+
* @return int
|
54 |
+
*/
|
55 |
+
public function upsert( $model ) {
|
56 |
+
return 0;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Def
|
61 |
+
*
|
62 |
+
* @param mixed $definition Def.
|
63 |
+
*/
|
64 |
+
public function set_definition( $definition ) {
|
65 |
+
}
|
66 |
+
}
|
lib/wpjm_rest/data/store/class-wp-job-manager-rest-data-store-option.php
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Data Store Abstract
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Data
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Data_Store_Option
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Data_Store_Option extends WP_Job_Manager_REST_Data_Store_Abstract {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Guard value to distinguish between get_option returning results or not
|
19 |
+
*
|
20 |
+
* @var stdClass
|
21 |
+
*/
|
22 |
+
private $does_not_exist_guard;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* WP_Job_Manager_REST_Data_Store_Option constructor.
|
26 |
+
*
|
27 |
+
* @param WP_Job_Manager_REST_Model $model_prototype Def.
|
28 |
+
* @param array $args Args.
|
29 |
+
*/
|
30 |
+
public function __construct( $model_prototype, $args = array() ) {
|
31 |
+
parent::__construct( $model_prototype, $args );
|
32 |
+
$this->does_not_exist_guard = new stdClass();
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Get Entities
|
37 |
+
*
|
38 |
+
* @param null|mixed $filter Filter.
|
39 |
+
* @return WP_Job_Manager_REST_Interfaces_Model
|
40 |
+
*/
|
41 |
+
public function get_entities( $filter = null ) {
|
42 |
+
// there is only one option bag and one option bag global per data store.
|
43 |
+
return $this->get_entity( null );
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Get Entity
|
48 |
+
*
|
49 |
+
* @param int $id The id of the entity.
|
50 |
+
* @return WP_Job_Manager_REST_Interfaces_Model
|
51 |
+
*/
|
52 |
+
public function get_entity( $id ) {
|
53 |
+
$field_declarations = $this->get_model_prototype()->get_fields();
|
54 |
+
$raw_data = array();
|
55 |
+
foreach ( $field_declarations as $field_declaration ) {
|
56 |
+
/**
|
57 |
+
* Field Declaration
|
58 |
+
*
|
59 |
+
* @var WP_Job_Manager_REST_Field_Declaration $field_declaration
|
60 |
+
*/
|
61 |
+
$option = get_option( $field_declaration->get_map_from(), $this->does_not_exist_guard );
|
62 |
+
if ( $this->does_not_exist_guard !== $option ) {
|
63 |
+
$raw_data[ $field_declaration->get_map_from() ] = $option;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
return $this->get_model_prototype()->create( $raw_data, array(
|
68 |
+
'deserialize' => true,
|
69 |
+
) );
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Delete
|
74 |
+
*
|
75 |
+
* @param WP_Job_Manager_REST_Interfaces_Model $model Model.
|
76 |
+
* @param array $args Args.
|
77 |
+
* @return mixed
|
78 |
+
*/
|
79 |
+
public function delete( $model, $args = array() ) {
|
80 |
+
$options_to_delete = array_keys( $model->serialize() );
|
81 |
+
foreach ( $options_to_delete as $option_to_delete ) {
|
82 |
+
if ( false !== get_option( $option_to_delete, false ) ) {
|
83 |
+
$result = delete_option( $option_to_delete );
|
84 |
+
if ( false === $result ) {
|
85 |
+
return new WP_Error( 'delete-option-failed' );
|
86 |
+
}
|
87 |
+
}
|
88 |
+
}
|
89 |
+
return true;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Update/Insert
|
94 |
+
*
|
95 |
+
* @param WP_Job_Manager_REST_Interfaces_Model $model Model.
|
96 |
+
* @return mixed
|
97 |
+
*/
|
98 |
+
public function upsert( $model ) {
|
99 |
+
$fields_for_insert = $model->serialize();
|
100 |
+
foreach ( $fields_for_insert as $option_name => $option_value ) {
|
101 |
+
$previous_value = get_option( $option_name, $this->does_not_exist_guard );
|
102 |
+
if ( $this->does_not_exist_guard !== $previous_value ) {
|
103 |
+
update_option( $option_name, $option_value );
|
104 |
+
} else {
|
105 |
+
add_option( $option_name, $option_value );
|
106 |
+
}
|
107 |
+
}
|
108 |
+
return true;
|
109 |
+
}
|
110 |
+
}
|
lib/wpjm_rest/field/class-wp-job-manager-rest-field-declaration.php
ADDED
@@ -0,0 +1,434 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Fields
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
} // End if().
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Field_Declaration
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Field_Declaration {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Field A field
|
19 |
+
*/
|
20 |
+
const FIELD = 'field';
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Meta a meta field
|
24 |
+
*/
|
25 |
+
const META = 'meta';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Derived field kinds get their values from callables. It is also
|
29 |
+
* possible to update their values from callables
|
30 |
+
*/
|
31 |
+
const DERIVED = 'derived';
|
32 |
+
/**
|
33 |
+
* Map From
|
34 |
+
*
|
35 |
+
* @var null|string
|
36 |
+
*/
|
37 |
+
private $map_from;
|
38 |
+
/**
|
39 |
+
* The field kind
|
40 |
+
*
|
41 |
+
* @var string
|
42 |
+
*/
|
43 |
+
private $kind;
|
44 |
+
/**
|
45 |
+
* Field name
|
46 |
+
*
|
47 |
+
* @var string
|
48 |
+
*/
|
49 |
+
private $name;
|
50 |
+
/**
|
51 |
+
* Is this a primary field?
|
52 |
+
*
|
53 |
+
* @var bool
|
54 |
+
*/
|
55 |
+
private $primary;
|
56 |
+
/**
|
57 |
+
* Is this a required field?
|
58 |
+
*
|
59 |
+
* @var bool
|
60 |
+
*/
|
61 |
+
private $required;
|
62 |
+
/**
|
63 |
+
* Outputs
|
64 |
+
*
|
65 |
+
* @var array
|
66 |
+
*/
|
67 |
+
private $supported_outputs;
|
68 |
+
/**
|
69 |
+
* Description
|
70 |
+
*
|
71 |
+
* @var string
|
72 |
+
*/
|
73 |
+
private $description;
|
74 |
+
/**
|
75 |
+
* Data Transfer Name
|
76 |
+
*
|
77 |
+
* @var null|string
|
78 |
+
*/
|
79 |
+
private $data_transfer_name;
|
80 |
+
/**
|
81 |
+
* Validations
|
82 |
+
*
|
83 |
+
* @var null|array
|
84 |
+
*/
|
85 |
+
private $validations;
|
86 |
+
/**
|
87 |
+
* Default Value
|
88 |
+
*
|
89 |
+
* @var null|mixed
|
90 |
+
*/
|
91 |
+
private $default_value;
|
92 |
+
/**
|
93 |
+
* Field Choices
|
94 |
+
*
|
95 |
+
* @var null|array
|
96 |
+
*/
|
97 |
+
private $choices;
|
98 |
+
/**
|
99 |
+
* Type
|
100 |
+
*
|
101 |
+
* @var null|WP_Job_Manager_REST_Interfaces_Type
|
102 |
+
*/
|
103 |
+
private $type;
|
104 |
+
/**
|
105 |
+
* Acceptable field kinds
|
106 |
+
*
|
107 |
+
* @var array
|
108 |
+
*/
|
109 |
+
private $field_kinds = array(
|
110 |
+
self::FIELD,
|
111 |
+
self::META,
|
112 |
+
self::DERIVED,
|
113 |
+
);
|
114 |
+
/**
|
115 |
+
* A custom function to call before serialization
|
116 |
+
*
|
117 |
+
* @var null|callable
|
118 |
+
*/
|
119 |
+
private $serializer;
|
120 |
+
/**
|
121 |
+
* A custom function to call before deserialization
|
122 |
+
*
|
123 |
+
* @var null|callable
|
124 |
+
*/
|
125 |
+
private $deserializer;
|
126 |
+
/**
|
127 |
+
* A custom function to use for sanitizing the field value before setting it.
|
128 |
+
* Used when receiving values from untrusted sources (e.g. a web form of a REST API request)
|
129 |
+
*
|
130 |
+
* @var null|callable
|
131 |
+
*/
|
132 |
+
private $sanitizer;
|
133 |
+
/**
|
134 |
+
* A custom filtering callable triggered before setting the field with the value
|
135 |
+
*
|
136 |
+
* @var null|callable
|
137 |
+
*/
|
138 |
+
private $before_set;
|
139 |
+
/**
|
140 |
+
* A custom filtering callable triggered before returning the field value
|
141 |
+
*
|
142 |
+
* @var null|callable
|
143 |
+
*/
|
144 |
+
private $before_get;
|
145 |
+
/**
|
146 |
+
* Used by derived fields: The function to use to get the field value
|
147 |
+
*
|
148 |
+
* @var null|callable
|
149 |
+
*/
|
150 |
+
private $reader;
|
151 |
+
/**
|
152 |
+
* Used by derived fields: The function to use to update the field value
|
153 |
+
*
|
154 |
+
* @var null|callable
|
155 |
+
*/
|
156 |
+
private $updater;
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Constructor.
|
160 |
+
*
|
161 |
+
* @param array $args The arguments.
|
162 |
+
* @throws WP_Job_Manager_REST_Exception When invalid name or kind provided.
|
163 |
+
*/
|
164 |
+
public function __construct( $args ) {
|
165 |
+
if ( ! isset( $args['name'] ) || empty( $args['name'] ) || ! is_string( $args['name'] ) ) {
|
166 |
+
throw new WP_Job_Manager_REST_Exception( 'every field declaration should have a (non-empty) name string' );
|
167 |
+
}
|
168 |
+
if ( ! isset( $args['kind'] ) || ! in_array( $args['kind'], $this->field_kinds, true ) ) {
|
169 |
+
throw new WP_Job_Manager_REST_Exception( 'every field should have a kind (one of ' . implode( ',', $this->field_kinds ) . ')' );
|
170 |
+
}
|
171 |
+
|
172 |
+
$this->name = $args['name'];
|
173 |
+
$this->description = $this->value_or_default( $args, 'description', '' );
|
174 |
+
|
175 |
+
$this->kind = $args['kind'];
|
176 |
+
$this->type = $this->value_or_default( $args, 'type', WP_Job_Manager_REST_Type::any() );
|
177 |
+
$this->choices = $this->value_or_default( $args, 'choices', null );
|
178 |
+
$this->default_value = $this->value_or_default( $args, 'default_value' );
|
179 |
+
|
180 |
+
$this->map_from = $this->value_or_default( $args, 'map_from' );
|
181 |
+
$this->data_transfer_name = $this->value_or_default( $args, 'data_transfer_name', $this->get_name() );
|
182 |
+
|
183 |
+
$this->primary = $this->value_or_default( $args, 'primary', false );
|
184 |
+
$this->required = $this->value_or_default( $args, 'required', false );
|
185 |
+
$this->supported_outputs = $this->value_or_default( $args, 'supported_outputs', array( 'json' ) );
|
186 |
+
|
187 |
+
$this->sanitizer = $this->value_or_default( $args, 'sanitizer' );
|
188 |
+
$this->validations = $this->value_or_default( $args, 'validations', array() );
|
189 |
+
|
190 |
+
$this->serializer = $this->value_or_default( $args, 'serializer' );
|
191 |
+
$this->deserializer = $this->value_or_default( $args, 'deserializer' );
|
192 |
+
|
193 |
+
$this->before_get = $this->value_or_default( $args, 'before_get' );
|
194 |
+
$this->before_set = $this->value_or_default( $args, 'before_set' );
|
195 |
+
|
196 |
+
$this->reader = $this->value_or_default( $args, 'reader' );
|
197 |
+
$this->updater = $this->value_or_default( $args, 'updater' );
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Get possible choices if set
|
202 |
+
*
|
203 |
+
* @return null|array
|
204 |
+
*/
|
205 |
+
public function get_choices() {
|
206 |
+
return $this->choices;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Get Sanitizer
|
211 |
+
*
|
212 |
+
* @return callable|null
|
213 |
+
*/
|
214 |
+
public function get_sanitizer() {
|
215 |
+
return $this->sanitizer;
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Value or Default
|
220 |
+
*
|
221 |
+
* @param array $args Args.
|
222 |
+
* @param string $name Name.
|
223 |
+
* @param mixed $default Default.
|
224 |
+
* @return null
|
225 |
+
*/
|
226 |
+
private function value_or_default( $args, $name, $default = null ) {
|
227 |
+
return isset( $args[ $name ] ) ? $args[ $name ] : $default;
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Is Kind
|
232 |
+
*
|
233 |
+
* @param string $kind The kind.
|
234 |
+
* @return bool
|
235 |
+
*/
|
236 |
+
public function is_kind( $kind ) {
|
237 |
+
if ( ! in_array( $kind, $this->field_kinds, true ) ) {
|
238 |
+
return false;
|
239 |
+
}
|
240 |
+
return $this->kind === $kind;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Get default value
|
245 |
+
*
|
246 |
+
* @return mixed
|
247 |
+
*/
|
248 |
+
public function get_default_value() {
|
249 |
+
if ( isset( $this->default_value ) && ! empty( $this->default_value ) ) {
|
250 |
+
return ( is_array( $this->default_value ) && is_callable( $this->default_value ) ) ? call_user_func( $this->default_value ) : $this->default_value;
|
251 |
+
}
|
252 |
+
|
253 |
+
return $this->type->default_value();
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Cast a value
|
258 |
+
*
|
259 |
+
* @param mixed $value Val.
|
260 |
+
* @return mixed
|
261 |
+
*/
|
262 |
+
public function cast_value( $value ) {
|
263 |
+
return $this->type->cast( $value );
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Supports this type of output.
|
268 |
+
*
|
269 |
+
* @param string $type Type.
|
270 |
+
* @return bool
|
271 |
+
*/
|
272 |
+
public function supports_output_type( $type ) {
|
273 |
+
return in_array( $type, $this->supported_outputs, true );
|
274 |
+
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* As Item Schema Property
|
278 |
+
*
|
279 |
+
* @return array
|
280 |
+
*/
|
281 |
+
public function as_item_schema_property() {
|
282 |
+
$schema = $this->type->schema();
|
283 |
+
$schema['context'] = array( 'view', 'edit' );
|
284 |
+
$schema['description'] = $this->get_description();
|
285 |
+
|
286 |
+
if ( $this->get_choices() ) {
|
287 |
+
$schema['enum'] = (array) $this->get_choices();
|
288 |
+
}
|
289 |
+
return $schema;
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Get Map From
|
294 |
+
*
|
295 |
+
* @return null
|
296 |
+
*/
|
297 |
+
public function get_map_from() {
|
298 |
+
if ( isset( $this->map_from ) && ! empty( $this->map_from ) ) {
|
299 |
+
return $this->map_from;
|
300 |
+
}
|
301 |
+
|
302 |
+
return $this->get_name();
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Get Kind
|
307 |
+
*
|
308 |
+
* @return mixed
|
309 |
+
*/
|
310 |
+
public function get_kind() {
|
311 |
+
return $this->kind;
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Get Name
|
316 |
+
*
|
317 |
+
* @return mixed
|
318 |
+
*/
|
319 |
+
public function get_name() {
|
320 |
+
return $this->name;
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Is Primary
|
325 |
+
*
|
326 |
+
* @return bool
|
327 |
+
*/
|
328 |
+
public function is_primary() {
|
329 |
+
return (bool) $this->primary;
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Is Required
|
334 |
+
*
|
335 |
+
* @return bool
|
336 |
+
*/
|
337 |
+
public function is_required() {
|
338 |
+
return (bool) $this->required;
|
339 |
+
}
|
340 |
+
|
341 |
+
/**
|
342 |
+
* Get Description
|
343 |
+
*
|
344 |
+
* @return string
|
345 |
+
*/
|
346 |
+
public function get_description() {
|
347 |
+
if ( isset( $this->description ) && ! empty( $this->description ) ) {
|
348 |
+
return $this->description;
|
349 |
+
}
|
350 |
+
$name = ucfirst( str_replace( '_', ' ', $this->get_name() ) );
|
351 |
+
return $name;
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
* Get Dto name
|
356 |
+
*
|
357 |
+
* @return string
|
358 |
+
*/
|
359 |
+
public function get_data_transfer_name() {
|
360 |
+
return isset( $this->data_transfer_name ) ? $this->data_transfer_name : $this->get_name();
|
361 |
+
}
|
362 |
+
|
363 |
+
/**
|
364 |
+
* Get Validations
|
365 |
+
*
|
366 |
+
* @return array
|
367 |
+
*/
|
368 |
+
public function get_validations() {
|
369 |
+
return $this->validations;
|
370 |
+
}
|
371 |
+
|
372 |
+
/**
|
373 |
+
* Get Before get
|
374 |
+
*
|
375 |
+
* @return callable|null
|
376 |
+
*/
|
377 |
+
public function before_get() {
|
378 |
+
return $this->before_get;
|
379 |
+
}
|
380 |
+
|
381 |
+
/**
|
382 |
+
* Get Serializer
|
383 |
+
*
|
384 |
+
* @return callable|null
|
385 |
+
*/
|
386 |
+
public function get_serializer() {
|
387 |
+
return $this->serializer;
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Get Deserializer
|
392 |
+
*
|
393 |
+
* @return callable|null
|
394 |
+
*/
|
395 |
+
public function get_deserializer() {
|
396 |
+
return $this->deserializer;
|
397 |
+
}
|
398 |
+
|
399 |
+
/**
|
400 |
+
* Get Type
|
401 |
+
*
|
402 |
+
* @return WP_Job_Manager_REST_Interfaces_Type
|
403 |
+
*/
|
404 |
+
function get_type() {
|
405 |
+
return $this->type;
|
406 |
+
}
|
407 |
+
|
408 |
+
/**
|
409 |
+
* Before Set
|
410 |
+
*
|
411 |
+
* @return callable|null
|
412 |
+
*/
|
413 |
+
public function before_set() {
|
414 |
+
return $this->before_set;
|
415 |
+
}
|
416 |
+
|
417 |
+
/**
|
418 |
+
* Get Reader
|
419 |
+
*
|
420 |
+
* @return callable|null
|
421 |
+
*/
|
422 |
+
public function get_reader() {
|
423 |
+
return $this->reader;
|
424 |
+
}
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Get Updater
|
428 |
+
*
|
429 |
+
* @return callable|null
|
430 |
+
*/
|
431 |
+
public function get_updater() {
|
432 |
+
return $this->updater;
|
433 |
+
}
|
434 |
+
}
|
lib/wpjm_rest/field/declaration/class-wp-job-manager-rest-field-declaration-builder.php
ADDED
@@ -0,0 +1,290 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Field Declaration Builder
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
} // End if().
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class Mixtape_Model_Field_Declaration_Builder
|
14 |
+
* Builds a Mixtape_Model_Field_Declaration
|
15 |
+
*/
|
16 |
+
class WP_Job_Manager_REST_Field_Declaration_Builder {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Constructor.
|
20 |
+
*/
|
21 |
+
function __construct() {
|
22 |
+
$this->args = array(
|
23 |
+
'name' => '',
|
24 |
+
'kind' => WP_Job_Manager_REST_Field_Declaration::FIELD,
|
25 |
+
'type' => WP_Job_Manager_REST_Type::any(),
|
26 |
+
'required' => false,
|
27 |
+
'map_from' => null,
|
28 |
+
|
29 |
+
'sanitizer' => null,
|
30 |
+
|
31 |
+
'serializer' => null,
|
32 |
+
'deserializer' => null,
|
33 |
+
|
34 |
+
'default_value' => null,
|
35 |
+
'data_transfer_name' => null,
|
36 |
+
'supported_outputs' => array( 'json' ),
|
37 |
+
'description' => null,
|
38 |
+
'validations' => array(),
|
39 |
+
'choices' => null,
|
40 |
+
'contexts' => array( 'view', 'edit' ),
|
41 |
+
'before_set' => null,
|
42 |
+
'before_get' => null,
|
43 |
+
'reader' => null,
|
44 |
+
'updater' => null,
|
45 |
+
);
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Build it
|
50 |
+
*
|
51 |
+
* @return WP_Job_Manager_REST_Field_Declaration
|
52 |
+
*/
|
53 |
+
public function build() {
|
54 |
+
return new WP_Job_Manager_REST_Field_Declaration( $this->args );
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Default Value.
|
59 |
+
*
|
60 |
+
* @param mixed $default_value Default.
|
61 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
62 |
+
*/
|
63 |
+
public function with_default( $default_value ) {
|
64 |
+
return $this->with( 'default_value', $default_value );
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* With Name
|
69 |
+
*
|
70 |
+
* @param string $name Name.
|
71 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
72 |
+
*/
|
73 |
+
public function with_name( $name ) {
|
74 |
+
return $this->with( 'name', $name );
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* With Kind
|
79 |
+
*
|
80 |
+
* @param string $kind Kind.
|
81 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
82 |
+
*/
|
83 |
+
public function with_kind( $kind ) {
|
84 |
+
return $this->with( 'kind', $kind );
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* With Map From
|
89 |
+
*
|
90 |
+
* @param string $mapped_from Mapped From.
|
91 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
92 |
+
*/
|
93 |
+
public function with_map_from( $mapped_from ) {
|
94 |
+
return $this->with( 'map_from', $mapped_from );
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* With Sanitizer
|
99 |
+
*
|
100 |
+
* @param callable $sanitizer Sanitizer.
|
101 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
102 |
+
*/
|
103 |
+
public function with_sanitizer( $sanitizer ) {
|
104 |
+
$this->expect_is_callable( $sanitizer, __METHOD__ );
|
105 |
+
return $this->with( 'sanitizer', $sanitizer );
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* With Serializer
|
110 |
+
*
|
111 |
+
* @param callable $serializer Serializer.
|
112 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
113 |
+
*/
|
114 |
+
public function with_serializer( $serializer ) {
|
115 |
+
return $this->with( 'serializer', $serializer );
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* With Deserializer
|
120 |
+
*
|
121 |
+
* @param callable $deserializer Deserializer.
|
122 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
123 |
+
*/
|
124 |
+
public function with_deserializer( $deserializer ) {
|
125 |
+
return $this->with( 'deserializer', $deserializer );
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* With Required
|
130 |
+
*
|
131 |
+
* @param bool $required Req.
|
132 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
133 |
+
*/
|
134 |
+
public function with_required( $required = true ) {
|
135 |
+
return $this->with( 'required', $required );
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* With Supported Outputs
|
141 |
+
*
|
142 |
+
* @param array $supported_outputs Outputs.
|
143 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
144 |
+
*/
|
145 |
+
public function with_supported_outputs( $supported_outputs = array() ) {
|
146 |
+
return $this->with( 'supported_outputs', (array) $supported_outputs );
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Set the type definition of this field declaration
|
151 |
+
*
|
152 |
+
* @param WP_Job_Manager_REST_Interfaces_Type $value_type Type.
|
153 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder $this
|
154 |
+
*
|
155 |
+
* @throws WP_Job_Manager_REST_Exception When not a type.
|
156 |
+
*/
|
157 |
+
public function with_type( $value_type ) {
|
158 |
+
if ( ! is_a( $value_type, 'WP_Job_Manager_REST_Interfaces_Type' ) ) {
|
159 |
+
throw new WP_Job_Manager_REST_Exception( get_class( $value_type ) . ' is not a Mixtape_Interfaces_Type' );
|
160 |
+
}
|
161 |
+
return $this->with( 'type', $value_type );
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* With Dto Name
|
166 |
+
*
|
167 |
+
* @param string $dto_name Dto Name.
|
168 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
169 |
+
*/
|
170 |
+
public function with_dto_name( $dto_name ) {
|
171 |
+
return $this->with( 'data_transfer_name', $dto_name );
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* With Description
|
176 |
+
*
|
177 |
+
* @param string $description Description.
|
178 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
179 |
+
*/
|
180 |
+
public function with_description( $description ) {
|
181 |
+
return $this->with( 'description', $description );
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* With Validations
|
186 |
+
*
|
187 |
+
* @param array|mixed $validations Validations.
|
188 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
189 |
+
*/
|
190 |
+
public function with_validations( $validations ) {
|
191 |
+
if ( is_callable( $validations ) || ! is_array( $validations ) ) {
|
192 |
+
$validations = array( $validations );
|
193 |
+
}
|
194 |
+
return $this->with( 'validations', $validations );
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Before Set
|
199 |
+
*
|
200 |
+
* @param callable $before_set Before set.
|
201 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
202 |
+
*/
|
203 |
+
public function with_before_set( $before_set ) {
|
204 |
+
return $this->with( 'before_set', $before_set );
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Before Get
|
209 |
+
*
|
210 |
+
* @param callable $before_get Before get.
|
211 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
212 |
+
*/
|
213 |
+
public function with_before_get( $before_get ) {
|
214 |
+
return $this->with( 'before_get', $before_get );
|
215 |
+
}
|
216 |
+
|
217 |
+
/**
|
218 |
+
* Choices.
|
219 |
+
*
|
220 |
+
* @param array|mixed $choices Choices.
|
221 |
+
*
|
222 |
+
* @return $this|WP_Job_Manager_REST_Field_Declaration_Builder
|
223 |
+
*/
|
224 |
+
public function with_choices( $choices ) {
|
225 |
+
if ( empty( $choices ) ) {
|
226 |
+
return $this;
|
227 |
+
}
|
228 |
+
return $this->with( 'choices', is_array( $choices ) ? $choices : array( $choices ) );
|
229 |
+
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Set
|
233 |
+
*
|
234 |
+
* @param string $name Name.
|
235 |
+
* @param mixed $value Value.
|
236 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder $this
|
237 |
+
*/
|
238 |
+
private function with( $name, $value ) {
|
239 |
+
$this->args[ $name ] = $value;
|
240 |
+
return $this;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Derived Field
|
245 |
+
*
|
246 |
+
* @param callable $func The func.
|
247 |
+
*
|
248 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
249 |
+
*/
|
250 |
+
public function derived( $func = null ) {
|
251 |
+
if ( $func ) {
|
252 |
+
$this->with_map_from( $func );
|
253 |
+
}
|
254 |
+
return $this->with_kind( WP_Job_Manager_REST_Field_Declaration::DERIVED );
|
255 |
+
}
|
256 |
+
|
257 |
+
/**
|
258 |
+
* Set Updater
|
259 |
+
*
|
260 |
+
* @param callable $func Func.
|
261 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder $this
|
262 |
+
* @throws WP_Job_Manager_REST_Exception When no callable.
|
263 |
+
*/
|
264 |
+
public function with_updater( $func ) {
|
265 |
+
return $this->with( 'updater', $func );
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Set reader
|
270 |
+
*
|
271 |
+
* @param callable $func Func.
|
272 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder $this
|
273 |
+
* @throws WP_Job_Manager_REST_Exception When no callable.
|
274 |
+
*/
|
275 |
+
public function with_reader( $func ) {
|
276 |
+
return $this->with( 'reader', $func );
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Callable test
|
281 |
+
*
|
282 |
+
* @param callable|mixed $thing Thing to test.
|
283 |
+
* @param string $func The caller.
|
284 |
+
*
|
285 |
+
* @throws WP_Job_Manager_REST_Exception If not callable.
|
286 |
+
*/
|
287 |
+
private function expect_is_callable( $thing, $func ) {
|
288 |
+
WP_Job_Manager_REST_Expect::that( is_callable( $thing ), $func . ' Expected a callable' );
|
289 |
+
}
|
290 |
+
}
|
lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-builder.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Build Stuff
|
4 |
+
*
|
5 |
+
* @package Mixtape
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Interface WP_Job_Manager_REST_Interfaces_Builder
|
14 |
+
*/
|
15 |
+
interface WP_Job_Manager_REST_Interfaces_Builder {
|
16 |
+
/**
|
17 |
+
* Build something
|
18 |
+
*
|
19 |
+
* @return mixed
|
20 |
+
*/
|
21 |
+
function build();
|
22 |
+
}
|
lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-classloader.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* A Class Loader Interface.
|
4 |
+
*
|
5 |
+
* Injected into the Bootstrap. Handles all class loading.
|
6 |
+
*
|
7 |
+
* @package Mixtape
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Interface WP_Job_Manager_REST_Interfaces_Classloader
|
16 |
+
*/
|
17 |
+
interface WP_Job_Manager_REST_Interfaces_Classloader {
|
18 |
+
/**
|
19 |
+
* Load a class
|
20 |
+
*
|
21 |
+
* @param string $name The class to load.
|
22 |
+
* @return WP_Job_Manager_REST_Interfaces_Classloader
|
23 |
+
*/
|
24 |
+
function load_class( $name );
|
25 |
+
}
|
lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-controller.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Our controller Interface
|
4 |
+
*
|
5 |
+
* @package Mixtape/Controller
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Interface WP_Job_Manager_REST_Interfaces_Controller
|
14 |
+
*/
|
15 |
+
interface WP_Job_Manager_REST_Interfaces_Controller {
|
16 |
+
/**
|
17 |
+
* Register This Controller
|
18 |
+
*
|
19 |
+
* @param WP_Job_Manager_REST_Controller_Bundle $bundle The bundle to register with.
|
20 |
+
* @param WP_Job_Manager_REST_Environment $environment The Environment to use.
|
21 |
+
* @throws WP_Job_Manager_REST_Exception Throws.
|
22 |
+
*
|
23 |
+
* @return bool|WP_Error true if valid otherwise error.
|
24 |
+
*/
|
25 |
+
function register( $bundle, $environment );
|
26 |
+
}
|
lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-model.php
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Model
|
4 |
+
*
|
5 |
+
* This is the model.
|
6 |
+
*
|
7 |
+
* @package Mixtape/Model
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Interface Mixtape_Interfaces_Model
|
16 |
+
*/
|
17 |
+
interface WP_Job_Manager_REST_Interfaces_Model {
|
18 |
+
/**
|
19 |
+
* Get this model's unique identifier
|
20 |
+
*
|
21 |
+
* @return mixed a unique identifier
|
22 |
+
*/
|
23 |
+
function get_id();
|
24 |
+
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Set this model's unique identifier
|
28 |
+
*
|
29 |
+
* @param mixed $new_id The new Id.
|
30 |
+
* @return WP_Job_Manager_REST_Interfaces_Model $model This model.
|
31 |
+
*/
|
32 |
+
function set_id( $new_id );
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get a field for this model
|
36 |
+
*
|
37 |
+
* @param string $field_name The field name.
|
38 |
+
* @param array $args The args.
|
39 |
+
*
|
40 |
+
* @return mixed|null
|
41 |
+
*/
|
42 |
+
function get( $field_name, $args = array() );
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Set a field for this model
|
46 |
+
*
|
47 |
+
* @param string $field The field name.
|
48 |
+
* @param mixed $value The value.
|
49 |
+
*
|
50 |
+
* @return WP_Job_Manager_REST_Interfaces_Model $this;
|
51 |
+
*/
|
52 |
+
function set( $field, $value );
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Check if this model has a field
|
56 |
+
*
|
57 |
+
* @param string $field The field name.
|
58 |
+
*
|
59 |
+
* @return bool
|
60 |
+
*/
|
61 |
+
function has( $field );
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Validate this Model instance.
|
65 |
+
*
|
66 |
+
* @throws WP_Job_Manager_REST_Exception Throws.
|
67 |
+
*
|
68 |
+
* @return bool|WP_Error true if valid otherwise error.
|
69 |
+
*/
|
70 |
+
function validate();
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Sanitize this Model's field values
|
74 |
+
*
|
75 |
+
* @throws WP_Job_Manager_REST_Exception Throws.
|
76 |
+
*
|
77 |
+
* @return WP_Job_Manager_REST_Interfaces_Model
|
78 |
+
*/
|
79 |
+
function sanitize();
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Get this model class fields
|
83 |
+
*
|
84 |
+
* @param null|string $filter_by_type The field type.
|
85 |
+
* @return array
|
86 |
+
*/
|
87 |
+
public function get_fields( $filter_by_type = null );
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get this model's data store
|
91 |
+
*
|
92 |
+
* @return array
|
93 |
+
*/
|
94 |
+
public function get_data_store();
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Set this model's data store (statically, all models of that class get the same one)
|
98 |
+
*
|
99 |
+
* @param WP_Job_Manager_REST_Interfaces_Data_Store $data_store A builder or a Data store.
|
100 |
+
* @throws WP_Job_Manager_REST_Exception Throws when Data Store Invalid.
|
101 |
+
*/
|
102 |
+
public function with_data_store( $data_store );
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Get this model's environment
|
106 |
+
*
|
107 |
+
* @return array
|
108 |
+
*/
|
109 |
+
public function get_environment();
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Set this model's environment
|
113 |
+
*
|
114 |
+
* @param WP_Job_Manager_REST_Environment $environment The Environment.
|
115 |
+
* @throws WP_Job_Manager_REST_Exception If an WP_Job_Manager_REST_Environment is not provided.
|
116 |
+
*/
|
117 |
+
public function with_environment( $environment );
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Declare the fields of our Model.
|
121 |
+
*
|
122 |
+
* @return array list of WP_Job_Manager_REST_Field_Declaration
|
123 |
+
*/
|
124 |
+
public function declare_fields();
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Prepare this for data transfer
|
128 |
+
*
|
129 |
+
* @return mixed
|
130 |
+
*/
|
131 |
+
public function to_dto();
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Update from array
|
135 |
+
*
|
136 |
+
* @param array $data The Data.
|
137 |
+
* @param bool $updating Is this an update.
|
138 |
+
*
|
139 |
+
* @return mixed
|
140 |
+
*/
|
141 |
+
function update_from_array( $data, $updating = false );
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Transform Model to raw data array
|
145 |
+
*
|
146 |
+
* @param null|string $field_type Type.
|
147 |
+
*
|
148 |
+
* @return array
|
149 |
+
*/
|
150 |
+
function serialize( $field_type = null );
|
151 |
+
}
|
lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-registrable.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Something that can be registered with an environment
|
4 |
+
*
|
5 |
+
* @package Mixtape
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Interface WP_Job_Manager_REST_Interfaces_Registrable
|
14 |
+
*/
|
15 |
+
|
16 |
+
interface WP_Job_Manager_REST_Interfaces_Registrable {
|
17 |
+
/**
|
18 |
+
* Register This with an environment
|
19 |
+
*
|
20 |
+
* @param WP_Job_Manager_REST_Environment $environment The Environment to use.
|
21 |
+
* @return void
|
22 |
+
*/
|
23 |
+
function register( $environment );
|
24 |
+
}
|
lib/wpjm_rest/interfaces/class-wp-job-manager-rest-interfaces-type.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Type
|
4 |
+
*
|
5 |
+
* @package Mixtape/Type
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Interface WP_Job_Manager_REST_Interfaces_Type
|
14 |
+
*/
|
15 |
+
interface WP_Job_Manager_REST_Interfaces_Type {
|
16 |
+
/**
|
17 |
+
* Cast value to be Type
|
18 |
+
*
|
19 |
+
* @param mixed $value The value that needs casting.
|
20 |
+
*
|
21 |
+
* @return mixed
|
22 |
+
*/
|
23 |
+
public function cast( $value );
|
24 |
+
/**
|
25 |
+
* The default value
|
26 |
+
*
|
27 |
+
* @return null
|
28 |
+
*/
|
29 |
+
public function default_value();
|
30 |
+
/**
|
31 |
+
* The type's name
|
32 |
+
*
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
public function name();
|
36 |
+
/**
|
37 |
+
* Sanitize this value
|
38 |
+
*
|
39 |
+
* @param mixed $value The value to sanitize.
|
40 |
+
*
|
41 |
+
* @return mixed
|
42 |
+
*/
|
43 |
+
public function sanitize( $value );
|
44 |
+
/**
|
45 |
+
* Get this type's JSON Schema.
|
46 |
+
*
|
47 |
+
* @return array
|
48 |
+
*/
|
49 |
+
public function schema();
|
50 |
+
}
|
lib/wpjm_rest/interfaces/controller/class-wp-job-manager-rest-interfaces-controller-bundle.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Controller Bundle
|
4 |
+
*
|
5 |
+
* A collection of WP_Job_Manager_REST_Rest_Api_Controller, sharing a common prefix.
|
6 |
+
*
|
7 |
+
* @package Mixtape/REST
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Interface WP_Job_Manager_REST_Interfaces_Rest_Api_Controller_Bundle
|
16 |
+
*/
|
17 |
+
interface WP_Job_Manager_REST_Interfaces_Controller_Bundle extends WP_Job_Manager_REST_Interfaces_Registrable {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get the Prefix
|
21 |
+
*
|
22 |
+
* @return string
|
23 |
+
*/
|
24 |
+
public function get_prefix();
|
25 |
+
}
|
lib/wpjm_rest/interfaces/data/class-wp-job-manager-rest-interfaces-data-store.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Data Stores
|
4 |
+
*
|
5 |
+
* Provides a unified way for fetching and storing Models
|
6 |
+
*
|
7 |
+
* @package Mixtape
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
+
} // End if().
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Interface WP_Job_Manager_REST_Interfaces_Data_Store
|
16 |
+
*/
|
17 |
+
interface WP_Job_Manager_REST_Interfaces_Data_Store {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get all the models (taking into account any filtering)
|
21 |
+
*
|
22 |
+
* @param WP_Job_Manager_REST_Interfaces_Model|null $filter A filter.
|
23 |
+
* @return WP_Job_Manager_REST_Model_Collection
|
24 |
+
*/
|
25 |
+
public function get_entities( $filter = null );
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Get a Model Using it's unique identifier
|
30 |
+
*
|
31 |
+
* @param int $id The id of the entity.
|
32 |
+
* @return WP_Job_Manager_REST_Interfaces_Model
|
33 |
+
*/
|
34 |
+
public function get_entity( $id );
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Delete a Model
|
38 |
+
*
|
39 |
+
* @param WP_Job_Manager_REST_Interfaces_Model $model The model to delete.
|
40 |
+
* @param array $args Args.
|
41 |
+
* @return mixed
|
42 |
+
*/
|
43 |
+
public function delete( $model, $args = array() );
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Update/Insert Model
|
47 |
+
*
|
48 |
+
* @param WP_Job_Manager_REST_Interfaces_Model $model The model.
|
49 |
+
* @return mixed
|
50 |
+
*/
|
51 |
+
public function upsert( $model );
|
52 |
+
}
|
lib/wpjm_rest/interfaces/model/class-wp-job-manager-rest-interfaces-model-collection.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* A Collection of Mixtape_Interfaces_Model
|
4 |
+
*
|
5 |
+
* @package Mixtape
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Interface WP_Job_Manager_REST_Interfaces_Model_Collection
|
14 |
+
*/
|
15 |
+
interface WP_Job_Manager_REST_Interfaces_Model_Collection {
|
16 |
+
/**
|
17 |
+
* Get all the collection's Items
|
18 |
+
*
|
19 |
+
* @return Iterator
|
20 |
+
*/
|
21 |
+
function get_items();
|
22 |
+
}
|
lib/wpjm_rest/interfaces/permissions/class-wp-job-manager-rest-interfaces-permissions-provider.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Handle Permissions for a REST Controller Action
|
4 |
+
*
|
5 |
+
* @package Mixtape/REST
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Interface Mixtape_Interfaces_Rest_Api_Permissions_Provider
|
10 |
+
*/
|
11 |
+
interface WP_Job_Manager_REST_Interfaces_Permissions_Provider {
|
12 |
+
/**
|
13 |
+
* Handle Permissions for a REST Controller Action
|
14 |
+
*
|
15 |
+
* @param WP_REST_Request $request The request.
|
16 |
+
* @param string $action The action (e.g. index, create update etc).
|
17 |
+
* @return bool
|
18 |
+
*/
|
19 |
+
public function permissions_check( $request, $action );
|
20 |
+
}
|
lib/wpjm_rest/model/class-wp-job-manager-rest-model-collection.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Model Collection Default implementation
|
4 |
+
*
|
5 |
+
* @package Mixtape/Model
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class Mixtape_Model_Collection
|
14 |
+
*
|
15 |
+
* Represents a collection of Mixtape_Interfaces_Model.
|
16 |
+
*/
|
17 |
+
class WP_Job_Manager_REST_Model_Collection implements WP_Job_Manager_REST_Interfaces_Model_Collection {
|
18 |
+
/**
|
19 |
+
* The Models
|
20 |
+
*
|
21 |
+
* @var array the models Mixtape_Interfaces_Model
|
22 |
+
*/
|
23 |
+
private $models;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Mixtape_Model_Collection constructor.
|
27 |
+
*
|
28 |
+
* @param array $models The models.
|
29 |
+
*/
|
30 |
+
public function __construct( $models = array() ) {
|
31 |
+
$this->models = $models;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get the contents of this collection.
|
36 |
+
*
|
37 |
+
* @return Iterator
|
38 |
+
*/
|
39 |
+
public function get_items() {
|
40 |
+
return new ArrayIterator( $this->models );
|
41 |
+
}
|
42 |
+
}
|
lib/wpjm_rest/model/class-wp-job-manager-rest-model-settings.php
ADDED
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings Model
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Model
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Model_Settings
|
14 |
+
* Represents a single setting set
|
15 |
+
*/
|
16 |
+
class WP_Job_Manager_REST_Model_Settings extends WP_Job_Manager_REST_Model {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Get Settings
|
20 |
+
*
|
21 |
+
* @throws WP_Job_Manager_REST_Exception Override this.
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function get_settings() {
|
25 |
+
WP_Job_Manager_REST_Expect::should_override( __METHOD__ );
|
26 |
+
return array();
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Default for Attribute. Override to change this behavior
|
31 |
+
*
|
32 |
+
* @param array $field_data Data.
|
33 |
+
* @param string $attribute Attr.
|
34 |
+
* @return mixed
|
35 |
+
*/
|
36 |
+
protected function default_for_attribute( $field_data, $attribute ) {
|
37 |
+
return null;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* On Field Setup
|
42 |
+
*
|
43 |
+
* @param string $field_name Name.
|
44 |
+
* @param WP_Job_Manager_REST_Field_Declaration_Builder $field_builder Builder.
|
45 |
+
* @param array $field_data Data.
|
46 |
+
* @param WP_Job_Manager_REST_Environment $env Env.
|
47 |
+
* @return void
|
48 |
+
*/
|
49 |
+
protected function on_field_setup( $field_name, $field_builder, $field_data, $env ) {
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Declare Fields
|
54 |
+
*
|
55 |
+
* @return array
|
56 |
+
*/
|
57 |
+
public function declare_fields() {
|
58 |
+
$env = $this->get_environment();
|
59 |
+
$settings_per_group = $this->get_settings();
|
60 |
+
$fields = array();
|
61 |
+
|
62 |
+
foreach ( $settings_per_group as $group_name => $group_data ) {
|
63 |
+
$group_fields = $group_data[1];
|
64 |
+
|
65 |
+
foreach ( $group_fields as $field_data ) {
|
66 |
+
$field_builder = $this->field_declaration_builder_from_data( $env, $field_data );
|
67 |
+
$fields[] = $field_builder;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
return $fields;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Convert bool to bit
|
75 |
+
*
|
76 |
+
* @param mixed $value Val.
|
77 |
+
* @return string
|
78 |
+
*/
|
79 |
+
public function bool_to_bit( $value ) {
|
80 |
+
return ( ! empty( $value ) && 'false' !== $value ) ? '1' : '';
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Covert bit to bool
|
85 |
+
*
|
86 |
+
* @param mixed $value Val.
|
87 |
+
* @return bool
|
88 |
+
*/
|
89 |
+
public function bit_to_bool( $value ) {
|
90 |
+
return ( ! empty( $value ) && '0' !== $value ) ? true : false;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Get ID
|
95 |
+
*
|
96 |
+
* @return string
|
97 |
+
*/
|
98 |
+
public function get_id() {
|
99 |
+
return strtolower( get_class( $this ) );
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Set ID
|
104 |
+
*
|
105 |
+
* @param mixed $new_id New ID.
|
106 |
+
* @return WP_Job_Manager_REST_Interfaces_Model $this
|
107 |
+
*/
|
108 |
+
public function set_id( $new_id ) {
|
109 |
+
return $this;
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Build declarations from array
|
114 |
+
*
|
115 |
+
* @param WP_Job_Manager_REST_Environment $env Environment.
|
116 |
+
* @param array $field_data Data.
|
117 |
+
* @return WP_Job_Manager_REST_Field_Declaration_Builder
|
118 |
+
*/
|
119 |
+
private function field_declaration_builder_from_data( $env, $field_data ) {
|
120 |
+
$field_name = $field_data['name'];
|
121 |
+
$field_builder = $env->field( $field_name );
|
122 |
+
$default_value = isset( $field_data['std'] ) ? $field_data['std'] : $this->default_for_attribute( $field_data, 'std' );
|
123 |
+
$label = isset( $field_data['label'] ) ? $field_data['label'] : $field_name;
|
124 |
+
$description = isset( $field_data['desc'] ) ? $field_data['desc'] : $label;
|
125 |
+
$setting_type = isset( $field_data['type'] ) ? $field_data['type'] : null;
|
126 |
+
$choices = isset( $field_data['options'] ) ? array_keys( $field_data['options'] ) : null;
|
127 |
+
$field_type = 'string';
|
128 |
+
|
129 |
+
if ( 'checkbox' === $setting_type ) {
|
130 |
+
$field_type = 'boolean';
|
131 |
+
if ( $default_value ) {
|
132 |
+
// convert our default value as well.
|
133 |
+
$default_value = $this->bit_to_bool( $default_value );
|
134 |
+
}
|
135 |
+
$field_builder
|
136 |
+
->with_serializer( array( $this, 'bool_to_bit' ) )
|
137 |
+
->with_deserializer( array( $this, 'bit_to_bool' ) );
|
138 |
+
|
139 |
+
} elseif ( 'select' === $setting_type ) {
|
140 |
+
$field_type = 'string';
|
141 |
+
} else {
|
142 |
+
// try to guess numeric fields, although this is not perfect.
|
143 |
+
if ( is_numeric( $default_value ) ) {
|
144 |
+
$field_type = is_float( $default_value ) ? 'float' : 'integer';
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
if ( $default_value ) {
|
149 |
+
$field_builder->with_default( $default_value );
|
150 |
+
}
|
151 |
+
$field_builder
|
152 |
+
->with_description( $description )
|
153 |
+
->with_dto_name( $field_name )
|
154 |
+
->with_type( $env->type( $field_type ) );
|
155 |
+
if ( $choices ) {
|
156 |
+
$field_builder->with_choices( $choices );
|
157 |
+
}
|
158 |
+
|
159 |
+
$this->on_field_setup( $field_name, $field_builder, $field_data, $env );
|
160 |
+
|
161 |
+
return $field_builder;
|
162 |
+
}
|
163 |
+
}
|
lib/wpjm_rest/permissions/class-wp-job-manager-rest-permissions-any.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Any Permission
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Permissions_Any
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Permissions_Any implements WP_Job_Manager_REST_Interfaces_Permissions_Provider {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Handle Permissions for a REST Controller Action
|
19 |
+
*
|
20 |
+
* @param WP_REST_Request $request The request.
|
21 |
+
* @param string $action The action (e.g. index, create update etc).
|
22 |
+
* @return bool
|
23 |
+
*/
|
24 |
+
public function permissions_check( $request, $action ) {
|
25 |
+
return true;
|
26 |
+
}
|
27 |
+
}
|
lib/wpjm_rest/type/class-wp-job-manager-rest-type-array.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Array type
|
4 |
+
*
|
5 |
+
* @package Mixtape/Type
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Type_Array
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Type_Array extends WP_Job_Manager_REST_Type {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* WP_Job_Manager_REST_Type_Array constructor.
|
19 |
+
*/
|
20 |
+
public function __construct() {
|
21 |
+
parent::__construct( 'array' );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Get default
|
26 |
+
*
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
public function default_value() {
|
30 |
+
return array();
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Cast to array
|
35 |
+
*
|
36 |
+
* @param mixed $value the value.
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
public function cast( $value ) {
|
40 |
+
return (array) $value;
|
41 |
+
}
|
42 |
+
}
|
lib/wpjm_rest/type/class-wp-job-manager-rest-type-boolean.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Boolean Type
|
4 |
+
*
|
5 |
+
* @package Mixtape/Type
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Type_Boolean
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Type_Boolean extends WP_Job_Manager_REST_Type {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* WP_Job_Manager_REST_Type_Boolean constructor.
|
19 |
+
*/
|
20 |
+
public function __construct() {
|
21 |
+
parent::__construct( 'boolean' );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Default
|
26 |
+
*
|
27 |
+
* @return bool
|
28 |
+
*/
|
29 |
+
public function default_value() {
|
30 |
+
return false;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Cast
|
35 |
+
*
|
36 |
+
* @param mixed $value Value.
|
37 |
+
* @return bool
|
38 |
+
*/
|
39 |
+
public function cast( $value ) {
|
40 |
+
if ( 'false' === $value ) {
|
41 |
+
return false;
|
42 |
+
}
|
43 |
+
return (bool) $value;
|
44 |
+
}
|
45 |
+
}
|
lib/wpjm_rest/type/class-wp-job-manager-rest-type-integer.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Number Type (a floating point type)
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Types
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Type_Integer
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Type_Integer extends WP_Job_Manager_REST_Type {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Is this unsigned?
|
19 |
+
*
|
20 |
+
* @var bool
|
21 |
+
*/
|
22 |
+
private $unsigned;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* WP_Job_Manager_REST_Type_Integer constructor.
|
26 |
+
*
|
27 |
+
* @param bool $unsigned Unsigned.
|
28 |
+
*/
|
29 |
+
public function __construct( $unsigned = false ) {
|
30 |
+
$this->unsigned = $unsigned;
|
31 |
+
parent::__construct( 'integer' );
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Default
|
36 |
+
*
|
37 |
+
* @return int
|
38 |
+
*/
|
39 |
+
public function default_value() {
|
40 |
+
return 0;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Cast
|
45 |
+
*
|
46 |
+
* @param mixed $value Val.
|
47 |
+
* @return int
|
48 |
+
*/
|
49 |
+
public function cast( $value ) {
|
50 |
+
if ( ! is_numeric( $value ) ) {
|
51 |
+
return $this->default_value();
|
52 |
+
}
|
53 |
+
return $this->unsigned ? absint( $value ) : intval( $value, 10 );
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Sanitize
|
58 |
+
*
|
59 |
+
* @param mixed $value Val.
|
60 |
+
* @return int
|
61 |
+
*/
|
62 |
+
function sanitize( $value ) {
|
63 |
+
return $this->cast( $value );
|
64 |
+
}
|
65 |
+
}
|
lib/wpjm_rest/type/class-wp-job-manager-rest-type-model.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Model type
|
4 |
+
*
|
5 |
+
* @package Mixtape/Type
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Type_Model
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Type_Model extends WP_Job_Manager_REST_Type {
|
16 |
+
/**
|
17 |
+
* The Class (must implement WP_Job_Manager_REST_Interfaces_Model).
|
18 |
+
*
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
private $model_class;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* WP_Job_Manager_REST_Type_Array constructor.
|
25 |
+
*
|
26 |
+
* @param string $model_class The model class.
|
27 |
+
*/
|
28 |
+
public function __construct( $model_class = 'WP_Job_Manager_REST_Model' ) {
|
29 |
+
WP_Job_Manager_REST_Expect::implements_interface( $model_class, 'WP_Job_Manager_REST_Interfaces_Model' );
|
30 |
+
$this->model_class = $model_class;
|
31 |
+
parent::__construct( 'model:' . $model_class );
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get default WP_Job_Manager_REST_Interfaces_Model
|
36 |
+
*
|
37 |
+
* @return WP_Job_Manager_REST_Interfaces_Model
|
38 |
+
*/
|
39 |
+
public function default_value() {
|
40 |
+
$klass = $this->model_class;
|
41 |
+
return new $klass();
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Sanitize.
|
46 |
+
*
|
47 |
+
* @param WP_Job_Manager_REST_Interfaces_Model|mixed $value Val.
|
48 |
+
* @return WP_Job_Manager_REST_Interfaces_Model
|
49 |
+
* @throws WP_Job_Manager_REST_Exception If value not a $this->model_class.
|
50 |
+
*/
|
51 |
+
function sanitize( $value ) {
|
52 |
+
if ( is_a( $value, $this->model_class ) ) {
|
53 |
+
return $value->sanitize();
|
54 |
+
}
|
55 |
+
throw new WP_Job_Manager_REST_Exception( 'WP_Job_Manager_REST_Type_Model: don\'t know how to sanitize provided value' );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Cast to WP_Job_Manager_REST_Interfaces_Model if possible.
|
60 |
+
*
|
61 |
+
* @param WP_Job_Manager_REST_Interfaces_Model|array $value The value. Should be either array or type class.
|
62 |
+
* @return WP_Job_Manager_REST_Interfaces_Model
|
63 |
+
* @throws WP_Job_Manager_REST_Exception If value not an array or a $this->model_class.
|
64 |
+
*/
|
65 |
+
public function cast( $value ) {
|
66 |
+
if ( is_a( $value, $this->model_class ) ) {
|
67 |
+
return $value;
|
68 |
+
} elseif ( is_array( $value ) ) {
|
69 |
+
$klass = $this->model_class;
|
70 |
+
return new $klass( $value );
|
71 |
+
}
|
72 |
+
throw new WP_Job_Manager_REST_Exception( 'WP_Job_Manager_REST_Type_Model: don\'t know how to cast provided value' );
|
73 |
+
}
|
74 |
+
}
|
lib/wpjm_rest/type/class-wp-job-manager-rest-type-nullable.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Nullable Type (a type that can be null)
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Types
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Type_Nullable
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Type_Nullable extends WP_Job_Manager_REST_Type {
|
16 |
+
/**
|
17 |
+
* The type
|
18 |
+
*
|
19 |
+
* @var WP_Job_Manager_REST_Interfaces_Type
|
20 |
+
*/
|
21 |
+
private $item_type_definition;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Construct
|
25 |
+
*
|
26 |
+
* @param WP_Job_Manager_REST_Interfaces_Type $item_type_definition Def.
|
27 |
+
*/
|
28 |
+
function __construct( $item_type_definition ) {
|
29 |
+
parent::__construct( 'nullable:' . $item_type_definition->name() );
|
30 |
+
$this->item_type_definition = $item_type_definition;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Default value as always null.
|
35 |
+
*
|
36 |
+
* @return null
|
37 |
+
*/
|
38 |
+
public function default_value() {
|
39 |
+
return null;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Cast
|
44 |
+
*
|
45 |
+
* @param mixed $value Value.
|
46 |
+
* @return mixed|null
|
47 |
+
*/
|
48 |
+
public function cast( $value ) {
|
49 |
+
if ( null === $value ) {
|
50 |
+
return null;
|
51 |
+
}
|
52 |
+
return $this->item_type_definition->cast( $value );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Sanitize.
|
57 |
+
*
|
58 |
+
* @param mixed $value Value.
|
59 |
+
* @return mixed|null
|
60 |
+
*/
|
61 |
+
public function sanitize( $value ) {
|
62 |
+
if ( null === $value ) {
|
63 |
+
return null;
|
64 |
+
}
|
65 |
+
return $this->item_type_definition->sanitize( $value );
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Schema
|
70 |
+
*/
|
71 |
+
function schema() {
|
72 |
+
$schema = parent::schema();
|
73 |
+
$schema['type'] = array_unique( array_merge( $schema['type'], array( 'null' ) ) );
|
74 |
+
}
|
75 |
+
}
|
lib/wpjm_rest/type/class-wp-job-manager-rest-type-number.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Number Type (a floating point type)
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Types
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Type_Number
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Type_Number extends WP_Job_Manager_REST_Type {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* WP_Job_Manager_REST_Type_Number constructor.
|
19 |
+
*/
|
20 |
+
function __construct() {
|
21 |
+
parent::__construct( 'number' );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* The default value
|
26 |
+
*
|
27 |
+
* @return float
|
28 |
+
*/
|
29 |
+
function default_value() {
|
30 |
+
return 0.0;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Cast
|
35 |
+
*
|
36 |
+
* @param mixed $value The thing to cast.
|
37 |
+
* @return float
|
38 |
+
*/
|
39 |
+
function cast( $value ) {
|
40 |
+
if ( ! is_numeric( $value ) ) {
|
41 |
+
return $this->default_value();
|
42 |
+
}
|
43 |
+
return floatval( $value );
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Sanitize
|
48 |
+
*
|
49 |
+
* @param mixed $value The value to sanitize.
|
50 |
+
* @return float
|
51 |
+
*/
|
52 |
+
function sanitize( $value ) {
|
53 |
+
return $this->cast( $value );
|
54 |
+
}
|
55 |
+
}
|
lib/wpjm_rest/type/class-wp-job-manager-rest-type-registry.php
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Type Registry
|
4 |
+
*
|
5 |
+
* @package WP_Job_Manager_REST/Type
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Type_Registry
|
14 |
+
*
|
15 |
+
* We support some primitive types, as well as container types:
|
16 |
+
* 'any'
|
17 |
+
* 'string'
|
18 |
+
* 'integer'
|
19 |
+
* 'int'
|
20 |
+
* 'uint'
|
21 |
+
* 'number'
|
22 |
+
* 'float'
|
23 |
+
* 'boolean
|
24 |
+
* 'array' (untyped array)
|
25 |
+
* 'array:<type>' (typed array)
|
26 |
+
* 'nullable:<type>' (nullable type)
|
27 |
+
* 'model:<class>' (a model type)
|
28 |
+
*/
|
29 |
+
class WP_Job_Manager_REST_Type_Registry {
|
30 |
+
/**
|
31 |
+
* Container Types (types that contain other types)
|
32 |
+
*
|
33 |
+
* @var array
|
34 |
+
*/
|
35 |
+
private $container_types = array(
|
36 |
+
'array',
|
37 |
+
'nullable',
|
38 |
+
'model',
|
39 |
+
);
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Our registered types
|
43 |
+
*
|
44 |
+
* @var null|array
|
45 |
+
*/
|
46 |
+
private $types = null;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Environment
|
50 |
+
*
|
51 |
+
* @var null|WP_Job_Manager_REST_Environment
|
52 |
+
*/
|
53 |
+
private $environment = null;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Define a new type
|
57 |
+
*
|
58 |
+
* @param string $identifier The Identifier.
|
59 |
+
* @param WP_Job_Manager_REST_Interfaces_Type $instance The type instance.
|
60 |
+
*
|
61 |
+
* @return WP_Job_Manager_REST_Type_Registry $this
|
62 |
+
*
|
63 |
+
* @throws WP_Job_Manager_REST_Exception When $instance not a WP_Job_Manager_REST_Interfaces_Type.
|
64 |
+
*/
|
65 |
+
public function define( $identifier, $instance ) {
|
66 |
+
WP_Job_Manager_REST_Expect::is_a( $instance, 'WP_Job_Manager_REST_Interfaces_Type' );
|
67 |
+
$this->types[ $identifier ] = $instance;
|
68 |
+
return $this;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Get a type definition
|
73 |
+
*
|
74 |
+
* @param string $type The type name.
|
75 |
+
* @return WP_Job_Manager_REST_Interfaces_Type
|
76 |
+
*
|
77 |
+
* @throws WP_Job_Manager_REST_Exception In case of type name not conforming to syntax.
|
78 |
+
*/
|
79 |
+
function definition( $type ) {
|
80 |
+
$types = $this->get_types();
|
81 |
+
|
82 |
+
if ( ! isset( $types[ $type ] ) ) {
|
83 |
+
// maybe lazy-register missing compound type.
|
84 |
+
$parts = explode( ':', $type );
|
85 |
+
if ( count( $parts ) > 1 ) {
|
86 |
+
|
87 |
+
$container_type = $parts[0];
|
88 |
+
WP_Job_Manager_REST_Expect::that( in_array( $container_type, $this->container_types, true ), $container_type . ' is not a known container type' );
|
89 |
+
|
90 |
+
$item_type = $parts[1];
|
91 |
+
|
92 |
+
if ( empty( $item_type ) ) {
|
93 |
+
throw new WP_Job_Manager_REST_Exception( $type . ': invalid syntax' );
|
94 |
+
}
|
95 |
+
|
96 |
+
if ( 'array' === $container_type ) {
|
97 |
+
$item_type_definition = $this->definition( $item_type );
|
98 |
+
$this->define( $type, new WP_Job_Manager_REST_Type_TypedArray( $item_type_definition ) );
|
99 |
+
$types = $this->get_types();
|
100 |
+
}
|
101 |
+
|
102 |
+
if ( 'nullable' === $container_type ) {
|
103 |
+
$item_type_definition = $this->definition( $item_type );
|
104 |
+
$this->define( $type, new WP_Job_Manager_REST_Type_Nullable( $item_type_definition ) );
|
105 |
+
$types = $this->get_types();
|
106 |
+
}
|
107 |
+
|
108 |
+
if ( 'model' === $container_type ) {
|
109 |
+
$this->define( $type, new WP_Job_Manager_REST_Type_Model( $item_type ) );
|
110 |
+
$types = $this->get_types();
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
WP_Job_Manager_REST_Expect::that( isset( $types[ $type ] ), 'invalid type ' . $type );
|
116 |
+
|
117 |
+
return $types[ $type ];
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Get Types
|
122 |
+
*
|
123 |
+
* @return array
|
124 |
+
*/
|
125 |
+
private function get_types() {
|
126 |
+
return (array) $this->environment
|
127 |
+
->get_event_dispatcher()
|
128 |
+
->apply_filters( 'type_registry_get_types', $this->types, $this );
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Initialize the type registry
|
133 |
+
*
|
134 |
+
* @param WP_Job_Manager_REST_Environment $environment The Environment.
|
135 |
+
*/
|
136 |
+
public function initialize( $environment ) {
|
137 |
+
if ( null !== $this->types ) {
|
138 |
+
return;
|
139 |
+
}
|
140 |
+
|
141 |
+
$this->environment = $environment;
|
142 |
+
$this->types = (array) $this->environment->get_event_dispatcher()->apply_filters( 'type_registry_register_types', array(
|
143 |
+
'any' => new WP_Job_Manager_REST_Type( 'any' ),
|
144 |
+
'string' => new WP_Job_Manager_REST_Type_String(),
|
145 |
+
'integer' => new WP_Job_Manager_REST_Type_Integer(),
|
146 |
+
'int' => new WP_Job_Manager_REST_Type_Integer(),
|
147 |
+
'uint' => new WP_Job_Manager_REST_Type_Integer( true ),
|
148 |
+
'number' => new WP_Job_Manager_REST_Type_Number(),
|
149 |
+
'float' => new WP_Job_Manager_REST_Type_Number(),
|
150 |
+
'boolean' => new WP_Job_Manager_REST_Type_Boolean(),
|
151 |
+
'array' => new WP_Job_Manager_REST_Type_Array(),
|
152 |
+
), $this, $environment );
|
153 |
+
}
|
154 |
+
}
|
lib/wpjm_rest/type/class-wp-job-manager-rest-type-string.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* String type
|
4 |
+
*
|
5 |
+
* @package Mixtape/Type
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WP_Job_Manager_REST_Type_String
|
14 |
+
*/
|
15 |
+
class WP_Job_Manager_REST_Type_String extends WP_Job_Manager_REST_Type {
|
16 |
+
/**
|
17 |
+
* WP_Job_Manager_REST_Type_String constructor.
|
18 |
+
*/
|
19 |
+
function __construct() {
|
20 |
+
parent::__construct( 'string' );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Sanitize.
|
25 |
+
*
|
26 |
+
* @param mixed $value Val.
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
function sanitize( $value ) {
|
30 |
+
return sanitize_text_field( $value );
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Default
|
35 |
+
*
|
36 |
+
* @return string
|
37 |
+
*/
|
38 |
+
function default_value() {
|
39 |
+
return '';
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Cast
|
44 |
+
*
|
45 |
+
* @param mixed $value Val.
|
46 |
+
* @return string
|
47 |
+
*/
|
48 |
+
function cast( $value ) {
|
49 |
+
if ( is_array( $value ) ) {
|
50 |
+
$cast_ones = array();
|
51 |
+
foreach ( $value as $v ) {
|
52 |
+
$cast_ones[] = $this->cast( $v );
|
53 |
+
}
|
54 |
+
return '(' . implode( ',', $cast_ones ) . ')';
|
55 |
+
}
|
56 |
+
return (string) $value;
|
57 |
+
}
|
58 |
+
}
|
lib/wpjm_rest/type/class-wp-job-manager-rest-type-typedarray.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Typed Array
|
4 |
+
*
|
5 |
+
* A container types
|
6 |
+
*
|
7 |
+
* @package Mixtape/Type
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class WP_Job_Manager_REST_Type_TypedArray
|
16 |
+
*/
|
17 |
+
class WP_Job_Manager_REST_Type_TypedArray extends WP_Job_Manager_REST_Type {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The type this array contains
|
21 |
+
*
|
22 |
+
* @var WP_Job_Manager_REST_Interfaces_Type
|
23 |
+
*/
|
24 |
+
private $item_type_definition;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Mixtape_TypeDefinition_TypedArray constructor.
|
28 |
+
*
|
29 |
+
* @param WP_Job_Manager_REST_Interfaces_Type $item_type_definition The type.
|
30 |
+
*/
|
31 |
+
function __construct( $item_type_definition ) {
|
32 |
+
parent::__construct( 'array:' . $item_type_definition->name() );
|
33 |
+
$this->item_type_definition = $item_type_definition;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Get the default value
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function default_value() {
|
42 |
+
return array();
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Cast the value to be a typed array
|
47 |
+
*
|
48 |
+
* @param mixed $value an array of mixed.
|
49 |
+
* @return array
|
50 |
+
*/
|
51 |
+
public function cast( $value ) {
|
52 |
+
$new_value = array();
|
53 |
+
|
54 |
+
foreach ( $value as $v ) {
|
55 |
+
$new_value[] = $this->item_type_definition->cast( $v );
|
56 |
+
}
|
57 |
+
return (array) $new_value;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get this type's JSON Schema
|
62 |
+
*
|
63 |
+
* @return array
|
64 |
+
*/
|
65 |
+
function schema() {
|
66 |
+
$schema = parent::schema();
|
67 |
+
$schema['type'] = 'array';
|
68 |
+
$schema['items'] = $this->item_type_definition->schema();
|
69 |
+
return $schema;
|
70 |
+
}
|
71 |
+
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: job manager, job listing, job board, job management, job lists, job list,
|
|
4 |
Requires at least: 5.7
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 7.0
|
7 |
-
Stable tag: 1.36.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -153,6 +153,9 @@ It then creates a database based on the parameters passed to it.
|
|
153 |
|
154 |
== Changelog ==
|
155 |
|
|
|
|
|
|
|
156 |
= 1.36.1 =
|
157 |
* Enhancement: Add salary field to satisfy Google's job search schema
|
158 |
* Enhancement: Allow location to display as either City/St or Full Address
|
4 |
Requires at least: 5.7
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 7.0
|
7 |
+
Stable tag: 1.36.2
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
153 |
|
154 |
== Changelog ==
|
155 |
|
156 |
+
= 1.36.2 =
|
157 |
+
* Fix: Revert Job Visibility Settings feature
|
158 |
+
|
159 |
= 1.36.1 =
|
160 |
* Enhancement: Add salary field to satisfy Google's job search schema
|
161 |
* Enhancement: Allow location to display as either City/St or Full Address
|
templates/access-denied-browse-job_listings.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Access denied message when attempting to browse job listings.
|
4 |
-
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/job_manager/access-denied-browse-job_listings.php.
|
6 |
-
*
|
7 |
-
* @see https://wpjobmanager.com/document/template-overrides/
|
8 |
-
* @author Automattic
|
9 |
-
* @package wp-job-manager
|
10 |
-
* @category Template
|
11 |
-
* @version 1.36.0
|
12 |
-
*/
|
13 |
-
|
14 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
-
exit;
|
16 |
-
}
|
17 |
-
?>
|
18 |
-
<p class="job-manager-error"><?php _e( 'Sorry, you do not have permission to browse job listings.', 'wp-job-manager' ); ?></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/access-denied-single-job_listing.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Message to display when access is denied to a single job listing.
|
4 |
-
*
|
5 |
-
* This template can be overridden by copying it to yourtheme/job_manager/access-denied-single-job_listing.php.
|
6 |
-
*
|
7 |
-
* @see https://wpjobmanager.com/document/template-overrides/
|
8 |
-
* @author Automattic
|
9 |
-
* @package wp-job-manager
|
10 |
-
* @category Template
|
11 |
-
* @version 1.36.0
|
12 |
-
*/
|
13 |
-
|
14 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
-
exit;
|
16 |
-
}
|
17 |
-
|
18 |
-
if ( $post->post_status === 'expired' ) : ?>
|
19 |
-
<div class="job-manager-info"><?php _e( 'This listing has expired', 'wp-job-manager' ); ?></div>
|
20 |
-
<?php else : ?>
|
21 |
-
<p class="job-manager-error"><?php _e( 'Sorry, you do not have permission to view this job listing.', 'wp-job-manager' ); ?></p>
|
22 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/content-single-job_listing.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @package wp-job-manager
|
10 |
* @category Template
|
11 |
* @since 1.0.0
|
12 |
-
* @version 1.
|
13 |
*/
|
14 |
|
15 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -17,40 +17,34 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
17 |
}
|
18 |
|
19 |
global $post;
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
<?php
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
<?php
|
41 |
-
<?php get_job_manager_template( 'job-application.php' ); ?>
|
42 |
-
<?php endif; ?>
|
43 |
-
|
44 |
-
<?php
|
45 |
-
/**
|
46 |
-
* single_job_listing_end hook
|
47 |
-
*/
|
48 |
-
do_action( 'single_job_listing_end' );
|
49 |
-
?>
|
50 |
<?php endif; ?>
|
51 |
-
</div>
|
52 |
-
<?php else : ?>
|
53 |
-
|
54 |
-
<?php get_job_manager_template_part( 'access-denied', 'single-job_listing' ); ?>
|
55 |
|
56 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
* @package wp-job-manager
|
10 |
* @category Template
|
11 |
* @since 1.0.0
|
12 |
+
* @version 1.28.0
|
13 |
*/
|
14 |
|
15 |
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
}
|
18 |
|
19 |
global $post;
|
20 |
+
?>
|
21 |
+
<div class="single_job_listing">
|
22 |
+
<?php if ( get_option( 'job_manager_hide_expired_content', 1 ) && 'expired' === $post->post_status ) : ?>
|
23 |
+
<div class="job-manager-info"><?php _e( 'This listing has expired.', 'wp-job-manager' ); ?></div>
|
24 |
+
<?php else : ?>
|
25 |
+
<?php
|
26 |
+
/**
|
27 |
+
* single_job_listing_start hook
|
28 |
+
*
|
29 |
+
* @hooked job_listing_meta_display - 20
|
30 |
+
* @hooked job_listing_company_display - 30
|
31 |
+
*/
|
32 |
+
do_action( 'single_job_listing_start' );
|
33 |
+
?>
|
34 |
+
|
35 |
+
<div class="job_description">
|
36 |
+
<?php wpjm_the_job_description(); ?>
|
37 |
+
</div>
|
38 |
+
|
39 |
+
<?php if ( candidates_can_apply() ) : ?>
|
40 |
+
<?php get_job_manager_template( 'job-application.php' ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
42 |
|
43 |
+
<?php
|
44 |
+
/**
|
45 |
+
* single_job_listing_end hook
|
46 |
+
*/
|
47 |
+
do_action( 'single_job_listing_end' );
|
48 |
+
?>
|
49 |
+
<?php endif; ?>
|
50 |
+
</div>
|
wp-job-manager-functions.php
CHANGED
@@ -1602,72 +1602,3 @@ function job_manager_count_user_job_listings( $user_id = 0 ) {
|
|
1602 |
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
|
1603 |
return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_author = %d AND post_type = 'job_listing' AND post_status IN ( 'publish', 'pending', 'expired', 'hidden' );", $user_id ) );
|
1604 |
}
|
1605 |
-
|
1606 |
-
/**
|
1607 |
-
* True if an the user can browse resumes.
|
1608 |
-
*
|
1609 |
-
* @return bool
|
1610 |
-
*/
|
1611 |
-
function job_manager_user_can_browse_job_listings() {
|
1612 |
-
$can_browse = true;
|
1613 |
-
$caps = array_filter( array_map( 'trim', array_map( 'strtolower', explode( ',', get_option( 'job_manager_browse_job_capability' ) ) ) ) );
|
1614 |
-
|
1615 |
-
if ( $caps ) {
|
1616 |
-
$can_browse = false;
|
1617 |
-
foreach ( $caps as $cap ) {
|
1618 |
-
if ( current_user_can( $cap ) ) {
|
1619 |
-
$can_browse = true;
|
1620 |
-
break;
|
1621 |
-
}
|
1622 |
-
}
|
1623 |
-
}
|
1624 |
-
|
1625 |
-
return apply_filters( 'job_manager_user_can_browse_job_listings', $can_browse );
|
1626 |
-
}
|
1627 |
-
|
1628 |
-
/**
|
1629 |
-
* True if an the user can view a resume.
|
1630 |
-
*
|
1631 |
-
* @since 1.36.0
|
1632 |
-
*
|
1633 |
-
* @param int $job_id
|
1634 |
-
* @return bool
|
1635 |
-
*/
|
1636 |
-
function job_manager_user_can_view_job_listing( $job_id ) {
|
1637 |
-
$can_view = true;
|
1638 |
-
$job = get_post( $job_id );
|
1639 |
-
|
1640 |
-
// Allow previews.
|
1641 |
-
if ( 'preview' === $job->post_status ) {
|
1642 |
-
return true;
|
1643 |
-
}
|
1644 |
-
|
1645 |
-
$caps = array_filter( array_map( 'trim', array_map( 'strtolower', explode( ',', get_option( 'job_manager_view_job_capability' ) ) ) ) );
|
1646 |
-
|
1647 |
-
if ( $caps ) {
|
1648 |
-
$can_view = false;
|
1649 |
-
foreach ( $caps as $cap ) {
|
1650 |
-
if ( current_user_can( $cap ) ) {
|
1651 |
-
$can_view = true;
|
1652 |
-
break;
|
1653 |
-
}
|
1654 |
-
}
|
1655 |
-
}
|
1656 |
-
|
1657 |
-
if ( 'expired' === $job->post_status ) {
|
1658 |
-
$can_view = false;
|
1659 |
-
}
|
1660 |
-
|
1661 |
-
if ( $job->post_author > 0 && absint( $job->post_author ) === get_current_user_id() ) {
|
1662 |
-
$can_view = true;
|
1663 |
-
}
|
1664 |
-
|
1665 |
-
$key = get_post_meta( $job_id, 'share_link_key', true );
|
1666 |
-
|
1667 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
1668 |
-
if ( $key && ! empty( $_GET['key'] ) && $key === $_GET['key'] ) {
|
1669 |
-
$can_view = true;
|
1670 |
-
}
|
1671 |
-
|
1672 |
-
return apply_filters( 'job_manager_user_can_view_job', $can_view, $job_id );
|
1673 |
-
}
|
1602 |
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
|
1603 |
return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_author = %d AND post_type = 'job_listing' AND post_status IN ( 'publish', 'pending', 'expired', 'hidden' );", $user_id ) );
|
1604 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wp-job-manager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WP Job Manager
|
4 |
* Plugin URI: https://wpjobmanager.com/
|
5 |
* Description: Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
|
6 |
-
* Version: 1.36.
|
7 |
* Author: Automattic
|
8 |
* Author URI: https://wpjobmanager.com/
|
9 |
* Requires at least: 5.7
|
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
21 |
}
|
22 |
|
23 |
// Define constants.
|
24 |
-
define( 'JOB_MANAGER_VERSION', '1.36.
|
25 |
define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
26 |
define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
|
27 |
define( 'JOB_MANAGER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
3 |
* Plugin Name: WP Job Manager
|
4 |
* Plugin URI: https://wpjobmanager.com/
|
5 |
* Description: Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
|
6 |
+
* Version: 1.36.2
|
7 |
* Author: Automattic
|
8 |
* Author URI: https://wpjobmanager.com/
|
9 |
* Requires at least: 5.7
|
21 |
}
|
22 |
|
23 |
// Define constants.
|
24 |
+
define( 'JOB_MANAGER_VERSION', '1.36.2' );
|
25 |
define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
26 |
define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
|
27 |
define( 'JOB_MANAGER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|