Skip to content

Commit eccdea4

Browse files
Merge pull request #405 from ahmedkaludi/1.9.27
1.9.27
2 parents a25ec39 + 2ebca2c commit eccdea4

File tree

9 files changed

+37
-200
lines changed

9 files changed

+37
-200
lines changed

admin/control-center.php

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -494,9 +494,9 @@ function adsforwp_send_query_message(){
494494
$sent = wp_mail($to, $subject, strip_tags($message), $headers);
495495

496496
if($sent){
497-
echo wp_wp_json_encode(array('status'=>'t', 'msg'=> esc_html__('Request Submitted succeessfully..', 'ads-for-wp' )));
497+
echo wp_json_encode(array('status'=>'t', 'msg'=> esc_html__('Request Submitted succeessfully..', 'ads-for-wp' )));
498498
}else{
499-
echo wp_wp_json_encode(array('status'=>'f', 'msg'=> esc_html__('Something wrong with this request.', 'ads-for-wp' )));
499+
echo wp_json_encode(array('status'=>'f', 'msg'=> esc_html__('Something wrong with this request.', 'ads-for-wp' )));
500500
}
501501

502502
}
@@ -1149,13 +1149,15 @@ function adsforwp_browser_width_conditoinal($data){
11491149
for($j=0;$j<count($visitor_conditions_array);$j++){
11501150
$conditions = $visitor_conditions_array['group-'.$j]['visitor_conditions'];
11511151
foreach($conditions as $key => $value){
1152-
if(in_array('browser_width', $value)){
1153-
if(count($conditions) > 1){
1154-
$and_or_conditions[$post_ad_id]['and'][] = $conditions[$key];
1155-
}else{
1156-
$and_or_conditions[$post_ad_id]['or'][] = $conditions[$key];
1157-
}
1158-
}
1152+
if(is_array($value)){
1153+
if(in_array('browser_width', $value)){
1154+
if(count($conditions) > 1){
1155+
$and_or_conditions[$post_ad_id]['and'][] = $conditions[$key];
1156+
}else{
1157+
$and_or_conditions[$post_ad_id]['or'][] = $conditions[$key];
1158+
}
1159+
}
1160+
}
11591161
}
11601162
}
11611163
}

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.26
6+
Version: 1.9.27
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.26' );
23+
define( 'ADSFORWP_VERSION', '1.9.27' );
2424
}
2525

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

output/functions.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,13 +1604,18 @@ public function adsforwp_get_ad_code($post_ad_id, $type, $all_condition_status =
16041604
if(empty($ad_rel_attr)){
16051605
$ad_rel_attr ='nofollow';
16061606
}
1607+
$hideAdlabel = get_post_meta($post_ad_id, $key='adsforwp_hide_ad_label',true);
16071608
if(isset($settings['ad_sponsorship_label']) && isset($settings['ad_sponsorship_label_text']) && $settings['ad_sponsorship_label_text'] !=''){
16081609
if($settings['ad_label_postion'] == 'above'){
1609-
$sponsership_label = '<div style="font-size:10px;text-align:'.esc_attr($ad_alignment).';color:'.sanitize_hex_color($settings['ad_label_txt_color']).';">'.esc_html($settings['ad_sponsorship_label_text']).'</div>';
1610-
$sponsership_label = apply_filters( 'adsforwp_adtext_above_ad', $sponsership_label );
1610+
if($hideAdlabel == 0){
1611+
$sponsership_label = '<div style="font-size:10px;text-align:'.esc_attr($ad_alignment).';color:'.sanitize_hex_color($settings['ad_label_txt_color']).';">'.esc_html($settings['ad_sponsorship_label_text']).'</div>';
1612+
$sponsership_label = apply_filters( 'adsforwp_adtext_above_ad', $sponsership_label );
1613+
}
16111614
}else{
1615+
if($hideAdlabel == 0){
16121616
$ad_label_bottom = '<div style="font-size:10px;text-align:'.esc_attr($ad_alignment).';color:'.sanitize_hex_color($settings['ad_label_txt_color']).';">'.esc_html($settings['ad_sponsorship_label_text']).'</div>';
16131617
$ad_label_bottom = apply_filters( 'adsforwp_adtext_below_ad', $ad_label_bottom );
1618+
}
16141619
}
16151620

16161621
}
@@ -2759,7 +2764,7 @@ class="afw_ad_amp_'.esc_attr($post_ad_id).'"
27592764
$amp_ads_id_json = json_encode($this->amp_ads_id);
27602765
set_transient('adsforwp_transient_amp_ids', $amp_ads_id_json);
27612766

2762-
if (defined( 'ADSFORWP_PRO_VERSION' ) ) {
2767+
if (defined( 'ADSFORWP_PRO_VERSION' ) && isset( $settings['ad_fraud_protection'] ) && !empty($settings['ad_fraud_protection']) ) {
27632768
if(adsforwp_click_fraud_on()){
27642769
return $ad_code;
27652770
}

public/assets/css/adsforwp.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ input[name=adsforwp_group_shortcode] {
99
border: 0px;
1010
color: black;
1111
}
12+
input#adsforwp_query_email{ width: 36.2%;}
1213
.afw_input {
1314
width: 50%;
1415
}

public/assets/css/adsforwp.min.css

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

public/assets/js/adsforwp.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,8 +1559,7 @@ $(".adsforwp-feedback-notice-remindme").on("click", function(e){
15591559
}
15601560
}
15611561
if(!$('body').hasClass('adsforpremium-active')){
1562-
$('.edit-php.post-type-adsforwp .page-title-action, .edit-php.post-type-adsforwp-groups .page-title-action').after('<div id="redux-intro-text" class="adsforwppostpage"><a class="technical_support_btn_txt" href="https://www.adsforwp.com/contact/" target="_blank">Technical Support</a> <a class="premium_features_btn" href="https://www.adsforwp.com/pricing/#pricings" target="_blank">Upgrade to PREMIUM</a> </div>');
1563-
$(".edit-php.post-type-adsforwp .tablenav.top").css({"display": "inline-block"});
1562+
$('.edit-php.post-type-adsforwp .page-title-action, .edit-php.post-type-adsforwp-groups .page-title-action').after('<div id="redux-intro-text" class="adsforwppostpage"><a class="technical_support_btn_txt" href="https://www.adsforwp.com/contact/" target="_blank">Technical Support</a> <a class="premium_features_btn" href="https://www.adsforwp.com/pricing/#pricings" target="_blank">Upgrade to PREMIUM</a> </div>');
15641563
}
15651564

15661565

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.

0 commit comments

Comments
 (0)