PluginProbe
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar / trunk
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar vtrunk
3.3.1 3.3.0 3.2.14 3.2.13 3.2.12 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 trunk 0.2.5.5 0.2.5.6 0.2.5.7 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 All 156 releases
← All changes | includes/Core/Locations.php +14 -5 3.2.9trunk View file →
@@ -88,9 +88,10 @@
88 88 'is_category' => is_category(),
89 89 'is_tag' => is_tag(),
90 90 );
91 91
92 - $status = apply_filters('nx_location_status', $status, $custom_ids);
92 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context.
93 + $status = apply_filters('nx_location_status', $status, $custom_ids, $taxonomy_ids);
93 94
94 95 $post_types = Helper::post_types();
95 96 $taxonomies = Helper::taxonomies();
96 97
@@ -112,15 +113,23 @@
112 113 foreach ( $taxonomies as $slug => $tax ) {
113 114 $status[ 'is_tax-' . $slug ] = is_tax( $slug );
114 115 }
115 116 }
116 - // Check for specific taxonomy ID
117 - if ( in_array( 'is_taxonomy', $locations ) && ! empty($taxonomy_ids ) ) {
117 + /**
118 + * Check for specific taxonomy ID.
119 + *
120 + * `is_taxonomy` is a Pro-only location, and Pro resolves it through the
121 + * `nx_location_status` filter above (taxonomy-aware, with a `has_term()`
122 + * fallback for singular pages). This block is only a fallback for sites
123 + * running an older Pro that does not set the key yet — without the
124 + * `isset()` guard it would run *after* the filter and clobber Pro's value.
125 + */
126 + if ( ! isset( $status['is_taxonomy'] ) && in_array( 'is_taxonomy', $locations ) && ! empty( $taxonomy_ids ) ) {
118 127 $current_term_id = get_queried_object_id();
119 128 $ids_array = explode(',',$taxonomy_ids );
120 129 foreach ($ids_array as $id) {
121 - if ( $current_term_id == $id ) {
122 - $status['is_taxonomy'] = ( $current_term_id == $id );
130 + if ( $current_term_id == trim( $id ) ) {
131 + $status['is_taxonomy'] = true;
123 132 break;
124 133 }
125 134 }
126 135 }