Plugin Directory

Changeset 1874791


Ignore:
Timestamp:
05/15/2018 03:56:50 PM (8 years ago)
Author:
adampickering
Message:

1.15.0 release

Location:
wp-job-manager-locations/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-job-manager-locations/trunk/includes/class-template.php

    r1587517 r1874791  
    9191        }
    9292
    93         wp_dropdown_categories( apply_filters( 'job_manager_regions_dropdown_args', array(
     93        job_manager_dropdown_categories( apply_filters( 'job_manager_regions_dropdown_args', array(
    9494            'show_option_all' => __( 'All Regions', 'wp-job-manager-locations' ),
     95            'multiple' => false,
    9596            'hierarchical' => true,
    9697            'orderby' => 'name',
     
    145146     */
    146147    public function the_job_location( $job_location, $post ) {
     148        $terms  = wp_get_object_terms(
     149            $post->ID,
     150            'job_listing_region',
     151            apply_filters( 'job_manager_locations_get_terms', array(
     152                'orderby' => 'term_order',
     153                'order'   => 'desc'
     154            ) )
     155        );
     156
     157        $_terms = array();
     158
     159        if ( empty( $terms ) ) {
     160            return;
     161        }
     162
    147163        if ( is_singular( 'job_listing' ) ) {
    148             return get_the_term_list( $post->ID, 'job_listing_region', '', ', ', '' );
    149         } else {
    150             $terms = wp_get_object_terms( $post->ID, 'job_listing_region', array( 'orderby' => 'term_order', 'order' => 'desc') );
    151 
    152             if ( empty( $terms ) ) {
    153                 return;
     164            foreach ( $terms as $term ) {
     165                $_terms[] = '<a href=" ' . esc_url( get_term_link( $term ) ) . '">' . $term->name . '</a>';
    154166            }
    155167
    156             $names = array();
     168        } else {
     169            foreach ( $terms as $term ) {
     170                $_terms[] = $term->name;
     171            }
     172        }
    157173
    158             foreach ( $terms as $term ) {
    159                 $names[] = $term->name;
    160             }
     174        $separator = apply_filters( 'job_manager_locations_get_term_list_separator', ', ' );
    161175
    162             return implode( ', ', $names );
    163         }
     176        return implode( $separator, $_terms );
    164177    }
    165178}
  • wp-job-manager-locations/trunk/languages/wp-job-manager-locations.pot

    r1653764 r1874791  
    1 # Copyright (C) 2017 Astoundify
     1# Copyright (C) 2018 Astoundify
    22# This file is distributed under the same license as the Regions for WP Job Manager package.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Regions for WP Job Manager 1.13.0\n"
     5"Project-Id-Version: Regions for WP Job Manager 1.15.0\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/wp-job-manager-locations\n"
    8 "POT-Creation-Date: 2017-04-12 14:12:52+00:00\n"
     8"POT-Creation-Date: 2018-05-14 14:40:00+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
     12"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    1414"Language-Team: LANGUAGE <LL@li.org>\n"
     
    7272msgstr ""
    7373
    74 #: includes/class-template.php:110
     74#: includes/class-template.php:111
    7575msgid "Select Region"
    7676msgstr ""
  • wp-job-manager-locations/trunk/readme.txt

    r1700422 r1874791  
    66Tags: job, job listing, job region
    77Requires at least: 4.7.0
    8 Tested up to: 4.8.0
    9 Stable Tag: 1.14.0
     8Tested up to: 4.9.6
     9Stable Tag: 1.15.0
    1010License: GPLv3
    1111License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3131
    3232== Changelog ==
     33
     34= 1.15.0: May 12, 2018 =
     35
     36* New: Use `job_manager_dropdown_categories()` function instead of `wp_dropdown_categories()`.
     37* New: Add `job_manager_locations_get_terms` and `job_manager_locations_get_term_list_separator` filters for modifying output.
    3338
    3439= 1.14.0: July 11, 2017 =
  • wp-job-manager-locations/trunk/wp-job-manager-locations.php

    r1700422 r1874791  
    66 * Author:      Astoundify
    77 * Author URI:  http://astoundify.com
    8  * Version:     1.14.0
     8 * Version:     1.15.0
    99 * Text Domain: wp-job-manager-locations
    1010 * Domain Path: /languages
Note: See TracChangeset for help on using the changeset viewer.