Plugin Directory

Changeset 3214970 for whp-hide-posts


Ignore:
Timestamp:
12/30/2024 05:01:10 PM (15 months ago)
Author:
martin7ba
Message:

Frontpage / Homepage flags update

Location:
whp-hide-posts
Files:
32 added
3 edited

Legend:

Unmodified
Added
Removed
  • whp-hide-posts/trunk/README.md

    r3213956 r3214970  
    66Tested up to: 6.7.1
    77Requires PHP: 7.3
    8 Stable tag: 2.0.1
     8Stable tag: 2.0.2
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
  • whp-hide-posts/trunk/inc/class-post-hide.php

    r3213957 r3214970  
    132132                    $query->set( 'meta_compare', 'NOT EXISTS' );
    133133                }
    134             } elseif ( ( is_front_page() && is_home() ) || is_front_page() ) {
     134            }
     135           
     136            if ( ( is_front_page() && is_home() ) || is_front_page() ) {
    135137                $this->exclude_by_condition( $query, 'hide_on_frontpage', '_whp_hide_on_frontpage' );
    136138            } elseif ( is_home() ) {
    137139                $this->exclude_by_condition( $query, 'hide_on_blog_page', '_whp_hide_on_blog_page' );
    138             } elseif ( is_post_type_archive( $q_post_type ) ) {
     140            }
     141
     142            if ( is_post_type_archive( $q_post_type ) ) {
    139143                $this->exclude_by_condition( $query, 'hide_on_cpt_archive', '_whp_hide_on_cpt_archive' );
    140144            } elseif ( is_category( $q_post_type ) ) {
     
    150154            } elseif ( is_feed() ) {
    151155                $this->exclude_by_condition( $query, 'hide_in_rss_feed', '_whp_hide_in_rss_feed' );
    152             } elseif ( whp_plugin()->is_woocommerce_active() ) {
    153                 if ( is_shop() ) {
    154                     $this->exclude_by_condition( $query, 'hide_on_store', '_whp_hide_on_store' );
    155                 } elseif ( is_product_category() ) {
    156                     $this->exclude_by_condition( $query, 'hide_on_product_category', '_whp_hide_on_product_category' );
    157                 }
     156            } elseif ( whp_plugin()->is_woocommerce_active() && is_shop() ) {
     157                $this->exclude_by_condition( $query, 'hide_on_store', '_whp_hide_on_store' );
     158            } elseif ( whp_plugin()->is_woocommerce_active() && is_product_category() ) {
     159                $this->exclude_by_condition( $query, 'hide_on_product_category', '_whp_hide_on_product_category' );
    158160            } elseif ( is_archive() ) {
    159161                $this->exclude_by_condition( $query, 'hide_on_archive', '_whp_hide_on_archive' );
  • whp-hide-posts/trunk/whp-hide-posts.php

    r3213955 r3214970  
    55 * Author:      MartinCV
    66 * Author URI:  https://www.martincv.com
    7  * Version:     2.0.1
     7 * Version:     2.0.2
    88 * Text Domain: whp-hide-posts
    99 *
     
    4949     * @var string
    5050     */
    51     private $version = '2.0';
     51    private $version = '2.0.2';
    5252
    5353    /**
Note: See TracChangeset for help on using the changeset viewer.