From f7ed2a873d9b06eb4c38778947cb6f2292507ecc Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 8 Dec 2015 13:39:31 -0500 Subject: [PATCH] update the job plugin use defines for the two taxonomies --- glm-employment.php | 4 +++ models/job.php | 56 +++++++++++++++++++-------------------- views/front/jobDetail.php | 4 +-- views/front/jobList.php | 4 +-- views/front/jobSearch.php | 2 +- 5 files changed, 37 insertions(+), 33 deletions(-) diff --git a/glm-employment.php b/glm-employment.php index 6ff7f54..1cfa662 100644 --- a/glm-employment.php +++ b/glm-employment.php @@ -17,7 +17,11 @@ define('STAFFORDS_EMP_VERSION', '0.2.1'); define('STAFFORDS_EMP_VRS_OPTION_NAME', 'staffords_jobs_db_version'); define('STAFFORDS_EMP_POST_TYPE', 'staffords_jobs'); define('STAFFORDS_EMP_TAX_CATEGORIES', 'staffords_jobscategory'); +define('STAFFORDS_EMP_CATEGORY_SINGLE', 'Category'); +define('STAFFORDS_EMP_CATEGORY_PLURAL', 'Categories'); define('STAFFORDS_EMP_TAX_DEPARTMENTS', 'staffords_jobsdepartment'); +define('STAFFORDS_EMP_DEPARTMENT_SINGLE', 'Property'); +define('STAFFORDS_EMP_DEPARTMENT_PLURAL', 'Properties'); define('STAFFORDS_EMP_APPLICATION_TABLE', 'staffords_jobs_application'); define('STAFFORDS_EMP_FORM_TABLE', 'staffords_jobs_app_form'); $wp_upload_dir = wp_upload_dir(); diff --git a/models/job.php b/models/job.php index 8f107ec..03140e6 100644 --- a/models/job.php +++ b/models/job.php @@ -404,28 +404,28 @@ class staffords_employment_job public function createJobTaxonomy() { $labels = array( - 'name' => _x('Categories', + 'name' => _x(STAFFORDS_EMP_CATEGORY_PLURAL, 'taxonomy general name'), - 'singular_name' => _x('Category', + 'singular_name' => _x(STAFFORDS_EMP_CATEGORY_SINGLE, 'taxonomy singular name'), - 'search_items' => __('Search Categories'), - 'popular_items' => __('Popular Categories'), - 'all_items' => __('All Categories'), + 'search_items' => __('Search' . STAFFORDS_EMP_CATEGORY_PLURAL), + 'popular_items' => __('Popular ' . STAFFORDS_EMP_CATEGORY_PLURAL), + 'all_items' => __('All ' . STAFFORDS_EMP_CATEGORY_PLURAL), 'parent_item' => null, 'parent_item_colon' => null, - 'edit_item' => __('Edit Category'), - 'update_item' => __('Update Category'), - 'add_new_item' => __('Add New Category'), - 'new_item_name' => __('New Category Name'), - 'separate_items_with_commas' => __('Separate categories with commas'), - 'add_or_remove_items' => __('Add or remove categories'), - 'choose_from_most_used' => __('Choose from the most used categories'), + 'edit_item' => __('Edit ' . STAFFORDS_EMP_CATEGORY_SINGLE), + 'update_item' => __('Update ' . STAFFORDS_EMP_CATEGORY_SINGLE), + 'add_new_item' => __('Add New ' . STAFFORDS_EMP_CATEGORY_SINGLE), + 'new_item_name' => __('New ' . STAFFORDS_EMP_CATEGORY_SINGLE . ' Name'), + 'separate_items_with_commas' => __('Separate ' . strtolower( STAFFORDS_EMP_CATEGORY_PLURAL ) . ' with commas'), + 'add_or_remove_items' => __('Add or remove ' . strtolower( STAFFORDS_EMP_CATEGORY_PLURAL )), + 'choose_from_most_used' => __('Choose from the most used ' . strtolower( STAFFORDS_EMP_CATEGORY_PLURAL )), ); register_taxonomy( STAFFORDS_EMP_TAX_CATEGORIES, STAFFORDS_EMP_POST_TYPE, array( - 'label' => __('Job Category'), + 'label' => __('Job ' . STAFFORDS_EMP_CATEGORY_SINGLE), 'labels' => $labels, 'hierarchical' => true, 'show_ui' => true, @@ -436,28 +436,28 @@ class staffords_employment_job )); $labels = array( - 'name' => _x('Properties', + 'name' => _x(STAFFORDS_EMP_DEPARTMENT_PLURAL, 'taxonomy general name'), - 'singular_name' => _x('Property', + 'singular_name' => _x(STAFFORDS_EMP_DEPARTMENT_SINGLE, 'taxonomy singular name'), - 'search_items' => __('Search Properties'), - 'popular_items' => __('Popular Properties'), - 'all_items' => __('All Properties'), + 'search_items' => __('Search ' . STAFFORDS_EMP_DEPARTMENT_PLURAL), + 'popular_items' => __('Popular ' . STAFFORDS_EMP_DEPARTMENT_PLURAL), + 'all_items' => __('All ' . STAFFORDS_EMP_DEPARTMENT_PLURAL), 'parent_item' => null, 'parent_item_colon' => null, - 'edit_item' => __('Edit Property'), - 'update_item' => __('Update Property'), - 'add_new_item' => __('Add New Property'), - 'new_item_name' => __('New Property Name'), - 'separate_items_with_commas' => __('Separate departments with commas'), - 'add_or_remove_items' => __('Add or remove departments'), - 'choose_from_most_used' => __('Choose from the most used departments'), + 'edit_item' => __('Edit ' . STAFFORDS_EMP_DEPARTMENT_SINGLE), + 'update_item' => __('Update ' . STAFFORDS_EMP_DEPARTMENT_SINGLE), + 'add_new_item' => __('Add New ' . STAFFORDS_EMP_DEPARTMENT_SINGLE), + 'new_item_name' => __('New ' . STAFFORDS_EMP_DEPARTMENT_SINGLE . ' Name'), + 'separate_items_with_commas' => __('Separate ' . strtolower( STAFFORDS_EMP_DEPARTMENT_PLURAL ) . ' with commas'), + 'add_or_remove_items' => __('Add or remove ' . strtolower( STAFFORDS_EMP_DEPARTMENT_PLURAL )), + 'choose_from_most_used' => __('Choose from the most used ' . strtolower( STAFFORDS_EMP_DEPARTMENT_PLURAL )), ); register_taxonomy( STAFFORDS_EMP_TAX_DEPARTMENTS, STAFFORDS_EMP_POST_TYPE, array( - 'label' => __('Job Property'), + 'label' => __('Job ' . STAFFORDS_EMP_DEPARTMENT_SINGLE), 'labels' => $labels, 'hierarchical' => true, 'show_ui' => true, @@ -478,8 +478,8 @@ class staffords_employment_job $columns = array( "cb" => "", "title" => "Job Title", - "glmjobs_col_cat" => "Category", - "glmjobs_col_dep" => "Property", + "glmjobs_col_cat" => STAFFORDS_EMP_CATEGORY_SINGLE, + "glmjobs_col_dep" => STAFFORDS_EMP_DEPARTMENT_SINGLE, "glmjobs_col_date" => "Dates", ); return $columns; diff --git a/views/front/jobDetail.php b/views/front/jobDetail.php index 77e9b7b..ec46541 100644 --- a/views/front/jobDetail.php +++ b/views/front/jobDetail.php @@ -7,13 +7,13 @@

post_title; ?>

staffords_jobs_property) : ?>
- staffords_jobs_property ) > 1 ) ? 'Properties:' : 'Property:' ?> + staffords_jobs_property ) > 1 ) ? STAFFORDS_EMP_DEPARTMENT_PLURAL . ':' : STAFFORDS_EMP_DEPARTMENT_SINGLE . ':' ?> staffords_jobs_property);?>
staffords_jobs_category) : ?>
- staffords_jobs_category ) > 1 ) ? 'Categories:' : 'Category:' ?> + staffords_jobs_category ) > 1 ) ? STAFFORDS_EMP_CATEGORY_PLURAL . ':' : STAFFORDS_EMP_CATEGORY_SINGLE . ':' ?> staffords_jobs_category);?>
diff --git a/views/front/jobList.php b/views/front/jobList.php index 2ff3194..196897d 100644 --- a/views/front/jobList.php +++ b/views/front/jobList.php @@ -5,13 +5,13 @@

post_title;?>

staffords_jobs_property) : ?>
- staffords_jobs_property ) > 1 ) ? 'Properties:' : 'Property:' ?> + staffords_jobs_property ) > 1 ) ? STAFFORDS_DEPARTMENT_PLURAL . ':' : STAFFORDS_EMP_DEPARTMENT_SINGLE . ':' ?> staffords_jobs_property);?>
staffords_jobs_category) : ?>
- staffords_jobs_category ) > 1 ) ? 'Categories:' : 'Category:' ?> + staffords_jobs_category ) > 1 ) ? STAFFORDS_EMP_CATEGORY_PLURAL . ':' : STAFFORDS_EMP_CATEGORY_SINGLE . ':' ?> staffords_jobs_category);?>
diff --git a/views/front/jobSearch.php b/views/front/jobSearch.php index 39f5389..1263ca6 100644 --- a/views/front/jobSearch.php +++ b/views/front/jobSearch.php @@ -7,7 +7,7 @@
- +
-- 2.17.1