Skip to content

Commit 3b102d0

Browse files
Merge pull request #393 from ahmedkaludi/1.9.25
1.9.25
2 parents eea48d4 + 05fc7ba commit 3b102d0

File tree

6 files changed

+26
-10
lines changed

6 files changed

+26
-10
lines changed

admin/control-center.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ function adsforwp_admin_enqueue($hook) {
11911191
$amp_story_ads_feature = array('amp_story_ad' => true);
11921192
}
11931193
}
1194-
}
1194+
}
11951195

11961196
wp_localize_script( 'ads-for-wp-admin-js', 'adtype_metafields', $ad_type_array );
11971197
wp_localize_script( 'ads-for-wp-admin-js', 'display_metafields', $display_metabox );

admin/settings.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,13 +875,24 @@ public function adsforwp_contact_us_form_callback(){
875875
if(!function_exists('adsforwp_subscribe_newsletter')){
876876
add_action('wp_ajax_adsforwp_subscribe_newsletter','adsforwp_subscribe_newsletter');
877877

878+
878879
function adsforwp_subscribe_newsletter(){
880+
if ( ! current_user_can( 'manage_options' ) ) {
881+
return;
882+
}
883+
884+
if ( ! isset( $_POST['adsforwp_security_nonce'] ) ){
885+
return;
886+
}
887+
if ( !wp_verify_nonce( $_POST['adsforwp_security_nonce'], 'adsforwp_ajax_check_nonce' ) ){
888+
return;
889+
}
879890
$api_url = 'http://magazine3.company/wp-json/api/central/email/subscribe';
880891
$api_params = array(
881892
'name' => sanitize_text_field($_POST['name']),
882-
'email'=> sanitize_text_field($_POST['email']),
893+
'email'=> sanitize_email($_POST['email']),
883894
'website'=> sanitize_text_field($_POST['website']),
884-
'type'=> 'quads'
895+
'type'=> 'adsforwp'
885896
);
886897
$response = wp_remote_post( $api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
887898
$response = wp_remote_retrieve_body( $response );

ads-for-wp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Google Adsense & Banner Ads by AdsforWP
44
Plugin URI: https://wordpress.org/plugins/ads-for-wp/
55
Description: AdsforWP is an Google Ads & Banner ads plugin built for WordPress & AMP. Easy to Use, Unlimited Incontent Ads, Adsense, Premium Features and more
6-
Version: 1.9.24
6+
Version: 1.9.25
77
Author: Magazine3
88
Author URI: http://adsforwp.com/
99
Donate link: https://www.paypal.me/Kaludi/25usd
@@ -20,7 +20,7 @@
2020
define('ADSFORWP_PLUGIN_BASENAME', plugin_basename(__FILE__));
2121
define( 'ADSFORWP_LIB_PATH', dirname( __FILE__ ) . '/admin/inc/' );
2222
if ( ! defined( 'ADSFORWP_VERSION' ) ) {
23-
define( 'ADSFORWP_VERSION', '1.9.24' );
23+
define( 'ADSFORWP_VERSION', '1.9.25' );
2424
}
2525

2626
//define( 'ADSFORWP_ENVIRONMENT', 'DEV' );

public/assets/js/adsforwp.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,10 @@ jQuery( document ).ready(function($) {
614614
var name = form.find('input[name="name"]').val();
615615
var email = form.find('input[name="email"]').val();
616616
var website = form.find('input[name="company"]').val();
617-
jQuery.post(pwaforwp_obj.ajax_url, {action:'adsforwp_subscribe_newsletter',name:name, email:email,website:website},
617+
var website = form.find('input[name="company"]').val();
618+
jQuery.post(adsforwp_localize_data.ajax_url, {action:'adsforwp_subscribe_newsletter', 'adsforwp_security_nonce': adsforwp_localize_data.adsforwp_security_nonce,name:name, email:email,website:website},
618619
function(data) {
619-
jQuery.post (pwaforwp_obj.ajax_url, {
620+
jQuery.post (adsforwp_localize_data.ajax_url, {
620621
pointer: 'adsforwp_subscribe_pointer',
621622
action: 'dismiss-wp-pointer'
622623
}, function(){

public/assets/js/adsforwp.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readme.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Contributors: magazine3
33
Tags: Ads, Google Adsense, Media Net, DFP, Custom Code, Infolinks, AMP, Adsense, SEO, Advertisement
44
Requires at least: 3.6
5-
Tested up to: 6.2
6-
Stable tag: 1.9.24
5+
Tested up to: 6.3
6+
Stable tag: 1.9.25
77
Donate link: https://www.paypal.me/Kaludi/25usd
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -65,6 +65,10 @@ Google Api Php Client library used https://github.com/googleapis/google-api-php-
6565

6666
== Changelog ==
6767

68+
= 1.9.25 (12 September 2023) =
69+
* Improvement: Tested with WordPress 6.3 #390
70+
* Fixed: Pop up news letter not working for ads for wp plugin #387
71+
6872
= 1.9.24 (13 April 2023) =
6973
* Improvement: Change email id and put email text field in contact us support tab #386
7074
* Bug Fixed: Deprecated: Creation of dynamic property in php 8.2.0 #381

0 commit comments

Comments
 (0)