From 18fa0d9c3b161ab5c06a9ffab4abd2f708adbcb7 Mon Sep 17 00:00:00 2001 From: Patrik Date: Fri, 14 Jun 2019 11:18:46 +0530 Subject: [PATCH 1/3] added $author_id to the filter so one can use filter properly --- template-parts/header/header-single-top.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/template-parts/header/header-single-top.php b/template-parts/header/header-single-top.php index 7e8fbd1..bb9bb2b 100644 --- a/template-parts/header/header-single-top.php +++ b/template-parts/header/header-single-top.php @@ -25,9 +25,9 @@ $author_name = get_the_author_meta( 'user_nicename', $author_id ); } - $author_name = apply_filters( 'sd_detail_author_name', $author_name ); - $author_image = apply_filters( 'sd_detail_entry_author', $author_image ); - $author_link = apply_filters( 'sd_detail_author_link', $author_link ); + $author_name = apply_filters( 'sd_detail_author_name', $author_name, $author_id ); + $author_image = apply_filters( 'sd_detail_entry_author', $author_image, $author_id ); + $author_link = apply_filters( 'sd_detail_author_link', $author_link, $author_id ); // verified owner if ( function_exists( 'geodir_claim_show_claim_link' ) && GeoDir_Claim_Post::is_claimed( $gd_post->ID ) ) { From c4ea735587e57649fe20ad4e079e2c051a853a34 Mon Sep 17 00:00:00 2001 From: stiofan Date: Thu, 8 Aug 2019 14:57:58 +0100 Subject: [PATCH 2/3] Make WooCommerce pages use featured image if set - FIXED --- change_log.txt | 1 + content-featured-area.php | 76 ++-- content-geodirectory.php | 8 +- content.php | 4 +- functions.php | 6 +- inc/geodirectory-compatibility.php | 426 -------------------- index.php | 73 ++-- template-parts/header/header-single-top.php | 1 + woocommerce.php | 33 +- 9 files changed, 85 insertions(+), 543 deletions(-) diff --git a/change_log.txt b/change_log.txt index 833c42d..c9fd753 100644 --- a/change_log.txt +++ b/change_log.txt @@ -3,6 +3,7 @@ * Marker cluster not working on archive map - FIXED * Two h1 tab SEO issue on single page - FIXED * Archive page on mobile shows multiple map controls - FIXED +* Make WooCommerce pages use featured image if set - FIXED = 2.0.0.8 = * Claim me button covers the claim popup form in mobile view - FIXED diff --git a/content-featured-area.php b/content-featured-area.php index 63b9237..7db08ec 100644 --- a/content-featured-area.php +++ b/content-featured-area.php @@ -1,70 +1,70 @@ ID,'sd_remove_head',true)) { +global $post; +if(empty($pfp_post)){ + $pfp_post = $post; +} +if ( ( ( function_exists( 'is_buddypress' ) && ! is_buddypress() ) || ! function_exists( 'is_buddypress' ) ) && ! get_post_meta( $pfp_post->ID, 'sd_remove_head', true ) ) { - - $post_id = $post->ID; + + $pid = $pfp_post->ID; $featured_image = ''; - if(function_exists('geodir_is_page') && geodir_is_page('single') && isset($post->post_type)){ - $page_id = geodir_cpt_template_page('page_details',$post->post_type); - if($page_id){ - $post_id = $page_id; + if ( function_exists( 'geodir_is_page' ) && geodir_is_page( 'single' ) && isset( $pfp_post->post_type ) ) { + $page_id = geodir_cpt_template_page( 'page_details', $pfp_post->post_type ); + if ( $page_id ) { + $pid = $page_id; } } - $featured_type = get_post_meta($post_id, '_sd_featured_area', true); - if(empty($featured_type)){ + $featured_type = get_post_meta( $pid, '_sd_featured_area', true ); + if ( empty( $featured_type ) ) { - if(function_exists('geodir_is_page') && geodir_is_page('location')){ + if ( function_exists( 'geodir_is_page' ) && geodir_is_page( 'location' ) ) { $featured_type = 'location'; - }elseif(is_front_page()){ + } elseif ( is_front_page() ) { $featured_type = 'location'; - }else{ + } else { $featured_type = 'parallax'; } } - if($featured_type=='remove'){ return;} + if ( $featured_type == 'remove' || ( function_exists('is_product_category') && is_product_category() ) ) { + return; + } ?>
-