diff --git a/includes/functions.php b/includes/functions.php index a065de9..e0c0cfc 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -3916,4 +3916,21 @@ function adverts_default_comments_status( $post_type ) { } else { return "closed"; } +} + +function adverts_get_taxonomy_path( $term, $glue = false ) { + + $a = array(); + $path = advert_term_path( $term ); + + foreach( $path as $term_id => $term_name ) { + $link = new Adverts_Html( "a", array( "href" => get_term_link( $term_id ) ), $term_name ); + $a[] = $link->render(); + } + + if( $glue === false ) { + return $a; + } + + return implode( $glue, $a ); } \ No newline at end of file diff --git a/readme.txt b/readme.txt index 8b769de..a7e5d90 100644 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,8 @@ Plugin URI: https://wpadverts.com/ Contributors: gwin Tags: classifieds, classified, classified ads, classified script, classifieds script, wp classified, wp classifieds -Requires PHP: 5.3 -Requires at least: 4.0 +Requires PHP: 5.6 +Requires at least: 5.7 Tested up to: 5.9 Stable tag: 1.5.9 License: GNU Version 2 or Any Later Version @@ -124,8 +124,13 @@ Most likely rewrite rules were not registered properly for some reason. Go to wp == Changelog == += 1.5.10 - 2022-06-20 = + +* FEATURE: Category display on Ad details pages (each category in the path is now a link). + = 1.5.9 - 2022-05-18 = +* API: WPAdverts now requires WP 5.7 or newer and PHP 5.6 or newer * FEATURE: Authors can preview the expired or pending Ad from the [adverts_manage] page. * FIXED: When deleting Ads from the wp-admin not always all the media library items attached to the Ad were deleted. * FIXED: Warning when submitting [adverts_add] with skip_preview param diff --git a/templates/single.php b/templates/single.php index 18c06ee..c837cd2 100644 --- a/templates/single.php +++ b/templates/single.php @@ -46,7 +46,7 @@
-
+