--- a/wp-bannerize-pro/config/plugin.php
+++ b/wp-bannerize-pro/config/plugin.php
@@ -1,7 +1,7 @@
<?php
return [
- /*
+ /*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
@@ -14,11 +14,11 @@
|
*/
- 'log' => 'errorlog',
+ 'log' => 'errorlog',
- 'log_level' => 'debug',
+ 'log_level' => 'debug',
- /*
+ /*
|--------------------------------------------------------------------------
| Screen options
|--------------------------------------------------------------------------
@@ -27,9 +27,9 @@
|
*/
- 'screen_options' => [],
+ 'screen_options' => [],
- /*
+ /*
|--------------------------------------------------------------------------
| Custom Post Types
|--------------------------------------------------------------------------
@@ -38,9 +38,9 @@
|
*/
- 'custom_post_types' => ['WPBannerizeCustomPostTypesWPBannerizeCustomPostType'],
+ 'custom_post_types' => ['WPBannerizeCustomPostTypesWPBannerizeCustomPostType'],
- /*
+ /*
|--------------------------------------------------------------------------
| Custom Taxonomies
|--------------------------------------------------------------------------
@@ -49,10 +49,9 @@
|
*/
- 'custom_taxonomy_types' => ['WPBannerizeCustomTaxonomyTypesWPBannerizeCustomTaxonomyType'],
+ 'custom_taxonomy_types' => ['WPBannerizeCustomTaxonomyTypesWPBannerizeCustomTaxonomyType'],
-
- /*
+ /*
|--------------------------------------------------------------------------
| Shortcodes
|--------------------------------------------------------------------------
@@ -61,9 +60,9 @@
|
*/
- 'shortcodes' => ['WPBannerizeShortcodesWPBannerizeShortcode'],
+ 'shortcodes' => ['WPBannerizeShortcodesWPBannerizeShortcode'],
- /*
+ /*
|--------------------------------------------------------------------------
| Widgets
|--------------------------------------------------------------------------
@@ -72,10 +71,9 @@
|
*/
- 'widgets' => ['WPBannerizeWidgetsWPBannerizeWidget'],
-
+ 'widgets' => ['WPBannerizeWidgetsWPBannerizeWidget'],
- /*
+ /*
|--------------------------------------------------------------------------
| Ajax
|--------------------------------------------------------------------------
@@ -84,14 +82,14 @@
|
*/
- 'ajax' => [
- 'WPBannerizeAjaxWPBannerizeAjax',
- 'WPBannerizeAjaxWPBannerizeAnalyticsAjaxServiceProvider',
- 'WPBannerizeAjaxOptionsAjaxServiceProvider',
- 'WPBannerizeAjaxGeoAjaxServiceProvider',
- ],
+ 'ajax' => [
+ 'WPBannerizeAjaxWPBannerizeAjax',
+ 'WPBannerizeAjaxWPBannerizeAnalyticsAjaxServiceProvider',
+ 'WPBannerizeAjaxOptionsAjaxServiceProvider',
+ 'WPBannerizeAjaxGeoAjaxServiceProvider',
+ ],
- /*
+ /*
|--------------------------------------------------------------------------
| Autoloader Service Providers
|--------------------------------------------------------------------------
@@ -102,9 +100,8 @@
|
*/
- 'providers' => [
- 'WPBannerizeProvidersWPBannerizeServiceProvider',
- 'WPBannerizeProvidersWPBannerizeFrontendServiceProvider'
- ]
-
+ 'providers' => [
+ 'WPBannerizeProvidersWPBannerizeServiceProvider',
+ 'WPBannerizeProvidersWPBannerizeFrontendServiceProvider',
+ ],
];
--- a/wp-bannerize-pro/plugin/Providers/WPBannerizeFrontendServiceProvider.php
+++ b/wp-bannerize-pro/plugin/Providers/WPBannerizeFrontendServiceProvider.php
@@ -6,7 +6,6 @@
class WPBannerizeFrontendServiceProvider extends ServiceProvider
{
-
protected string $impressions_event = 'wp_bannerize_delete_impressions_exceeded_event';
protected string $clicks_event = 'wp_bannerize_delete_clicks_exceeded_event';
protected bool $clicksEnabled = false;
@@ -44,7 +43,10 @@
add_action($this->impressions_event, ['WPBannerize\Models\WPBannerizeImpressions', 'cleanUpOldRecords']);
break;
case 'retain_within_recent_months':
- add_action($this->impressions_event, ['WPBannerize\Models\WPBannerizeImpressions', 'retainWithinRecentMonths']);
+ add_action($this->impressions_event, [
+ 'WPBannerize\Models\WPBannerizeImpressions',
+ 'retainWithinRecentMonths',
+ ]);
break;
}
}
@@ -152,7 +154,7 @@
// get the post id
$post_id = get_the_ID();
// get the post meta
- return get_wp_bannerize_pro(array('id' => $post_id));
+ return get_wp_bannerize_pro(['id' => $post_id]);
}
/**
@@ -160,7 +162,7 @@
*/
public function wp_head()
{
-?>
+ ?>
<script>
window.ajaxurl =
"<?php echo esc_url(admin_url('admin-ajax.php')); ?>"
@@ -184,7 +186,16 @@
parse_str($queryString, $queryParams);
if (isset($queryParams['id']) && !empty($queryParams['id'])) {
- $post = get_post($queryParams['id']); ?>
+
+ $post = get_post($queryParams['id']);
+
+ $is_private = $post->post_status !== 'publish';
+ $is_password_protected = post_password_required($post->ID);
+
+ if ($is_private || $is_password_protected) {
+ return;
+ }
+ ?>
<!DOCTYPE html>
<html>
--- a/wp-bannerize-pro/wp-bannerize.php
+++ b/wp-bannerize-pro/wp-bannerize.php
@@ -4,7 +4,7 @@
* Plugin Name: WP Bannerize Pro
* Plugin URI: https://bannerize.vercel.app/
* Description: Bannerize is a WordPress plugin that enables quick and easy creation and management of advertising banners. It allows you to track views and clicks, providing insights into the effectiveness of your campaigns.
- * Version: 1.11.0
+ * Version: 1.11.1
* Requires at least: 6.2
* Requires PHP: 7.4
* Author: Giovambattista Fazioli