Skip to content

Commit

Permalink
Merge branch 'release/1.9.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
JiveDig committed Nov 29, 2023
2 parents 8d81b65 + 634903b commit 641f17e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 1.9.4 (11/29/23)
* Fixed: CCA's showing up on different archives than set in location settings.

## 1.9.3 (11/27/23)
* Fixed: CCA's showing up on different post types than set in location settings.

Expand Down
6 changes: 3 additions & 3 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ function maicca_do_archive_cca( $args ) {
if ( is_home() ) {
// Bail if not showing on post archive.
// Using '*' is not currently an option. This is here for future use.
if ( ! $args['types'] && ( ! in_array( '*', $args['types'] ) || ! in_array( 'post', $args['types'] ) ) ) {
if ( ! $args['types'] && ! ( in_array( '*', $args['types'] ) || in_array( 'post', $args['types'] ) ) ) {
return;
}
}
Expand All @@ -272,7 +272,7 @@ function maicca_do_archive_cca( $args ) {
// Bail if shop page and not showing here.
// Using '*' is not currently an option. This is here for future use.
if ( maicca_is_shop_archive() ) {
if ( ! $args['types'] && ! ( in_array( '*', $args['types'] ) || in_array( 'product', $args['types'] ) ) ) {
if ( ! $args['types'] || ! ( in_array( '*', $args['types'] ) || in_array( 'product', $args['types'] ) ) ) {
return;
}
}
Expand All @@ -282,7 +282,7 @@ function maicca_do_archive_cca( $args ) {

$post_type = isset( $wp_query->query['post_type'] ) ? $wp_query->query['post_type'] : '';

if ( ! $args['types'] && ! ( in_array( '*', $args['types'] ) || is_post_type_archive( $post_type ) ) ) {
if ( ! $args['types'] || ! ( in_array( '*', $args['types'] ) || is_post_type_archive( $post_type ) ) ) {
return;
}
}
Expand Down
4 changes: 2 additions & 2 deletions mai-custom-content-areas.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: Mai Custom Content Areas
* Plugin URI: https://bizbudding.com/mai-theme/plugins/mai-custom-content-areas/
* Description: Display content, calls to action, ads, etc. on posts, pages, and custom post types conditionally by category, tag, taxonomy, entry title, and more.
* Version: 1.9.3
* Version: 1.9.4
*
* Author: BizBudding
* Author URI: https://bizbudding.com
Expand Down Expand Up @@ -92,7 +92,7 @@ public function __wakeup() {
private function setup_constants() {
// Plugin version.
if ( ! defined( 'MAI_CCA_VERSION' ) ) {
define( 'MAI_CCA_VERSION', '1.9.3' );
define( 'MAI_CCA_VERSION', '1.9.4' );
}

// Plugin Folder Path.
Expand Down

0 comments on commit 641f17e

Please sign in to comment.