Changeset 3029416
- Timestamp:
- 01/31/2024 11:14:55 AM (23 months ago)
- Location:
- advanced-ads
- Files:
-
- 32 edited
- 1 copied
-
tags/1.49.0 (copied) (copied from advanced-ads/trunk)
-
tags/1.49.0/admin/assets/css/admin.css (modified) (1 diff)
-
tags/1.49.0/admin/assets/js/conditions.js (modified) (3 diffs)
-
tags/1.49.0/admin/includes/class-meta-box.php (modified) (1 diff)
-
tags/1.49.0/admin/views/conditions/condition-author.php (modified) (2 diffs)
-
tags/1.49.0/advanced-ads.php (modified) (2 diffs)
-
tags/1.49.0/classes/ad_ajax_callbacks.php (modified) (2 diffs)
-
tags/1.49.0/classes/display-conditions.php (modified) (27 diffs)
-
tags/1.49.0/classes/frontend_checks.php (modified) (3 diffs)
-
tags/1.49.0/classes/plugin.php (modified) (2 diffs)
-
tags/1.49.0/includes/admin/class-assets.php (modified) (1 diff)
-
tags/1.49.0/includes/class-assets-registry.php (modified) (3 diffs)
-
tags/1.49.0/languages/advanced-ads.pot (modified) (15 diffs)
-
tags/1.49.0/modules/adblock-finder/admin/views/setting-ga.php (modified) (2 diffs)
-
tags/1.49.0/modules/adblock-finder/public/adblocker-enabled.js (modified) (1 diff)
-
tags/1.49.0/modules/adblock-finder/public/adblocker-enabled.min.js (modified) (1 diff)
-
tags/1.49.0/readme.txt (modified) (4 diffs)
-
trunk/admin/assets/css/admin.css (modified) (1 diff)
-
trunk/admin/assets/js/conditions.js (modified) (3 diffs)
-
trunk/admin/includes/class-meta-box.php (modified) (1 diff)
-
trunk/admin/views/conditions/condition-author.php (modified) (2 diffs)
-
trunk/advanced-ads.php (modified) (2 diffs)
-
trunk/classes/ad_ajax_callbacks.php (modified) (2 diffs)
-
trunk/classes/display-conditions.php (modified) (27 diffs)
-
trunk/classes/frontend_checks.php (modified) (3 diffs)
-
trunk/classes/plugin.php (modified) (2 diffs)
-
trunk/includes/admin/class-assets.php (modified) (1 diff)
-
trunk/includes/class-assets-registry.php (modified) (3 diffs)
-
trunk/languages/advanced-ads.pot (modified) (15 diffs)
-
trunk/modules/adblock-finder/admin/views/setting-ga.php (modified) (2 diffs)
-
trunk/modules/adblock-finder/public/adblocker-enabled.js (modified) (1 diff)
-
trunk/modules/adblock-finder/public/adblocker-enabled.min.js (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-ads/tags/1.49.0/admin/assets/css/admin.css
r2995001 r3029416 264 264 #advads-display-conditions, #advads-visitor-conditions { margin-top: 0; } 265 265 #ad-targeting-box .advads-conditions-terms-show-search { height: 22px; line-height: 22px; font-weight: bold; font-size: 1.5em; } 266 .advads-conditions-terms-search { display: none; }266 .advads-conditions-terms-search, .advads-conditions-authors-search { display: none; } 267 267 #advads-ad-usage .advads-usage input { width: 300px; } 268 268 .post-type-advanced_ads #ad-parameters-box .advads-ad-parameters-spinner { display: block; float: none; } -
advanced-ads/tags/1.49.0/admin/assets/js/conditions.js
r2701373 r3029416 3 3 */ 4 4 5 jQuery( document ).ready( 6 function ( $ ) { 5 jQuery( document ).ready(function ( $ ) { 7 6 /** 8 7 * Pressing the button to add a new condition to the list of conditions … … 111 110 } 112 111 112 // remove author from list by clicking on it. 113 $(document).on( 114 'click', 115 '.advads-conditions-authors-buttons .button', 116 function () { 117 $(this).remove(); 118 } 119 ); 120 // display input field to search for author. 121 $(document).on( 122 'click', 123 '.advads-conditions-authors-show-search', 124 function (e) { 125 e.preventDefault(); 126 // display input field. 127 $(this) 128 .siblings('.advads-conditions-authors-search') 129 .show() 130 .focus(); 131 // register autocomplete. 132 advadsRegisterAuthorAutocomplete( 133 $(this).siblings('.advads-conditions-authors-search') 134 ); 135 $(this).next('br').show(); 136 $(this).hide(); 137 } 138 ); 139 140 // author search box autocomplete. 141 function advadsRegisterAuthorAutocomplete(self) { 142 self.autocomplete({ 143 classes: { 144 'ui-autocomplete': 'advads-ui-autocomplete', 145 }, 146 source(request, callback) { 147 advadsAuthorSearch(self, callback); 148 }, 149 minLength: 1, 150 select(event, ui) { 151 // append new line with input fields. 152 $( 153 '<label class="button advads-button advads-ui-state-active"><span class="advads-button-text">' + 154 ui.item.label + 155 '<input type="hidden" name="' + 156 self.data('inputName') + 157 '" value="' + 158 ui.item.value + 159 '"></span></label>' 160 ).appendTo(self.siblings('.advads-conditions-authors-buttons')); 161 }, 162 close() { 163 self.val(''); 164 }, 165 }); 166 } 167 113 168 // display input field to search for post, page, etc. 114 169 $( document ).on( 'click', '.advads-conditions-postids-show-search', function ( e ) { … … 244 299 245 300 /** 301 * Callback for author search autocomplete 302 * 303 * @param {string} search author 304 * @param {HTMLInputElement} field html input field 305 * @param {Function} callback Callback function 306 * @return {Object} JSON object with labels and values 307 */ 308 309 function advadsAuthorSearch(field, callback) { 310 const query = { 311 action: 'advads-authors-search', 312 nonce: advadsglobal.ajax_nonce, 313 }; 314 315 query.search = field.val(); 316 317 var querying = true; 318 319 const results = []; 320 // eslint-disable-next-line no-undef 321 jQuery.post( 322 // eslint-disable-next-line no-undef 323 ajaxurl, 324 query, 325 function (r) { 326 querying = false; 327 if (r) { 328 r.map(function (element, index) { 329 results[index] = { 330 value: element.data.ID, 331 label: element.data.display_name, 332 }; 333 }); 334 } 335 callback(results); 336 }, 337 'json' 338 ); 339 } 340 341 /** 246 342 * Callback for post search autocomplete 247 343 * -
advanced-ads/tags/1.49.0/admin/includes/class-meta-box.php
r2986093 r3029416 234 234 $view = 'conditions/ad-targeting-metabox.php'; 235 235 $hndlelinks = '<a href="#" class="advads-video-link">' . __( 'Video', 'advanced-ads' ) . '</a>'; 236 $hndlelinks .= '<a href="https://wpadvancedads.com/manual/display-conditions/?utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-display" target="_blank" class="advads-manual-link">' . __( 'Display Conditions', 'advanced-ads' ) . '</a>';237 $hndlelinks .= '<a href="https://wpadvancedads.com/manual/visitor-conditions/?utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank" class="advads-manual-link">' . __( 'Visitor Conditions', 'advanced-ads' ) . '</a>';236 $hndlelinks .= '<a href="https://wpadvancedads.com/manual/display-conditions/?utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-display" target="_blank" class="advads-manual-link">' . __( 'Display Conditions', 'advanced-ads' ) . '</a>'; 237 $hndlelinks .= '<a href="https://wpadvancedads.com/manual/visitor-conditions/?utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank" class="advads-manual-link">' . __( 'Visitor Conditions', 'advanced-ads' ) . '</a>'; 238 238 $videomarkup = '<iframe width="420" height="315" src="https://www.youtube-nocookie.com/embed/VjfrRl5Qn4I?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>'; 239 $display_conditions = $ad->options( 'conditions', [] ); 240 $visitor_conditions = $ad->options( 'visitors', [] ); 239 $ad_options = $ad->options(); 240 $display_conditions = is_array( $ad_options['conditions'] ) ? $ad_options['conditions'] : []; // default value for older version is `""` (empty string) 241 $visitor_conditions = is_array( $ad_options['visitors'] ) ? $ad_options['visitors'] : []; // default value for older version is `""` (empty string) 241 242 $display_conditions_available = ( empty( $display_conditions ) ); 242 243 $visitor_conditions_available = ( empty( $visitor_conditions ) ); -
advanced-ads/tags/1.49.0/admin/views/conditions/condition-author.php
r2986093 r3029416 3 3 * Templace for the Author display condition 4 4 * 5 * @package Advanced_Ads_Admin 5 6 * @var string $name form name attribute. 6 7 * @var int $max_authors number of maximum author entries to show. 7 8 */ 9 8 10 ?> 9 11 <div class="advads-conditions-single advads-buttonset"> 10 12 <?php 11 foreach ( $authors as $_author ) { 12 // don’t use strict comparision because $values contains strings. 13 if ( in_array( $_author->ID, $values ) ) { 14 $_val = 1; 15 } else { 16 $_val = 0; 13 if ( count( $authors ) >= $max_authors ) : 14 // show active authors. 15 ?> 16 <div class="advads-conditions-authors-buttons dynamic-search"> 17 <?php 18 foreach ( $authors as $_author ) : 19 // don’t use strict comparision because $values contains strings. 20 if ( in_array( $_author->ID, $values ) ) : 21 $author_name = $_author->display_name; 22 $field_id = 'advads-conditions-' . absint( $_author->ID ) . $rand; 23 ?> 24 <label class="button advads-button advads-ui-state-active"> 25 <span class="advads-button-text"> 26 <?php echo esc_attr( $author_name ); ?> 27 <input type="hidden" 28 name="<?php echo esc_attr( $name ); ?>[value][]" 29 value="<?php echo absint( $_author->ID ); ?>"> 30 </span> 31 </label> 32 <?php 33 endif; 34 endforeach; 35 ?> 36 </div> 37 <span class="advads-conditions-authors-show-search button" title="<?php _ex( 'add more authors', 'display the authors search field on ad edit page', 'advanced-ads' ); ?>"> 38 + 39 </span> 40 <br/> 41 <input type="text" class="advads-conditions-authors-search" 42 data-input-name="<?php echo esc_attr( $name ); ?>[value][]" 43 placeholder="<?php _e( 'author name or id', 'advanced-ads' ); ?>"/> 44 <?php 45 else : 46 $max_counter = $max_authors; 47 foreach ( $authors as $_author ) { 48 if ( $max_counter <= 0 ) { 49 return false; 50 } 51 --$max_counter; 52 // don’t use strict comparision because $values contains strings. 53 if ( in_array( $_author->ID, $values ) ) { 54 $_val = 1; 55 } else { 56 $_val = 0; 57 } 58 $author_name = $_author->display_name; 59 $field_id = 'advads-conditions-' . absint( $_author->ID ) . $rand; 60 ?> 61 <label class="button advads-button" 62 for="<?php echo esc_attr( $field_id ); ?>"> 63 <?php echo esc_attr( $author_name ); ?> 64 </label><input type="checkbox" 65 id="<?php echo esc_attr( $field_id ); ?>" 66 name="<?php echo esc_attr( $name ); ?>[value][]" <?php checked( $_val, 1 ); ?> 67 value="<?php echo absint( $_author->ID ); ?>"> 68 <?php 17 69 } 18 $author_name = $_author->display_name; 19 $field_id = 'advads-conditions-' . absint( $_author->ID ) . $rand; 20 ?> 21 <label class="button advads-button" 22 for="<?php echo esc_attr( $field_id ); ?>"> 23 <?php echo esc_attr( $author_name ); ?> 24 </label><input type="checkbox" 25 id="<?php echo esc_attr( $field_id ); ?>" 26 name="<?php echo esc_attr( $name ); ?>[value][]" <?php checked( $_val, 1 ); ?> 27 value="<?php echo absint( $_author->ID ); ?>"> 28 <?php 29 } 30 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; 70 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; 71 endif; 31 72 ?> 32 73 </div> 33 74 <?php 75 /* 34 76 if ( count( $authors ) >= $max_authors ) : 35 77 ?> … … 55 97 <?php 56 98 endif; 99 */ -
advanced-ads/tags/1.49.0/advanced-ads.php
r3006148 r3029416 13 13 * Plugin URI: https://wpadvancedads.com 14 14 * Description: Manage and optimize your ads in WordPress 15 * Version: 1.4 8.115 * Version: 1.49.0 16 16 * Author: Advanced Ads GmbH 17 17 * Author URI: https://wpadvancedads.com … … 34 34 35 35 define( 'ADVADS_FILE', __FILE__ ); 36 define( 'ADVADS_VERSION', '1.4 8.1' );36 define( 'ADVADS_VERSION', '1.49.0' ); 37 37 38 38 // Load the autoloader. -
advanced-ads/tags/1.49.0/classes/ad_ajax_callbacks.php
r2983598 r3029416 31 31 add_action( 'wp_ajax_load_display_conditions_metabox', [ $this, 'load_display_condition' ] ); 32 32 add_action( 'wp_ajax_advads-terms-search', [ $this, 'search_terms' ] ); 33 add_action( 'wp_ajax_advads-authors-search', [ $this, 'search_authors' ] ); 33 34 add_action( 'wp_ajax_advads-close-notice', [ $this, 'close_notice' ] ); 34 35 add_action( 'wp_ajax_advads-hide-notice', [ $this, 'hide_notice' ] ); … … 204 205 205 206 /** 207 * Search authors 208 * 209 * @since 1.47.5 210 */ 211 public function search_authors() { 212 check_ajax_referer( 'advanced-ads-admin-ajax-nonce', 'nonce' ); 213 214 if ( ! WordPress::user_can( 'advanced_ads_edit_ads' ) ) { 215 return; 216 } 217 218 $args = []; 219 $args['search_columns'] = [ 'ID', 'user_login', 'user_nicename', 'display_name' ]; 220 221 if ( version_compare( get_bloginfo( 'version' ), '5.9' ) > -1 ) { 222 $args['capability'] = [ 'edit_posts' ]; 223 } else { 224 $args['who'] = 'authors'; 225 } 226 227 if ( ! isset( $_POST['search'] ) || '' === $_POST['search'] ) { 228 die(); 229 } 230 231 $args['search'] = '*' . sanitize_text_field( wp_unslash( $_POST['search'] ) ) . '*'; 232 233 $results = get_users( $args ); 234 235 echo wp_json_encode( $results ); 236 die(); 237 } 238 239 /** 206 240 * Close a notice for good 207 241 * -
advanced-ads/tags/1.49.0/classes/display-conditions.php
r2983598 r3029416 1 1 <?php 2 2 // phpcs:ignoreFile 3 3 /** 4 4 * Display Conditions under which to (not) show an ad … … 8 8 */ 9 9 class Advanced_Ads_Display_Conditions { 10 11 10 /** 12 11 * Advanced_Ads_Display_Conditions … … 250 249 $conditions = self::get_instance()->get_conditions(); 251 250 252 253 251 if ( isset( $options['in'] ) ) { 254 252 if ( 'global' === $options['in'] ) { 255 $conditions = array_filter( $conditions, function( $condition ) { 256 return ! isset( $condition['options']['global'] ) || $condition['options']['global']; 257 } ); 253 $conditions = array_filter( 254 $conditions, 255 function ( $condition ) { 256 return ! isset( $condition['options']['global'] ) || $condition['options']['global']; 257 } 258 ); 258 259 } elseif ( is_array( $options['in'] ) ) { 259 260 // Include already set condition types. … … 315 316 */ 316 317 public static function render_connector_option( $index, $value, $form_name ) { 317 318 318 $label = ( 'or' === $value ) ? __( 'or', 'advanced-ads' ) : __( 'and', 'advanced-ads' ); 319 319 … … 323 323 $rand = md5( $form_name ); 324 324 325 return '<input style="display:none;" type="checkbox" name="' . $name . '[connector]' . '" value="or" 326 id="advads-conditions-' . $index . '-connector-' . $rand . '"' . checked( 'or', $value, false ) . '> 327 <label for="advads-conditions-' . $index . '-connector-' . $rand . '">' . $label . '</label>'; 325 return sprintf( 326 "<input style='display:none' type='checkbox' name='%s[connector]' value='or' id='%s' %s><label for='%s'>%s</label>", 327 esc_attr( $name ), 328 esc_attr( "advads-conditions-$index-connector-$rand" ), 329 checked( 'or', $value, false ), 330 esc_attr( "advads-conditions-$index-connector-$rand" ), 331 esc_html( $label ) 332 ); 328 333 } 329 334 … … 335 340 */ 336 341 public static function render_type_field( $type, $name ) { 337 338 342 ?> 339 343 <input type="hidden" name="<?php echo esc_attr( $name ); ?>[type]" value="<?php echo esc_attr( $type ); ?>"/> 340 344 <?php 341 342 345 } 343 346 … … 396 399 ); 397 400 ?> 398 <div class="advads-conditions-single advads-buttonset"><?php 401 <div class="advads-conditions-single advads-buttonset"> 402 <?php 399 403 $type_label_counts = array_count_values( wp_list_pluck( $post_types, 'label' ) ); 400 404 … … 412 416 } 413 417 $field_id = "advads-conditions-$_type_id-$rand"; 414 ?><label class="button" for="<?php echo $field_id; 415 ?>"><?php echo $_label ?></label><input type="checkbox" 416 id="<?php echo $field_id; ?>" 417 name="<?php echo $name; ?>[value][]" <?php checked( $_val, 1 ); ?> 418 value="<?php echo $_type_id; ?>"><?php 418 printf( 419 "<label class='button' for='%s'>%s</label><input type='checkbox' id='%s' name='%s' %s value='%s'>", 420 esc_attr( $field_id ), 421 esc_html( $_label ), 422 esc_attr( $field_id ), 423 esc_attr( "{$name}[value][]" ), 424 checked( $_val, 1, false ), 425 esc_attr( $_type_id ) 426 ); 419 427 } 420 428 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; 421 429 ?> 422 </div><?php 430 </div> 431 <?php 423 432 } 424 433 … … 459 468 $args = [ 460 469 'orderby' => 'nicename', 461 'number' => $max_authors,462 470 ]; 463 471 if ( version_compare( get_bloginfo( 'version' ), '5.9' ) > -1 ) { … … 567 575 568 576 $field_id = "advads-conditions-$_taxonomy_id-$rand"; 569 ?><label class="button" for="<?php echo $field_id 570 ?>"><?php echo $_label ?></label><input type="checkbox" 571 id="<?php echo $field_id; ?>" 572 name="<?php echo $name; ?>[value][]" <?php checked( $_val, 1 ); ?> 573 value="<?php echo $_taxonomy_id; ?>"><?php 577 printf( 578 "<label class='button' for='%s'>%s</label><input type ='checkbox' id='%s' name='%s' %s value='%s'>", 579 esc_attr( $field_id ), 580 esc_html( $_label ), 581 esc_attr( $field_id ), 582 esc_attr( "{$name}[value][]" ), 583 checked( $_val, 1, false ), 584 esc_attr( $_taxonomy_id ) 585 ); 574 586 endforeach; 575 587 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; … … 586 598 * @param string $inputname name of the input field. 587 599 * @param int $max_terms maximum number of terms to show. 588 * @param int $index index of the conditions group.600 * @param int $index index of the conditions group. 589 601 * 590 602 * @return array|int|WP_Error 591 603 */ 592 604 public static function display_term_list( $taxonomy, $checked = [], $inputname = '', $max_terms = 50, $index = 0 ) { 593 594 605 $terms = get_terms( 595 606 $taxonomy->name, … … 622 633 } else { 623 634 ?> 624 <div class="advads-conditions-terms-buttons dynamic-search"></div><?php 635 <div class="advads-conditions-terms-buttons dynamic-search"></div> 636 <?php 625 637 } 626 ?><span class="advads-conditions-terms-show-search button" title="<?php 627 _ex( 'add more terms', 'display the terms search field on ad edit page', 'advanced-ads' ); 628 ?>">+</span><br/><input type="text" class="advads-conditions-terms-search" 629 data-tag-name="<?php echo $taxonomy->name; 630 ?>" data-input-name="<?php echo $inputname; ?>" 631 placeholder="<?php _e( 'term name or id', 'advanced-ads' ); ?>"/><?php 638 639 printf( 640 "<span class='advads-conditions-terms-show-search button' title='%s'>+</span><br>", 641 esc_attr_x( 'add more terms', 'display the terms search field on ad edit page', 'advanced-ads' ) 642 ); 643 printf( 644 "<input type='text' class='advads-conditions-terms-search' data-tag-name='%s' data-input-name='%s' placeholder='%s'>", 645 esc_attr( $taxonomy->name ), 646 esc_attr( $inputname ), 647 esc_attr__( 'term name or id', 'advanced-ads' ) 648 ); 632 649 else : 633 foreach ( $terms as $_term ) :650 foreach ( $terms as $_term ) { 634 651 $field_id = "advads-conditions-$_term->term_id-$rand"; 635 ?><input type="checkbox" id="<?php echo $field_id; ?>" name="<?php echo $inputname; ?>" 636 value="<?php echo $_term->term_id; ?>" <?php checked( in_array( $_term->term_id, $checked ), true ); 637 ?>><label for="<?php echo $field_id; ?>"><?php echo $_term->name; ?></label><?php 638 endforeach; 652 printf( 653 "<input type='checkbox' id='%s' name='%s' value='%s' %s><label for='%s'>%s</label>", 654 esc_attr( $field_id ), 655 esc_attr( $inputname ), 656 esc_attr( $_term->term_id ), 657 checked( in_array( $_term->term_id, $checked ), true, false ), 658 esc_attr( $field_id ), 659 esc_html( $_term->name ) 660 ); 661 } 639 662 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; 640 663 endif; … … 683 706 684 707 ]; 685 686 708 $the_query = new WP_Query( $args ); 687 709 while ( $the_query->have_posts() ) { … … 694 716 } 695 717 } 696 ?><span class="advads-conditions-postids-show-search button" <?php if ( ! count( $values ) ) { 697 echo 'style="display:none;"'; } ?>>+</span><p class="advads-conditions-postids-search-line"> 698 <input type="text" class="advads-display-conditions-individual-post" <?php if ( count( $values ) ) { 699 echo 'style="display:none;"'; 700 } ?> 701 placeholder="<?php _e( 'title or id', 'advanced-ads' ); ?>" 702 data-field-name="<?php echo $name; ?>"/><?php 703 wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false ); 704 ?></p></div><?php 718 printf( 719 "<span class='advads-conditions-postids-show-search button' style='%s'>+</span>", 720 empty( $values ) ? 'display:none;' : '' 721 ); 722 723 printf( 724 "<p class='advads-conditions-postids-search-line'><input type='text' class='advads-display-conditions-individual-post' style='%s' placeholder='%s' data-field-name='%s' />%s</p></div>", 725 ! empty( $values ) ? 'display:none;' : '', 726 esc_attr__( 'title or id', 'advanced-ads' ), 727 esc_attr( $name ), 728 wp_kses( 729 wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false, false ), 730 [ 731 'input' => [ 732 'type' => true, 733 'id' => true, 734 'name' => true, 735 'class' => true, 736 'value' => true, 737 ], 738 ] 739 ) 740 ); 705 741 // phpcs:enable 706 742 } … … 730 766 731 767 $rand = md5( $form_name ); 732 foreach ( $conditions as $_key => $_condition ) : 733 768 foreach ( $conditions as $_key => $_condition ) { 734 769 // activate by default. 735 $value = ( [] === $values || in_array( $_key, $values, true ) ) ? 1 : 0; 736 770 $value = ( [] === $values || in_array( $_key, $values, true ) ) ? 1 : 0; 737 771 $field_id = "advads-conditions-$_key-$rand"; 738 ?><input type="checkbox" id="<?php echo $field_id; ?>" name="<?php echo $name; ?>[value][]" 739 value="<?php echo $_key; ?>" <?php checked( 1, $value ); ?>><label 740 for="<?php echo $field_id; ?>"><?php echo $_condition['label']; ?></label><?php 741 endforeach; 772 printf( 773 "<input type='checkbox' id='%s' name='%s' %s value='%s'>", 774 esc_attr( $field_id ), 775 esc_attr( "{$name}[value][]" ), 776 checked( 1, $value, false ), 777 esc_attr( $_key ) 778 ); 779 printf( 780 "<label for='%s'>%s</label>", 781 esc_attr( $field_id ), 782 esc_html( $_condition['label'] ) 783 ); 784 785 } 742 786 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; 743 ?></div><?php 744 return; 787 echo '</div>'; 745 788 } 746 789 … … 751 794 */ 752 795 public static function general_conditions() { 753 return $conditions = apply_filters( 'advanced-ads-display-conditions-general', 796 return apply_filters( 797 'advanced-ads-display-conditions-general', 754 798 [ 755 799 'is_front_page' => [ … … 793 837 'type' => 'radio', 794 838 ], 795 'is_rest_api' => [839 'is_rest_api' => [ 796 840 'label' => __( 'REST API', 'advanced-ads' ), 797 841 'description' => __( 'allow ads in REST API', 'advanced-ads' ), … … 810 854 */ 811 855 public static function metabox_content_age( $options, $index = 0, $form_name = '' ) { 812 if ( ! isset ( $options['type'] ) || '' === $options['type'] ) {856 if ( ! isset( $options['type'] ) || '' === $options['type'] ) { 813 857 return; 814 858 } … … 829 873 830 874 ?> 831 <select name="<?php echo $name; ?>[operator]">832 <option value="older_than" <?php selected( 'older_than', $operator ); ?>><?php _e( 'older than', 'advanced-ads' ); ?></option>833 <option value="younger_than" <?php selected( 'younger_than', $operator ); ?>><?php _e( 'younger than', 'advanced-ads' ); ?></option>875 <select name="<?php echo esc_attr( $name ); ?>[operator]"> 876 <option value="older_than" <?php selected( 'older_than', $operator ); ?>><?php esc_html_e( 'older than', 'advanced-ads' ); ?></option> 877 <option value="younger_than" <?php selected( 'younger_than', $operator ); ?>><?php esc_html_e( 'younger than', 'advanced-ads' ); ?></option> 834 878 </select> 835 879 … … 1101 1145 1102 1146 // check general conditions added by other add-ons. 1103 if ( null !== ( $result = apply_filters( 'advanced-ads-display-conditions-check-general', null, $options['value'] ) ) ) { 1147 $result = apply_filters( 'advanced-ads-display-conditions-check-general', null, $options['value'] ); 1148 if ( null !== ( $result ) ) { 1104 1149 return $result; 1105 1150 } … … 1124 1169 1125 1170 // check home page. 1126 if ( ( ( isset( $query['is_front_page'] ) && $query['is_front_page'] )1127 || ( isset( $query['is_home'] ) && $query['is_home'] ) )1128 && in_array( 'is_front_page', $options['value'], true )1171 if ( 1172 ( ( isset( $query['is_front_page'] ) && $query['is_front_page'] ) || ( isset( $query['is_home'] ) && $query['is_home'] ) ) 1173 && in_array( 'is_front_page', $options['value'], true ) 1129 1174 ) { 1130 1175 return true; 1131 } elseif ( isset( $query['is_front_page'] ) && $query['is_front_page'] && ( 1132 ! in_array( 'is_front_page', $options['value'], true ) 1133 ) ) { 1176 } elseif ( isset( $query['is_front_page'] ) && $query['is_front_page'] && ( ! in_array( 'is_front_page', $options['value'], true ) ) ) { 1134 1177 return false; 1135 1178 } … … 1138 1181 foreach ( self::$query_var_keys as $_type ) { 1139 1182 if ( 'is_main_query' !== $_type && isset( $query[ $_type ] ) && $query[ $_type ] && 1140 in_array( $_type, $options['value'], true ) ) {1183 in_array( $_type, $options['value'], true ) ) { 1141 1184 return true; 1142 1185 } … … 1155 1198 */ 1156 1199 public static function check_content_age( $options, Advanced_Ads_Ad $ad ) { 1157 global $post; 1200 $post = get_post(); 1201 1202 if ( ! $post 1203 && wp_doing_ajax() 1204 && isset( $_REQUEST['action'], $_REQUEST['theId'], $_REQUEST['isSingular'] ) 1205 && sanitize_key( $_REQUEST['action'] ) === 'advads_ad_select' 1206 && ( $_REQUEST['isSingular'] ) 1207 ) { 1208 $post = get_post( (int) $_REQUEST['theId'] ); 1209 } 1158 1210 1159 1211 $operator = ( isset( $options['operator'] ) && 'younger_than' === $options['operator'] ) ? 'younger_than' : 'older_than'; … … 1250 1302 } 1251 1303 // get conditions with rebased index keys. 1252 $conditions = array_values( $options['conditions'] ); 1253 $query = $options['wp_the_query']; 1254 $post = isset( $options['post'] ) ? $options['post'] : null; 1255 1256 1304 $conditions = array_values( $options['conditions'] ); 1305 $query = $options['wp_the_query']; 1306 $post = isset( $options['post'] ) ? $options['post'] : null; 1257 1307 $last_result = false; 1258 1308 $length = count( $conditions ); 1259 1309 1260 for ( $i = 0; $i < $length; ++ $i ) {1310 for ( $i = 0; $i < $length; ++$i ) { 1261 1311 $_condition = current( $conditions ); 1262 1312 $next = next( $conditions ); … … 1273 1323 $next_tax = ( isset( $next['type'] ) && isset( $this->conditions[ $next['type'] ]['taxonomy'] ) ) ? $this->conditions[ $next['type'] ]['taxonomy'] : false; 1274 1324 if ( $tax && $next_tax && $next_key 1275 && $next_tax === $tax 1276 && ( ! isset( $next['connector'] ) || 'or' !== $next['connector'] ) 1277 && 'is' === $_condition['operator'] && 'is' === $next['operator'] 1278 && $_condition['type'] !== $next['type'] ) { 1279 $next['connector'] = 'or'; 1280 $conditions[ $next_key ]['connector'] = 'or'; 1325 && $next_tax === $tax 1326 && ( ! isset( $next['connector'] ) || 'or' !== $next['connector'] ) 1327 && 'is' === $_condition['operator'] && 'is' === $next['operator'] 1328 && $_condition['type'] !== $next['type'] 1329 ) { 1330 $next['connector'] = 'or'; 1331 $conditions[ $next_key ]['connector'] = 'or'; 1281 1332 } 1282 1333 … … 1418 1469 public static function modify_post_search_sql( $sql ) { 1419 1470 global $wpdb; 1420 1421 // $sql = preg_replace_callback( "/{$wpdb->posts}.post_(content|excerpt)( NOT)? LIKE '%(.*?)%'/", array( 'Advanced_Ads_Display_Conditions', 'modify_post_search_sql_callback' ), $sql );1422 1423 1471 // removes the search in content and excerpt columns. 1424 1472 $sql = preg_replace( "/OR \({$wpdb->posts}.post_(content|excerpt)( NOT)? LIKE '(.*?)'\)/", '', $sql ); … … 1447 1495 } 1448 1496 } 1449 1450 1497 } -
advanced-ads/tags/1.49.0/classes/frontend_checks.php
r3005553 r3029416 1 1 <?php 2 2 // phpcs:ignoreFile 3 4 use AdvancedAds\Assets_Registry; 3 5 use AdvancedAds\Utilities\WordPress; 4 6 … … 48 50 if ( Advanced_Ads_Ad_Health_Notices::notices_enabled() ) { 49 51 add_action( 'body_class', [ $this, 'body_class' ] ); 52 } 53 54 if( $this->has_adblocker_placements() ) { 55 if ( ! Assets_Registry::script_is('find-adblocker', 'enqueued') ) { 56 Assets_Registry::enqueue_script('find-adblocker'); 57 } 50 58 } 51 59 } … … 1117 1125 return false; 1118 1126 } 1127 1128 /** 1129 * Check if atleast one placement uses `adblocker item`. 1130 * 1131 * @return bool True/False. 1132 */ 1133 private function has_adblocker_placements() { 1134 $placements = Advanced_Ads::get_instance()->get_model()->get_ad_placements_array(); 1135 foreach ($placements as $placement) { 1136 if (!empty($placement['options']['item_adblocker'])) { 1137 return true; 1138 } 1139 } 1140 1141 return false; 1142 } 1119 1143 } -
advanced-ads/tags/1.49.0/classes/plugin.php
r2986093 r3029416 215 215 } 216 216 217 $frontend_prefix = $this->get_frontend_prefix(); 218 217 219 ob_start(); 218 220 ?> 219 <script id="<?php echo esc_attr( $ this->get_frontend_prefix()); ?>ready">221 <script id="<?php echo esc_attr( $frontend_prefix ); ?>ready"> 220 222 <?php 221 223 readfile( sprintf( … … 227 229 </script> 228 230 <?php 231 232 /** 233 * Print inline script in the page header form add-ons. 234 * 235 * @param string $frontend_prefix the prefix used for Advanced Ads related HTML ID-s and classes. 236 */ 237 do_action( 'advanced_ads_inline_header_scripts', $frontend_prefix ); 229 238 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaping would break the HTML 230 239 echo Advanced_Ads_Utils::get_inline_asset( ob_get_clean() ); -
advanced-ads/tags/1.49.0/includes/admin/class-assets.php
r3005553 r3029416 64 64 // TODO: add conditional loading. 65 65 Assets_Registry::enqueue_script( 'admin-global' ); 66 Assets_Registry::enqueue_script( ' admin-find-adblocker' );66 Assets_Registry::enqueue_script( 'find-adblocker' ); 67 67 68 68 $params = [ -
advanced-ads/tags/1.49.0/includes/class-assets-registry.php
r2983598 r3029416 53 53 54 54 /** 55 * Determines whether a script has been added to the queue. 56 * 57 * @param string $handle Name of the script. 58 * @param string $status Optional. Status of the script to check. Default 'enqueued'. 59 * Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'. 60 * 61 * @return bool 62 */ 63 public static function script_is( $handle, $status = 'enqueued' ): bool { 64 return wp_script_is( self::prefix_it( $handle ), $status ); 65 } 66 67 /** 55 68 * Hook into WordPress. 56 69 * … … 59 72 public function hooks(): void { 60 73 add_action( 'admin_enqueue_scripts', [ $this, 'register_assets' ], 0 ); 74 add_action( 'wp_enqueue_scripts', [ $this, 'register_assets' ], 0 ); 61 75 } 62 76 … … 89 103 public function register_scripts(): void { 90 104 $this->register_script( 'admin-global', 'admin/assets/js/admin-global.js', [ 'jquery' ], false, true ); 91 $this->register_script( ' admin-find-adblocker', 'admin/assets/js/advertisement.js' );105 $this->register_script( 'find-adblocker', 'admin/assets/js/advertisement.js' ); 92 106 $this->register_script( 'ui', 'admin/assets/js/ui.js', [ 'jquery' ] ); 93 107 $this->register_script( 'conditions', 'admin/assets/js/conditions.js', [ 'jquery', self::prefix_it( 'ui' ) ] ); -
advanced-ads/tags/1.49.0/languages/advanced-ads.pot
r3006148 r3029416 1 # Copyright (C) 202 3Advanced Ads GmbH1 # Copyright (C) 2024 Advanced Ads GmbH 2 2 # This file is distributed under the GPL-2.0+. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Advanced Ads 1.48. 0\n"5 "Project-Id-Version: Advanced Ads 1.48.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads/\n" 7 7 "Last-Translator: Thomas Maier <[email protected]>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-12-06T11:22:58+00:00\n"12 "POT-Creation-Date: 2024-01-31T11:13:51+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.6.0\n" … … 85 85 #. translators: %s is empty here, but the string will be followed by a name of an ad unit. 86 86 #: admin/includes/ad-health-notices.php:112 87 #: classes/frontend_checks.php:2 7287 #: classes/frontend_checks.php:280 88 88 msgid "Visible ads should not use the Header placement: %s" 89 89 msgstr "" … … 91 91 #: admin/includes/ad-health-notices.php:123 92 92 #: classes/ad-debug.php:272 93 #: classes/frontend_checks.php:2 5993 #: classes/frontend_checks.php:267 94 94 msgid "Your website is using HTTPS, but the ad code contains HTTP and might not work." 95 95 msgstr "" … … 293 293 294 294 #: admin/includes/class-ad-type.php:953 295 #: classes/frontend_checks.php:5 39295 #: classes/frontend_checks.php:547 296 296 msgid "Get help" 297 297 msgstr "" … … 482 482 #: admin/views/settings/general/disable-notices.php:14 483 483 #: classes/ad_type_plain.php:255 484 #: classes/display-conditions.php:8 43484 #: classes/display-conditions.php:887 485 485 #: modules/ads-txt/admin/views/setting-create.php:12 486 486 #: modules/privacy/admin/views/setting-general.php:34 … … 511 511 msgstr "" 512 512 513 #: admin/includes/class-meta-box.php:26 7513 #: admin/includes/class-meta-box.php:268 514 514 #: admin/includes/class-overview-widgets.php:64 515 515 msgid "Disable" 516 516 msgstr "" 517 517 518 #: admin/includes/class-meta-box.php:4 29518 #: admin/includes/class-meta-box.php:430 519 519 msgid "Ad Settings" 520 520 msgstr "" 521 521 522 #: admin/includes/class-meta-box.php:52 8522 #: admin/includes/class-meta-box.php:529 523 523 #: includes/admin/pages/class-dashboard.php:33 524 524 #: includes/admin/pages/class-dashboard.php:44 … … 528 528 529 529 #. translators: %1$d is the number of ads, %2$s and %3$s are URLs. 530 #: admin/includes/class-meta-box.php:54 4530 #: admin/includes/class-meta-box.php:545 531 531 msgid "%1$d ads – <a href=\"%2$s\">manage</a> - <a href=\"%3$s\">new</a>" 532 532 msgstr "" 533 533 534 #: admin/includes/class-meta-box.php:55 7534 #: admin/includes/class-meta-box.php:558 535 535 msgid "Get the tutorial via email" 536 536 msgstr "" 537 537 538 #: admin/includes/class-meta-box.php:56 6538 #: admin/includes/class-meta-box.php:567 539 539 msgid "Get AdSense tips via email" 540 540 msgstr "" 541 541 542 #: admin/includes/class-meta-box.php:57 5542 #: admin/includes/class-meta-box.php:576 543 543 msgid "Visit our blog for more articles about ad optimization" 544 544 msgstr "" 545 545 546 546 #. translators: %s is our URL. 547 #: admin/includes/class-meta-box.php:63 0547 #: admin/includes/class-meta-box.php:631 548 548 msgid "Latest posts on wpadvancedads.com" 549 549 msgstr "" … … 1257 1257 msgstr "" 1258 1258 1259 #. translators: %1$d is the number of elements in the list and %2$s a URL. 1260 #: admin/views/conditions/condition-author.php:41 1261 msgid "Only %1$d elements are displayed above. Use the <code>advanced-ads-admin-max-terms</code> filter to change this limit according to <a href=\"%2$s\" target=\"_blank\">this page</a>." 1259 #: admin/views/conditions/condition-author.php:37 1260 msgctxt "display the authors search field on ad edit page" 1261 msgid "add more authors" 1262 msgstr "" 1263 1264 #: admin/views/conditions/condition-author.php:43 1265 msgid "author name or id" 1262 1266 msgstr "" 1263 1267 … … 1690 1694 1691 1695 #: admin/views/settings/general/block-bots.php:11 1692 #: classes/frontend_checks.php:13 01696 #: classes/frontend_checks.php:138 1693 1697 msgid "You look like a bot" 1694 1698 msgstr "" … … 2060 2064 2061 2065 #. translators: %s is a URL. 2062 #: classes/ad_ajax_callbacks.php:2 622066 #: classes/ad_ajax_callbacks.php:296 2063 2067 msgid "An error occurred. Please use <a href=\"%s\" target=\"_blank\">this form</a> to sign up." 2064 2068 msgstr "" … … 2302 2306 msgstr "" 2303 2307 2308 #: classes/display-conditions.php:88 2309 msgid "post type" 2310 msgstr "" 2311 2304 2312 #: classes/display-conditions.php:89 2305 msgid "post type"2306 msgstr ""2307 2308 #: classes/display-conditions.php:902309 2313 #: includes/array_ad_conditions.php:40 2310 2314 msgid "Choose the public post types on which to display the ad." 2311 2315 msgstr "" 2312 2316 2317 #: classes/display-conditions.php:95 2318 msgid "specific pages" 2319 msgstr "" 2320 2313 2321 #: classes/display-conditions.php:96 2314 msgid "specific pages"2315 msgstr ""2316 2317 #: classes/display-conditions.php:972318 2322 #: includes/array_ad_conditions.php:58 2319 2323 msgid "Choose on which individual posts, pages and public post type pages you want to display or hide ads." 2320 2324 msgstr "" 2321 2325 2322 #: classes/display-conditions.php:10 32326 #: classes/display-conditions.php:102 2323 2327 msgid "general conditions" 2324 2328 msgstr "" 2325 2329 2326 #: classes/display-conditions.php:10 92330 #: classes/display-conditions.php:108 2327 2331 msgid "author" 2328 2332 msgstr "" 2329 2333 2334 #: classes/display-conditions.php:114 2335 msgid "content age" 2336 msgstr "" 2337 2330 2338 #: classes/display-conditions.php:115 2331 msgid "content age"2332 msgstr ""2333 2334 #: classes/display-conditions.php:1162335 2339 msgid "Display ads based on age of the page." 2336 2340 msgstr "" 2337 2341 2342 #: classes/display-conditions.php:121 2343 msgid "taxonomy" 2344 msgstr "" 2345 2338 2346 #: classes/display-conditions.php:122 2339 msgid "taxonomy"2340 msgstr ""2341 2342 #: classes/display-conditions.php:1232343 2347 msgid "Display ads based on the taxonomy of an archive page." 2344 2348 msgstr "" 2345 2349 2346 2350 #. translators: %s is a label of an archive page. 2347 #: classes/display-conditions.php:17 12351 #: classes/display-conditions.php:170 2348 2352 msgid "archive: %s" 2349 2353 msgstr "" 2350 2354 2351 #: classes/display-conditions.php:28 72355 #: classes/display-conditions.php:288 2352 2356 msgid "parent page" 2353 2357 msgstr "" 2354 2358 2355 #: classes/display-conditions.php:28 82359 #: classes/display-conditions.php:289 2356 2360 msgid "post meta" 2357 2361 msgstr "" 2358 2362 2359 #: classes/display-conditions.php:2 892363 #: classes/display-conditions.php:290 2360 2364 msgid "page template" 2361 2365 msgstr "" 2362 2366 2363 #: classes/display-conditions.php:29 02367 #: classes/display-conditions.php:291 2364 2368 msgid "url parameters" 2365 2369 msgstr "" 2366 2370 2367 #: classes/display-conditions.php:29 32371 #: classes/display-conditions.php:294 2368 2372 msgid "accelerated mobile pages" 2369 2373 msgstr "" … … 2384 2388 msgstr "" 2385 2389 2386 #: classes/display-conditions.php:6 272390 #: classes/display-conditions.php:641 2387 2391 msgctxt "display the terms search field on ad edit page" 2388 2392 msgid "add more terms" 2389 2393 msgstr "" 2390 2394 2391 #: classes/display-conditions.php:6 312395 #: classes/display-conditions.php:647 2392 2396 msgid "term name or id" 2393 2397 msgstr "" 2394 2398 2395 #: classes/display-conditions.php:7 012399 #: classes/display-conditions.php:726 2396 2400 msgid "title or id" 2397 2401 msgstr "" 2398 2402 2399 #: classes/display-conditions.php: 7562403 #: classes/display-conditions.php:800 2400 2404 #: includes/array_ad_conditions.php:63 2401 2405 msgid "Home Page" 2402 2406 msgstr "" 2403 2407 2404 #: classes/display-conditions.php: 7572408 #: classes/display-conditions.php:801 2405 2409 #: includes/array_ad_conditions.php:64 2406 2410 msgid "show on Home page" 2407 2411 msgstr "" 2408 2412 2409 #: classes/display-conditions.php: 7612413 #: classes/display-conditions.php:805 2410 2414 #: includes/array_ad_conditions.php:68 2411 2415 msgid "Singular Pages" 2412 2416 msgstr "" 2413 2417 2414 #: classes/display-conditions.php: 7622418 #: classes/display-conditions.php:806 2415 2419 #: includes/array_ad_conditions.php:69 2416 2420 msgid "show on singular pages/posts" 2417 2421 msgstr "" 2418 2422 2419 #: classes/display-conditions.php: 7662423 #: classes/display-conditions.php:810 2420 2424 #: includes/array_ad_conditions.php:73 2421 2425 msgid "Archive Pages" 2422 2426 msgstr "" 2423 2427 2424 #: classes/display-conditions.php: 7672428 #: classes/display-conditions.php:811 2425 2429 #: includes/array_ad_conditions.php:74 2426 2430 msgid "show on any type of archive page (category, tag, author and date)" 2427 2431 msgstr "" 2428 2432 2429 #: classes/display-conditions.php: 7712433 #: classes/display-conditions.php:815 2430 2434 #: includes/array_ad_conditions.php:78 2431 2435 msgid "Search Results" 2432 2436 msgstr "" 2433 2437 2434 #: classes/display-conditions.php: 7722438 #: classes/display-conditions.php:816 2435 2439 #: includes/array_ad_conditions.php:79 2436 2440 msgid "show on search result pages" 2437 2441 msgstr "" 2438 2442 2439 #: classes/display-conditions.php: 7762443 #: classes/display-conditions.php:820 2440 2444 #: includes/array_ad_conditions.php:83 2441 2445 msgid "404 Page" 2442 2446 msgstr "" 2443 2447 2444 #: classes/display-conditions.php: 7772448 #: classes/display-conditions.php:821 2445 2449 #: includes/array_ad_conditions.php:84 2446 2450 msgid "show on 404 error page" 2447 2451 msgstr "" 2448 2452 2449 #: classes/display-conditions.php: 7812453 #: classes/display-conditions.php:825 2450 2454 #: includes/array_ad_conditions.php:88 2451 2455 msgid "Attachment Pages" 2452 2456 msgstr "" 2453 2457 2454 #: classes/display-conditions.php: 7822458 #: classes/display-conditions.php:826 2455 2459 #: includes/array_ad_conditions.php:89 2456 2460 msgid "show on attachment pages" 2457 2461 msgstr "" 2458 2462 2459 #: classes/display-conditions.php: 7862463 #: classes/display-conditions.php:830 2460 2464 #: includes/array_ad_conditions.php:93 2461 2465 msgid "Secondary Queries" 2462 2466 msgstr "" 2463 2467 2464 #: classes/display-conditions.php: 7872468 #: classes/display-conditions.php:831 2465 2469 #: includes/array_ad_conditions.php:94 2466 2470 msgid "allow ads in secondary queries" 2467 2471 msgstr "" 2468 2472 2469 #: classes/display-conditions.php: 7912473 #: classes/display-conditions.php:835 2470 2474 msgid "RSS Feed" 2471 2475 msgstr "" 2472 2476 2473 #: classes/display-conditions.php: 7922477 #: classes/display-conditions.php:836 2474 2478 msgid "allow ads in RSS Feed" 2475 2479 msgstr "" 2476 2480 2477 #: classes/display-conditions.php: 7962481 #: classes/display-conditions.php:840 2478 2482 msgid "REST API" 2479 2483 msgstr "" 2480 2484 2481 #: classes/display-conditions.php: 7972485 #: classes/display-conditions.php:841 2482 2486 msgid "allow ads in REST API" 2483 2487 msgstr "" 2484 2488 2485 #: classes/display-conditions.php:8 322489 #: classes/display-conditions.php:876 2486 2490 msgid "older than" 2487 2491 msgstr "" 2488 2492 2489 #: classes/display-conditions.php:8 332493 #: classes/display-conditions.php:877 2490 2494 msgid "younger than" 2491 2495 msgstr "" 2492 2496 2493 #: classes/display-conditions.php:8 382497 #: classes/display-conditions.php:882 2494 2498 msgid "days" 2495 2499 msgstr "" 2496 2500 2497 #: classes/display-conditions.php:8 412501 #: classes/display-conditions.php:885 2498 2502 msgid "Display ads based on the age of a page or post." 2499 2503 msgstr "" … … 2551 2555 msgstr "" 2552 2556 2553 #: classes/frontend_checks.php:1 152557 #: classes/frontend_checks.php:123 2554 2558 msgid "Random AdSense ads" 2555 2559 msgstr "" 2556 2560 2557 #: classes/frontend_checks.php:1 442561 #: classes/frontend_checks.php:152 2558 2562 msgid "Ad blocker enabled" 2559 2563 msgstr "" 2560 2564 2561 #: classes/frontend_checks.php:1 562565 #: classes/frontend_checks.php:164 2562 2566 msgid "<em>%s</em> filter does not exist" 2563 2567 msgstr "" 2564 2568 2565 #: classes/frontend_checks.php:1 722569 #: classes/frontend_checks.php:180 2566 2570 msgid "Ads are disabled in the content of this page" 2567 2571 msgstr "" 2568 2572 2569 #: classes/frontend_checks.php:1 842573 #: classes/frontend_checks.php:192 2570 2574 msgid "the current post ID is 0 " 2571 2575 msgstr "" 2572 2576 2573 #: classes/frontend_checks.php:2 032577 #: classes/frontend_checks.php:211 2574 2578 msgid "Ads are disabled on this page" 2575 2579 msgstr "" 2576 2580 2577 #: classes/frontend_checks.php:2 172581 #: classes/frontend_checks.php:225 2578 2582 msgid "Ads are disabled on all pages" 2579 2583 msgstr "" 2580 2584 2581 #: classes/frontend_checks.php:2 322585 #: classes/frontend_checks.php:240 2582 2586 msgid "Ads are disabled on 404 pages" 2583 2587 msgstr "" 2584 2588 2585 #: classes/frontend_checks.php:2 462589 #: classes/frontend_checks.php:254 2586 2590 msgid "Ads are disabled on non singular pages" 2587 2591 msgstr "" 2588 2592 2589 #: classes/frontend_checks.php:26 02593 #: classes/frontend_checks.php:268 2590 2594 msgid "Ad IDs: %s" 2591 2595 msgstr "" 2592 2596 2593 #: classes/frontend_checks.php:2 882597 #: classes/frontend_checks.php:296 2594 2598 msgid "AdSense violation" 2595 2599 msgstr "" 2596 2600 2597 #: classes/frontend_checks.php:2 892601 #: classes/frontend_checks.php:297 2598 2602 msgid "Ad is hidden" 2599 2603 msgstr "" 2600 2604 2601 #: classes/frontend_checks.php:29 02605 #: classes/frontend_checks.php:298 2602 2606 msgid "IDs: %s" 2603 2607 msgstr "" 2604 2608 2605 #: classes/frontend_checks.php:3 062609 #: classes/frontend_checks.php:314 2606 2610 msgid "The following responsive AdSense ads are not showing up: %s" 2607 2611 msgstr "" 2608 2612 2609 #: classes/frontend_checks.php:3 232613 #: classes/frontend_checks.php:331 2610 2614 msgid "Consent not given" 2611 2615 msgstr "" 2612 2616 2613 #: classes/frontend_checks.php:34 02617 #: classes/frontend_checks.php:348 2614 2618 msgid "Enable TCF integration" 2615 2619 msgstr "" 2616 2620 2617 #: classes/frontend_checks.php:3 552621 #: classes/frontend_checks.php:363 2618 2622 msgid "Debug Google Ad Manager" 2619 2623 msgstr "" 2620 2624 2621 #: classes/frontend_checks.php:3 722625 #: classes/frontend_checks.php:380 2622 2626 msgid "highlight ads" 2623 2627 msgstr "" 2624 2628 2625 #: classes/frontend_checks.php: 4922629 #: classes/frontend_checks.php:500 2626 2630 msgid "Ad Health" 2627 2631 msgstr "" 2628 2632 2629 #: classes/frontend_checks.php:5 072633 #: classes/frontend_checks.php:515 2630 2634 msgid "Show %d more notifications" 2631 2635 msgstr "" 2632 2636 2633 #: classes/frontend_checks.php:5 262637 #: classes/frontend_checks.php:534 2634 2638 msgid "Everything is fine" 2635 2639 msgstr "" 2636 2640 2637 #: classes/frontend_checks.php: 5972641 #: classes/frontend_checks.php:605 2638 2642 msgid "the following code is used for automatic error detection and only visible to admins" 2639 2643 msgstr "" … … 3280 3284 msgstr "" 3281 3285 3282 #: modules/adblock-finder/admin/views/setting-ga.php:1 03286 #: modules/adblock-finder/admin/views/setting-ga.php:12 3283 3287 msgid "Google Analytics Tracking ID" 3284 3288 msgstr "" 3285 3289 3286 #: modules/adblock-finder/admin/views/setting-ga.php:14 3287 msgid "Do you want to know how many of your visitors are using an ad blocker? Enter your Google Analytics property ID above to count them." 3288 msgstr "" 3289 3290 #. translators: 1: is an example id for Universal Analytics <code>UA-123456-1</code>, 2: is an example id for GA4 '<code>G-A12BC3D456</code>' 3290 #. translators: %s is demo GA4 ID. 3291 3291 #: modules/adblock-finder/admin/views/setting-ga.php:19 3292 msgid " %1$s for Universal Analytics or %2$s for Google Analytics 4."3292 msgid "Do you want to know how many visitors use an ad blocker? Enter your Google Analytics property ID (%s) above to count them." 3293 3293 msgstr "" 3294 3294 -
advanced-ads/tags/1.49.0/modules/adblock-finder/admin/views/setting-ga.php
r2609369 r3029416 3 3 * Input for Google Analytics property ID. 4 4 * 5 * @package Advanced_Ads_Admin 5 6 * @var string $ga_uid Google Analytics property ID 6 7 */ 8 7 9 ?> 8 10 <label> … … 12 14 13 15 <p class="description"> 14 <?php esc_html_e( 'Do you want to know how many of your visitors are using an ad blocker? Enter your Google Analytics property ID above to count them.', 'advanced-ads' ); ?>15 <br>16 16 <?php 17 17 printf( 18 /* translators: 1: is an example id for Universal Analytics <code>UA-123456-1</code>, 2: is an example id for GA4 '<code>G-A12BC3D456</code>' */ 19 esc_html__( '%1$s for Universal Analytics or %2$s for Google Analytics 4.', 'advanced-ads' ), 20 '<code>UA-123456-1</code>', 18 // translators: %s is demo GA4 ID. 19 esc_html__( 20 'Do you want to know how many visitors use an ad blocker? Enter your Google Analytics property ID (%s) above to count them.', 21 'advanced-ads' 22 ), 21 23 '<code>G-A12BC3D456</code>' 22 24 ); -
advanced-ads/tags/1.49.0/modules/adblock-finder/public/adblocker-enabled.js
r2587606 r3029416 2 2 * Check if an ad blocker is enabled. 3 3 * 4 * @param {function}callback A callback function that is executed after the check has been done.5 * The 'is_enabled' (bool) variable is passed as the callback's first argument.4 * @param function callback A callback function that is executed after the check has been done. 5 * The 'isEnabled' (bool) variable is passed as the callback's first argument. 6 6 */ 7 window.advanced_ads_check_adblocker = ( function ( callback) {8 var pending_callbacks = [];9 var is_enabled= null;7 window.advanced_ads_check_adblocker = (function (callback) { 8 let pendingCallbacks = []; 9 let isEnabled = null; 10 10 11 function RAF( RAF_callback ) { 12 var fn = window.requestAnimationFrame 13 || window.mozRequestAnimationFrame 14 || window.webkitRequestAnimationFrame 15 || function ( RAF_callback ) { 16 return setTimeout( RAF_callback, 16 ); 11 function RAF(RAF_callback) { 12 const fn = 13 window.requestAnimationFrame || 14 window.mozRequestAnimationFrame || 15 window.webkitRequestAnimationFrame || 16 function (RAF_callback) { 17 return setTimeout(RAF_callback, 16); 17 18 }; 18 19 19 fn.call( window, RAF_callback);20 fn.call(window, RAF_callback); 20 21 } 21 22 22 RAF( function () {23 RAF(function () { 23 24 // Create a bait. 24 var ad = document.createElement( 'div');25 const ad = document.createElement('div'); 25 26 ad.innerHTML = ' '; 26 ad.setAttribute( 'class', 'ad_unit ad-unit text-ad text_ad pub_300x250' ); 27 ad.setAttribute( 'style', 'width: 1px !important; height: 1px !important; position: absolute !important; left: 0px !important; top: 0px !important; overflow: hidden !important;' ); 28 document.body.appendChild( ad ); 27 ad.setAttribute('class', 'ad_unit ad-unit text-ad text_ad pub_300x250'); 28 ad.setAttribute( 29 'style', 30 'width: 1px !important; height: 1px !important; position: absolute !important; left: 0px !important; top: 0px !important; overflow: hidden !important;' 31 ); 32 document.body.appendChild(ad); 29 33 30 RAF( function () {31 var styles = window.getComputedStyle && window.getComputedStyle( ad);32 var moz_binding = styles && styles.getPropertyValue( '-moz-binding');34 RAF(function () { 35 const styles = window.getComputedStyle?.(ad); 36 const mozBinding = styles?.getPropertyValue('-moz-binding'); 33 37 34 is_enabled = ( styles && styles.getPropertyValue( 'display' ) === 'none' ) 35 || ( typeof moz_binding === 'string' && moz_binding.indexOf( 'about:' ) !== - 1 ); 38 isEnabled = 39 (styles && styles.getPropertyValue('display') === 'none') || 40 (typeof mozBinding === 'string' && 41 mozBinding.indexOf('about:') !== -1); 36 42 37 43 // Call pending callbacks. 38 for ( var i = 0, length = pending_callbacks.length; i < length; i ++) {39 pending _callbacks[i]( is_enabled);44 for (var i = 0, length = pendingCallbacks.length; i < length; i++) { 45 pendingCallbacks[i](isEnabled); 40 46 } 41 pending _callbacks = [];42 } );43 } );47 pendingCallbacks = []; 48 }); 49 }); 44 50 45 return function ( callback ) { 46 if ( is_enabled === null ) { 47 pending_callbacks.push( callback ); 51 return function (callback) { 52 if ('undefined' === typeof advanced_ads_adblocker_test) { 53 isEnabled = true; 54 } 55 if (isEnabled === null) { 56 pendingCallbacks.push(callback); 48 57 return; 49 58 } 50 59 // Run the callback immediately 51 callback( is_enabled);60 callback(isEnabled); 52 61 }; 53 } ());62 })(); -
advanced-ads/tags/1.49.0/modules/adblock-finder/public/adblocker-enabled.min.js
r2983598 r3029416 1 window.advanced_ads_check_adblocker=function(t){var n=[],e=null;function i(t){var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)};n.call(window,t)}return i((function(){var t=document.createElement("div");t.innerHTML=" ",t.setAttribute("class","ad_unit ad-unit text-ad text_ad pub_300x250"),t.setAttribute("style","width: 1px !important; height: 1px !important; position: absolute !important; left: 0px !important; top: 0px !important; overflow: hidden !important;"),document.body.appendChild(t),i((function(){var i =window.getComputedStyle&&window.getComputedStyle(t),o=i&&i.getPropertyValue("-moz-binding");e=i&&"none"===i.getPropertyValue("display")||"string"==typeof o&&-1!==o.indexOf("about:");for(var a=0,r=n.length;a<r;a++)n[a](e);n=[]}))})),function(t){null!==e?t(e):n.push(t)}}();1 window.advanced_ads_check_adblocker=function(t){var n=[],e=null;function i(t){var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)};n.call(window,t)}return i((function(){var t=document.createElement("div");t.innerHTML=" ",t.setAttribute("class","ad_unit ad-unit text-ad text_ad pub_300x250"),t.setAttribute("style","width: 1px !important; height: 1px !important; position: absolute !important; left: 0px !important; top: 0px !important; overflow: hidden !important;"),document.body.appendChild(t),i((function(){var i,o,a=null===(i=(o=window).getComputedStyle)||void 0===i?void 0:i.call(o,t),d=null==a?void 0:a.getPropertyValue("-moz-binding");e=a&&"none"===a.getPropertyValue("display")||"string"==typeof d&&-1!==d.indexOf("about:");for(var r=0,u=n.length;r<u;r++)n[r](e);n=[]}))})),function(t){"undefined"==typeof advanced_ads_adblocker_test&&(e=!0),null!==e?t(e):n.push(t)}}(); -
advanced-ads/tags/1.49.0/readme.txt
r3006148 r3029416 5 5 Tested up to: 6.4 6 6 Requires PHP: 7.2 7 Stable tag: 1.4 8.17 Stable tag: 1.49.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 13 13 == Description == 14 14 15 Are you looking for a simple ad manager plugin? These are the top arguments to use Advanced Ads: 16 17 * approved in publishing and ad optimization since 2009 18 * works with all ad types and networks, including Google AdSense, Google Ad Manager (formerly Google DoubleClick for Publishers, DFP), Amazon ads, or media.net ads 19 * most features to test and optimize ads 20 * unlimited ad units 21 * ads.txt support 22 * dedicated ad block for the block editor 23 * Google AdSense Partner, who implements all technical changes early and in 100% compliance with the Google AdSense policies 24 * the only advertising solution with *Ad Health* integration and Google AdSense violation checks 25 * best rated [free support](https://wordpress.org/support/plugin/advanced-ads) 15 = The ultimate ad management plugin for WordPress = 16 17 Advanced Ads is the most comprehensive ad management tool available. It strikes the perfect balance between ease of use and powerful features, trusted by thousands of companies and businesses. 18 19 We took the pain out of advertising and made it easy to embed ads, banners, or any other code automatically—all within minutes and without the need for theme file editing. If you are looking for the best plugin for ad management, you have found it. 20 21 [Manual](https://wpadvancedads.com/manual/?utm_source=wporg&utm_medium=link&utm_campaign=wp-linkbar-manual) | [Support](https://wpadvancedads.com/aa-links/support) | [Demo](https://wpadvancedads.com/aa-links/demo) | [Premium Features](https://wpadvancedads.com/add-ons/all-access/?utm_source=wporg&utm_medium=link&utm_campaign=wp-linkbar-features) 22 23 * <strong>Usability:</strong> Clearly structured interface • Smart workflows for fluid day-to-day operations 24 * <strong>Functionality:</strong> Setting the gold standard for the market with outstanding features 25 * <strong>Compatibility:</strong> All ad networks • Dedicated integrations with loads of popular plugins and themes 26 * <strong>Expertise:</strong> Fast and top-rated support • Approved in publishing and ad optimization since 2009 27 * <strong>Reputation:</strong> Recommended by Google • Fully compliant with Google AdSense policies 28 29 Would you like to know if there is a certain feature, what the optimized setup would be, or how to implement your client’s demands? Just [open a thread in the forum](https://wordpress.org/support/plugin/advanced-ads#new-post)! 26 30 27 31 This is what our users are saying about Advanced Ads: 28 32 29 > We use this plugin to deliver rotating ads on a community news site, and it’s great. Both feature-rich and reliable, your imagination is the limit when it comes to the product you want to create for your users. We’ve delivered over a million ad impressions since we launched less than a year ago, using a combination of sidebar, top, sticky and in-content placements — both HTML5 and images. Advanced Ads makes it easy for our small team to deliver a good experience to our users and our advertisers. 30 > mytown304 on wp.org 31 32 Would you like to know if there is a certain feature, what the optimized setup would be, or how to implement your client’s demands? Just [open a thread in the forum](https://wordpress.org/support/plugin/advanced-ads#new-post)! 33 34 Advanced Ads allowed us to grow from 0 to 100 MM monthly ad impressions. Benefit from our experience as a publisher and monetize your website today! 35 36 > **Advanced Ads All Access** 37 >This plugin is the lite version of the Advanced Ads plugin that comes with all the features you will ever need to optimize your ads and increase your revenues, including advanced ad targeting, split tests, click fraud protection, lazy loading, background, popups and sticky ads, full AMP support, adblocker detection, the most comfortable Google Ad Manager integration, and tons more. [Click here to purchase the best premium WordPress ad management plugin now!](https://wpadvancedads.com/add-ons/all-access/?utm_source=wporg&utm_medium=link&utm_campaign=wp-all-access) 33 > We use this plugin to deliver rotating ads on a community news site, and it’s great. We’ve delivered over a million ad impressions since we launched less than a year ago, using a combination of sidebar, top, sticky and in-content placements — both HTML5 and images. Advanced Ads makes it easy for our small team to deliver a good experience to our users and our advertisers. 34 > <i>mytown304 on wp.org</i> 35 36 Advanced Ads allowed our founder to grow from 0 to 100 MM monthly ad impressions. Benefit from our experience as publishers and monetize your website today! 37 38 = Premium Features = 39 This plugin is the lite version of the Advanced Ads plugin that comes with all the features you will ever need to optimize your ads and increase your revenues, including performance tracking, advanced ad targeting, split tests, click fraud protection, lazy loading, background ads, popups and sticky ads, full AMP support, adblocker detection, the most comfortable Google Ad Manager integration, and tons more. [Click here to purchase the best premium WordPress ad management plugin now!](https://wpadvancedads.com/add-ons/all-access/?utm_source=wporg&utm_medium=link&utm_campaign=wp-all-access) 38 40 39 41 [Full Feature List](https://wpadvancedads.com/features/?utm_source=wporg&utm_medium=link&utm_campaign=wp-features) … … 150 152 https://vimeo.com/577170591 151 153 152 > <strong>Add-Ons</strong> 153 > 154 >* all add-ons include priority email support155 >* [All Access](https://wpadvancedads.com/add-ons/all-access/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – includes all available add-ons156 >* [Advanced Ads Pro](https://wpadvancedads.com/advanced-ads-pro/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – powerful tools for ad optimizations: cache-busting, more placements, [lazy loading](https://wpadvancedads.com/lazy-load-ads/?utm_source=wporg&utm_medium=link&utm_campaign=features), ad blocker module, [click fraud protection](https://wpadvancedads.com/manual/click-fraud-protection/?utm_source=wporg&utm_medium=link&utm_campaign=features), [geo targeting](https://wpadvancedads.com/add-ons/geo-targeting/?utm_source=wporg&utm_medium=link&utm_campaign=features), [parallax ads](https://wpadvancedads.com/parallax-ads/?utm_source=wporg&utm_medium=link&utm_campaign=features) and many more157 >* [Tracking](https://wpadvancedads.com/add-ons/tracking/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – track ad impressions and ad clicks with local methods or Google Analytics158 >* [AMP Ads](https://wpadvancedads.com/add-ons/amp-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – make your ads compatible with AMP and convert Google AdSense ads automatically159 >* [Google Ad Manager Integration](https://wpadvancedads.com/add-ons/google-ad-manager/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – a quick and error-free way to load ad units from your Google Ad Manager (formerly Google DoubleClick for Publishers, DFP) account without touching any ad codes160 >* [Sticky Ads](https://wpadvancedads.com/add-ons/sticky-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – increase click rates with fixed, sticky, and anchor ads161 >* [Fixed Widget for WordPress](https://wordpress.org/plugins/q2w3-fixed-widget/) – turn sidebar widgets into performant fixed sticky ads162 >* [PopUp and Layer Ads](https://wpadvancedads.com/add-ons/popup-and-layer-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – display ads and other content in layers, popups, and interstitials163 >* [Selling Ads](https://wpadvancedads.com/add-ons/selling-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) - allows you to sell ads on your website fully automated, including payments and advertiser profiles164 >* [Ad Slider](https://wpadvancedads.com/add-ons/slider/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – create a simple slider from your ads165 >* [Full Feature List](https://wpadvancedads.com/features/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons)154 = Add-Ons = 155 156 * all add-ons include priority email support 157 * [All Access](https://wpadvancedads.com/add-ons/all-access/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – includes all available add-ons 158 * [Advanced Ads Pro](https://wpadvancedads.com/advanced-ads-pro/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – powerful tools for ad optimizations: cache-busting, more placements, [lazy loading](https://wpadvancedads.com/lazy-load-ads/?utm_source=wporg&utm_medium=link&utm_campaign=features), ad blocker module, [click fraud protection](https://wpadvancedads.com/manual/click-fraud-protection/?utm_source=wporg&utm_medium=link&utm_campaign=features), [geo targeting](https://wpadvancedads.com/add-ons/geo-targeting/?utm_source=wporg&utm_medium=link&utm_campaign=features), [parallax ads](https://wpadvancedads.com/parallax-ads/?utm_source=wporg&utm_medium=link&utm_campaign=features) and many more 159 * [Tracking](https://wpadvancedads.com/add-ons/tracking/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – track ad impressions and ad clicks with local methods or Google Analytics 160 * [AMP Ads](https://wpadvancedads.com/add-ons/amp-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – make your ads compatible with AMP and convert Google AdSense ads automatically 161 * [Google Ad Manager Integration](https://wpadvancedads.com/add-ons/google-ad-manager/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – a quick and error-free way to load ad units from your Google Ad Manager (formerly Google DoubleClick for Publishers, DFP) account without touching any ad codes 162 * [Sticky Ads](https://wpadvancedads.com/add-ons/sticky-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – increase click rates with fixed, sticky, and anchor ads 163 * [Fixed Widget for WordPress](https://wordpress.org/plugins/q2w3-fixed-widget/) – turn sidebar widgets into performant fixed sticky ads 164 * [PopUp and Layer Ads](https://wpadvancedads.com/add-ons/popup-and-layer-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – display ads and other content in layers, popups, and interstitials 165 * [Selling Ads](https://wpadvancedads.com/add-ons/selling-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) - allows you to sell ads on your website fully automated, including payments and advertiser profiles 166 * [Ad Slider](https://wpadvancedads.com/add-ons/slider/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – create a simple slider from your ads 167 * [Full Feature List](https://wpadvancedads.com/features/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) 166 168 167 169 = ad blocker = … … 337 339 == Changelog == 338 340 339 = 1.48.1 (December 6, 2023) = 340 341 - Fix: prevent ad weight from always showing 10 342 343 = 1.48.0 (December 5, 2023) = 344 345 - Improvement: show Google Ad Manager debug link in Ad Health even when only a head tag exists 346 - Improvement: add arrows to jump through highlighted ads 347 - Improvement: link ads in the group modal 348 - Improvement: update the plugin list and its descriptions on the dashboard 349 - Improvement: add correct jumping through highlighted AdSense ads 350 - Fix: ensure ads without a stored ad weight in the database are displayed on the group page 351 - Fix: show the tooltip with placement and ad names only when 'highlight ads' is enabled 341 = 1.49.0 (January 31, 2024) = 342 343 - Improvement: enhance ad blocker detection to identify more ad blockers reliably 344 - Improvement: remove universal analytics description 345 - Fix: allow content age display condition to work with AJAX cache busting 346 - Fix: show search bar for author if max terms reach the limit 347 - Fix: prevent a fatal error on the ad edit page related to Display Conditions -
advanced-ads/trunk/admin/assets/css/admin.css
r2995001 r3029416 264 264 #advads-display-conditions, #advads-visitor-conditions { margin-top: 0; } 265 265 #ad-targeting-box .advads-conditions-terms-show-search { height: 22px; line-height: 22px; font-weight: bold; font-size: 1.5em; } 266 .advads-conditions-terms-search { display: none; }266 .advads-conditions-terms-search, .advads-conditions-authors-search { display: none; } 267 267 #advads-ad-usage .advads-usage input { width: 300px; } 268 268 .post-type-advanced_ads #ad-parameters-box .advads-ad-parameters-spinner { display: block; float: none; } -
advanced-ads/trunk/admin/assets/js/conditions.js
r2701373 r3029416 3 3 */ 4 4 5 jQuery( document ).ready( 6 function ( $ ) { 5 jQuery( document ).ready(function ( $ ) { 7 6 /** 8 7 * Pressing the button to add a new condition to the list of conditions … … 111 110 } 112 111 112 // remove author from list by clicking on it. 113 $(document).on( 114 'click', 115 '.advads-conditions-authors-buttons .button', 116 function () { 117 $(this).remove(); 118 } 119 ); 120 // display input field to search for author. 121 $(document).on( 122 'click', 123 '.advads-conditions-authors-show-search', 124 function (e) { 125 e.preventDefault(); 126 // display input field. 127 $(this) 128 .siblings('.advads-conditions-authors-search') 129 .show() 130 .focus(); 131 // register autocomplete. 132 advadsRegisterAuthorAutocomplete( 133 $(this).siblings('.advads-conditions-authors-search') 134 ); 135 $(this).next('br').show(); 136 $(this).hide(); 137 } 138 ); 139 140 // author search box autocomplete. 141 function advadsRegisterAuthorAutocomplete(self) { 142 self.autocomplete({ 143 classes: { 144 'ui-autocomplete': 'advads-ui-autocomplete', 145 }, 146 source(request, callback) { 147 advadsAuthorSearch(self, callback); 148 }, 149 minLength: 1, 150 select(event, ui) { 151 // append new line with input fields. 152 $( 153 '<label class="button advads-button advads-ui-state-active"><span class="advads-button-text">' + 154 ui.item.label + 155 '<input type="hidden" name="' + 156 self.data('inputName') + 157 '" value="' + 158 ui.item.value + 159 '"></span></label>' 160 ).appendTo(self.siblings('.advads-conditions-authors-buttons')); 161 }, 162 close() { 163 self.val(''); 164 }, 165 }); 166 } 167 113 168 // display input field to search for post, page, etc. 114 169 $( document ).on( 'click', '.advads-conditions-postids-show-search', function ( e ) { … … 244 299 245 300 /** 301 * Callback for author search autocomplete 302 * 303 * @param {string} search author 304 * @param {HTMLInputElement} field html input field 305 * @param {Function} callback Callback function 306 * @return {Object} JSON object with labels and values 307 */ 308 309 function advadsAuthorSearch(field, callback) { 310 const query = { 311 action: 'advads-authors-search', 312 nonce: advadsglobal.ajax_nonce, 313 }; 314 315 query.search = field.val(); 316 317 var querying = true; 318 319 const results = []; 320 // eslint-disable-next-line no-undef 321 jQuery.post( 322 // eslint-disable-next-line no-undef 323 ajaxurl, 324 query, 325 function (r) { 326 querying = false; 327 if (r) { 328 r.map(function (element, index) { 329 results[index] = { 330 value: element.data.ID, 331 label: element.data.display_name, 332 }; 333 }); 334 } 335 callback(results); 336 }, 337 'json' 338 ); 339 } 340 341 /** 246 342 * Callback for post search autocomplete 247 343 * -
advanced-ads/trunk/admin/includes/class-meta-box.php
r2986093 r3029416 234 234 $view = 'conditions/ad-targeting-metabox.php'; 235 235 $hndlelinks = '<a href="#" class="advads-video-link">' . __( 'Video', 'advanced-ads' ) . '</a>'; 236 $hndlelinks .= '<a href="https://wpadvancedads.com/manual/display-conditions/?utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-display" target="_blank" class="advads-manual-link">' . __( 'Display Conditions', 'advanced-ads' ) . '</a>';237 $hndlelinks .= '<a href="https://wpadvancedads.com/manual/visitor-conditions/?utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank" class="advads-manual-link">' . __( 'Visitor Conditions', 'advanced-ads' ) . '</a>';236 $hndlelinks .= '<a href="https://wpadvancedads.com/manual/display-conditions/?utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-display" target="_blank" class="advads-manual-link">' . __( 'Display Conditions', 'advanced-ads' ) . '</a>'; 237 $hndlelinks .= '<a href="https://wpadvancedads.com/manual/visitor-conditions/?utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank" class="advads-manual-link">' . __( 'Visitor Conditions', 'advanced-ads' ) . '</a>'; 238 238 $videomarkup = '<iframe width="420" height="315" src="https://www.youtube-nocookie.com/embed/VjfrRl5Qn4I?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>'; 239 $display_conditions = $ad->options( 'conditions', [] ); 240 $visitor_conditions = $ad->options( 'visitors', [] ); 239 $ad_options = $ad->options(); 240 $display_conditions = is_array( $ad_options['conditions'] ) ? $ad_options['conditions'] : []; // default value for older version is `""` (empty string) 241 $visitor_conditions = is_array( $ad_options['visitors'] ) ? $ad_options['visitors'] : []; // default value for older version is `""` (empty string) 241 242 $display_conditions_available = ( empty( $display_conditions ) ); 242 243 $visitor_conditions_available = ( empty( $visitor_conditions ) ); -
advanced-ads/trunk/admin/views/conditions/condition-author.php
r2986093 r3029416 3 3 * Templace for the Author display condition 4 4 * 5 * @package Advanced_Ads_Admin 5 6 * @var string $name form name attribute. 6 7 * @var int $max_authors number of maximum author entries to show. 7 8 */ 9 8 10 ?> 9 11 <div class="advads-conditions-single advads-buttonset"> 10 12 <?php 11 foreach ( $authors as $_author ) { 12 // don’t use strict comparision because $values contains strings. 13 if ( in_array( $_author->ID, $values ) ) { 14 $_val = 1; 15 } else { 16 $_val = 0; 13 if ( count( $authors ) >= $max_authors ) : 14 // show active authors. 15 ?> 16 <div class="advads-conditions-authors-buttons dynamic-search"> 17 <?php 18 foreach ( $authors as $_author ) : 19 // don’t use strict comparision because $values contains strings. 20 if ( in_array( $_author->ID, $values ) ) : 21 $author_name = $_author->display_name; 22 $field_id = 'advads-conditions-' . absint( $_author->ID ) . $rand; 23 ?> 24 <label class="button advads-button advads-ui-state-active"> 25 <span class="advads-button-text"> 26 <?php echo esc_attr( $author_name ); ?> 27 <input type="hidden" 28 name="<?php echo esc_attr( $name ); ?>[value][]" 29 value="<?php echo absint( $_author->ID ); ?>"> 30 </span> 31 </label> 32 <?php 33 endif; 34 endforeach; 35 ?> 36 </div> 37 <span class="advads-conditions-authors-show-search button" title="<?php _ex( 'add more authors', 'display the authors search field on ad edit page', 'advanced-ads' ); ?>"> 38 + 39 </span> 40 <br/> 41 <input type="text" class="advads-conditions-authors-search" 42 data-input-name="<?php echo esc_attr( $name ); ?>[value][]" 43 placeholder="<?php _e( 'author name or id', 'advanced-ads' ); ?>"/> 44 <?php 45 else : 46 $max_counter = $max_authors; 47 foreach ( $authors as $_author ) { 48 if ( $max_counter <= 0 ) { 49 return false; 50 } 51 --$max_counter; 52 // don’t use strict comparision because $values contains strings. 53 if ( in_array( $_author->ID, $values ) ) { 54 $_val = 1; 55 } else { 56 $_val = 0; 57 } 58 $author_name = $_author->display_name; 59 $field_id = 'advads-conditions-' . absint( $_author->ID ) . $rand; 60 ?> 61 <label class="button advads-button" 62 for="<?php echo esc_attr( $field_id ); ?>"> 63 <?php echo esc_attr( $author_name ); ?> 64 </label><input type="checkbox" 65 id="<?php echo esc_attr( $field_id ); ?>" 66 name="<?php echo esc_attr( $name ); ?>[value][]" <?php checked( $_val, 1 ); ?> 67 value="<?php echo absint( $_author->ID ); ?>"> 68 <?php 17 69 } 18 $author_name = $_author->display_name; 19 $field_id = 'advads-conditions-' . absint( $_author->ID ) . $rand; 20 ?> 21 <label class="button advads-button" 22 for="<?php echo esc_attr( $field_id ); ?>"> 23 <?php echo esc_attr( $author_name ); ?> 24 </label><input type="checkbox" 25 id="<?php echo esc_attr( $field_id ); ?>" 26 name="<?php echo esc_attr( $name ); ?>[value][]" <?php checked( $_val, 1 ); ?> 27 value="<?php echo absint( $_author->ID ); ?>"> 28 <?php 29 } 30 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; 70 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; 71 endif; 31 72 ?> 32 73 </div> 33 74 <?php 75 /* 34 76 if ( count( $authors ) >= $max_authors ) : 35 77 ?> … … 55 97 <?php 56 98 endif; 99 */ -
advanced-ads/trunk/advanced-ads.php
r3006148 r3029416 13 13 * Plugin URI: https://wpadvancedads.com 14 14 * Description: Manage and optimize your ads in WordPress 15 * Version: 1.4 8.115 * Version: 1.49.0 16 16 * Author: Advanced Ads GmbH 17 17 * Author URI: https://wpadvancedads.com … … 34 34 35 35 define( 'ADVADS_FILE', __FILE__ ); 36 define( 'ADVADS_VERSION', '1.4 8.1' );36 define( 'ADVADS_VERSION', '1.49.0' ); 37 37 38 38 // Load the autoloader. -
advanced-ads/trunk/classes/ad_ajax_callbacks.php
r2983598 r3029416 31 31 add_action( 'wp_ajax_load_display_conditions_metabox', [ $this, 'load_display_condition' ] ); 32 32 add_action( 'wp_ajax_advads-terms-search', [ $this, 'search_terms' ] ); 33 add_action( 'wp_ajax_advads-authors-search', [ $this, 'search_authors' ] ); 33 34 add_action( 'wp_ajax_advads-close-notice', [ $this, 'close_notice' ] ); 34 35 add_action( 'wp_ajax_advads-hide-notice', [ $this, 'hide_notice' ] ); … … 204 205 205 206 /** 207 * Search authors 208 * 209 * @since 1.47.5 210 */ 211 public function search_authors() { 212 check_ajax_referer( 'advanced-ads-admin-ajax-nonce', 'nonce' ); 213 214 if ( ! WordPress::user_can( 'advanced_ads_edit_ads' ) ) { 215 return; 216 } 217 218 $args = []; 219 $args['search_columns'] = [ 'ID', 'user_login', 'user_nicename', 'display_name' ]; 220 221 if ( version_compare( get_bloginfo( 'version' ), '5.9' ) > -1 ) { 222 $args['capability'] = [ 'edit_posts' ]; 223 } else { 224 $args['who'] = 'authors'; 225 } 226 227 if ( ! isset( $_POST['search'] ) || '' === $_POST['search'] ) { 228 die(); 229 } 230 231 $args['search'] = '*' . sanitize_text_field( wp_unslash( $_POST['search'] ) ) . '*'; 232 233 $results = get_users( $args ); 234 235 echo wp_json_encode( $results ); 236 die(); 237 } 238 239 /** 206 240 * Close a notice for good 207 241 * -
advanced-ads/trunk/classes/display-conditions.php
r2983598 r3029416 1 1 <?php 2 2 // phpcs:ignoreFile 3 3 /** 4 4 * Display Conditions under which to (not) show an ad … … 8 8 */ 9 9 class Advanced_Ads_Display_Conditions { 10 11 10 /** 12 11 * Advanced_Ads_Display_Conditions … … 250 249 $conditions = self::get_instance()->get_conditions(); 251 250 252 253 251 if ( isset( $options['in'] ) ) { 254 252 if ( 'global' === $options['in'] ) { 255 $conditions = array_filter( $conditions, function( $condition ) { 256 return ! isset( $condition['options']['global'] ) || $condition['options']['global']; 257 } ); 253 $conditions = array_filter( 254 $conditions, 255 function ( $condition ) { 256 return ! isset( $condition['options']['global'] ) || $condition['options']['global']; 257 } 258 ); 258 259 } elseif ( is_array( $options['in'] ) ) { 259 260 // Include already set condition types. … … 315 316 */ 316 317 public static function render_connector_option( $index, $value, $form_name ) { 317 318 318 $label = ( 'or' === $value ) ? __( 'or', 'advanced-ads' ) : __( 'and', 'advanced-ads' ); 319 319 … … 323 323 $rand = md5( $form_name ); 324 324 325 return '<input style="display:none;" type="checkbox" name="' . $name . '[connector]' . '" value="or" 326 id="advads-conditions-' . $index . '-connector-' . $rand . '"' . checked( 'or', $value, false ) . '> 327 <label for="advads-conditions-' . $index . '-connector-' . $rand . '">' . $label . '</label>'; 325 return sprintf( 326 "<input style='display:none' type='checkbox' name='%s[connector]' value='or' id='%s' %s><label for='%s'>%s</label>", 327 esc_attr( $name ), 328 esc_attr( "advads-conditions-$index-connector-$rand" ), 329 checked( 'or', $value, false ), 330 esc_attr( "advads-conditions-$index-connector-$rand" ), 331 esc_html( $label ) 332 ); 328 333 } 329 334 … … 335 340 */ 336 341 public static function render_type_field( $type, $name ) { 337 338 342 ?> 339 343 <input type="hidden" name="<?php echo esc_attr( $name ); ?>[type]" value="<?php echo esc_attr( $type ); ?>"/> 340 344 <?php 341 342 345 } 343 346 … … 396 399 ); 397 400 ?> 398 <div class="advads-conditions-single advads-buttonset"><?php 401 <div class="advads-conditions-single advads-buttonset"> 402 <?php 399 403 $type_label_counts = array_count_values( wp_list_pluck( $post_types, 'label' ) ); 400 404 … … 412 416 } 413 417 $field_id = "advads-conditions-$_type_id-$rand"; 414 ?><label class="button" for="<?php echo $field_id; 415 ?>"><?php echo $_label ?></label><input type="checkbox" 416 id="<?php echo $field_id; ?>" 417 name="<?php echo $name; ?>[value][]" <?php checked( $_val, 1 ); ?> 418 value="<?php echo $_type_id; ?>"><?php 418 printf( 419 "<label class='button' for='%s'>%s</label><input type='checkbox' id='%s' name='%s' %s value='%s'>", 420 esc_attr( $field_id ), 421 esc_html( $_label ), 422 esc_attr( $field_id ), 423 esc_attr( "{$name}[value][]" ), 424 checked( $_val, 1, false ), 425 esc_attr( $_type_id ) 426 ); 419 427 } 420 428 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; 421 429 ?> 422 </div><?php 430 </div> 431 <?php 423 432 } 424 433 … … 459 468 $args = [ 460 469 'orderby' => 'nicename', 461 'number' => $max_authors,462 470 ]; 463 471 if ( version_compare( get_bloginfo( 'version' ), '5.9' ) > -1 ) { … … 567 575 568 576 $field_id = "advads-conditions-$_taxonomy_id-$rand"; 569 ?><label class="button" for="<?php echo $field_id 570 ?>"><?php echo $_label ?></label><input type="checkbox" 571 id="<?php echo $field_id; ?>" 572 name="<?php echo $name; ?>[value][]" <?php checked( $_val, 1 ); ?> 573 value="<?php echo $_taxonomy_id; ?>"><?php 577 printf( 578 "<label class='button' for='%s'>%s</label><input type ='checkbox' id='%s' name='%s' %s value='%s'>", 579 esc_attr( $field_id ), 580 esc_html( $_label ), 581 esc_attr( $field_id ), 582 esc_attr( "{$name}[value][]" ), 583 checked( $_val, 1, false ), 584 esc_attr( $_taxonomy_id ) 585 ); 574 586 endforeach; 575 587 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; … … 586 598 * @param string $inputname name of the input field. 587 599 * @param int $max_terms maximum number of terms to show. 588 * @param int $index index of the conditions group.600 * @param int $index index of the conditions group. 589 601 * 590 602 * @return array|int|WP_Error 591 603 */ 592 604 public static function display_term_list( $taxonomy, $checked = [], $inputname = '', $max_terms = 50, $index = 0 ) { 593 594 605 $terms = get_terms( 595 606 $taxonomy->name, … … 622 633 } else { 623 634 ?> 624 <div class="advads-conditions-terms-buttons dynamic-search"></div><?php 635 <div class="advads-conditions-terms-buttons dynamic-search"></div> 636 <?php 625 637 } 626 ?><span class="advads-conditions-terms-show-search button" title="<?php 627 _ex( 'add more terms', 'display the terms search field on ad edit page', 'advanced-ads' ); 628 ?>">+</span><br/><input type="text" class="advads-conditions-terms-search" 629 data-tag-name="<?php echo $taxonomy->name; 630 ?>" data-input-name="<?php echo $inputname; ?>" 631 placeholder="<?php _e( 'term name or id', 'advanced-ads' ); ?>"/><?php 638 639 printf( 640 "<span class='advads-conditions-terms-show-search button' title='%s'>+</span><br>", 641 esc_attr_x( 'add more terms', 'display the terms search field on ad edit page', 'advanced-ads' ) 642 ); 643 printf( 644 "<input type='text' class='advads-conditions-terms-search' data-tag-name='%s' data-input-name='%s' placeholder='%s'>", 645 esc_attr( $taxonomy->name ), 646 esc_attr( $inputname ), 647 esc_attr__( 'term name or id', 'advanced-ads' ) 648 ); 632 649 else : 633 foreach ( $terms as $_term ) :650 foreach ( $terms as $_term ) { 634 651 $field_id = "advads-conditions-$_term->term_id-$rand"; 635 ?><input type="checkbox" id="<?php echo $field_id; ?>" name="<?php echo $inputname; ?>" 636 value="<?php echo $_term->term_id; ?>" <?php checked( in_array( $_term->term_id, $checked ), true ); 637 ?>><label for="<?php echo $field_id; ?>"><?php echo $_term->name; ?></label><?php 638 endforeach; 652 printf( 653 "<input type='checkbox' id='%s' name='%s' value='%s' %s><label for='%s'>%s</label>", 654 esc_attr( $field_id ), 655 esc_attr( $inputname ), 656 esc_attr( $_term->term_id ), 657 checked( in_array( $_term->term_id, $checked ), true, false ), 658 esc_attr( $field_id ), 659 esc_html( $_term->name ) 660 ); 661 } 639 662 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; 640 663 endif; … … 683 706 684 707 ]; 685 686 708 $the_query = new WP_Query( $args ); 687 709 while ( $the_query->have_posts() ) { … … 694 716 } 695 717 } 696 ?><span class="advads-conditions-postids-show-search button" <?php if ( ! count( $values ) ) { 697 echo 'style="display:none;"'; } ?>>+</span><p class="advads-conditions-postids-search-line"> 698 <input type="text" class="advads-display-conditions-individual-post" <?php if ( count( $values ) ) { 699 echo 'style="display:none;"'; 700 } ?> 701 placeholder="<?php _e( 'title or id', 'advanced-ads' ); ?>" 702 data-field-name="<?php echo $name; ?>"/><?php 703 wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false ); 704 ?></p></div><?php 718 printf( 719 "<span class='advads-conditions-postids-show-search button' style='%s'>+</span>", 720 empty( $values ) ? 'display:none;' : '' 721 ); 722 723 printf( 724 "<p class='advads-conditions-postids-search-line'><input type='text' class='advads-display-conditions-individual-post' style='%s' placeholder='%s' data-field-name='%s' />%s</p></div>", 725 ! empty( $values ) ? 'display:none;' : '', 726 esc_attr__( 'title or id', 'advanced-ads' ), 727 esc_attr( $name ), 728 wp_kses( 729 wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false, false ), 730 [ 731 'input' => [ 732 'type' => true, 733 'id' => true, 734 'name' => true, 735 'class' => true, 736 'value' => true, 737 ], 738 ] 739 ) 740 ); 705 741 // phpcs:enable 706 742 } … … 730 766 731 767 $rand = md5( $form_name ); 732 foreach ( $conditions as $_key => $_condition ) : 733 768 foreach ( $conditions as $_key => $_condition ) { 734 769 // activate by default. 735 $value = ( [] === $values || in_array( $_key, $values, true ) ) ? 1 : 0; 736 770 $value = ( [] === $values || in_array( $_key, $values, true ) ) ? 1 : 0; 737 771 $field_id = "advads-conditions-$_key-$rand"; 738 ?><input type="checkbox" id="<?php echo $field_id; ?>" name="<?php echo $name; ?>[value][]" 739 value="<?php echo $_key; ?>" <?php checked( 1, $value ); ?>><label 740 for="<?php echo $field_id; ?>"><?php echo $_condition['label']; ?></label><?php 741 endforeach; 772 printf( 773 "<input type='checkbox' id='%s' name='%s' %s value='%s'>", 774 esc_attr( $field_id ), 775 esc_attr( "{$name}[value][]" ), 776 checked( 1, $value, false ), 777 esc_attr( $_key ) 778 ); 779 printf( 780 "<label for='%s'>%s</label>", 781 esc_attr( $field_id ), 782 esc_html( $_condition['label'] ) 783 ); 784 785 } 742 786 include ADVADS_ABSPATH . 'admin/views/conditions/not-selected.php'; 743 ?></div><?php 744 return; 787 echo '</div>'; 745 788 } 746 789 … … 751 794 */ 752 795 public static function general_conditions() { 753 return $conditions = apply_filters( 'advanced-ads-display-conditions-general', 796 return apply_filters( 797 'advanced-ads-display-conditions-general', 754 798 [ 755 799 'is_front_page' => [ … … 793 837 'type' => 'radio', 794 838 ], 795 'is_rest_api' => [839 'is_rest_api' => [ 796 840 'label' => __( 'REST API', 'advanced-ads' ), 797 841 'description' => __( 'allow ads in REST API', 'advanced-ads' ), … … 810 854 */ 811 855 public static function metabox_content_age( $options, $index = 0, $form_name = '' ) { 812 if ( ! isset ( $options['type'] ) || '' === $options['type'] ) {856 if ( ! isset( $options['type'] ) || '' === $options['type'] ) { 813 857 return; 814 858 } … … 829 873 830 874 ?> 831 <select name="<?php echo $name; ?>[operator]">832 <option value="older_than" <?php selected( 'older_than', $operator ); ?>><?php _e( 'older than', 'advanced-ads' ); ?></option>833 <option value="younger_than" <?php selected( 'younger_than', $operator ); ?>><?php _e( 'younger than', 'advanced-ads' ); ?></option>875 <select name="<?php echo esc_attr( $name ); ?>[operator]"> 876 <option value="older_than" <?php selected( 'older_than', $operator ); ?>><?php esc_html_e( 'older than', 'advanced-ads' ); ?></option> 877 <option value="younger_than" <?php selected( 'younger_than', $operator ); ?>><?php esc_html_e( 'younger than', 'advanced-ads' ); ?></option> 834 878 </select> 835 879 … … 1101 1145 1102 1146 // check general conditions added by other add-ons. 1103 if ( null !== ( $result = apply_filters( 'advanced-ads-display-conditions-check-general', null, $options['value'] ) ) ) { 1147 $result = apply_filters( 'advanced-ads-display-conditions-check-general', null, $options['value'] ); 1148 if ( null !== ( $result ) ) { 1104 1149 return $result; 1105 1150 } … … 1124 1169 1125 1170 // check home page. 1126 if ( ( ( isset( $query['is_front_page'] ) && $query['is_front_page'] )1127 || ( isset( $query['is_home'] ) && $query['is_home'] ) )1128 && in_array( 'is_front_page', $options['value'], true )1171 if ( 1172 ( ( isset( $query['is_front_page'] ) && $query['is_front_page'] ) || ( isset( $query['is_home'] ) && $query['is_home'] ) ) 1173 && in_array( 'is_front_page', $options['value'], true ) 1129 1174 ) { 1130 1175 return true; 1131 } elseif ( isset( $query['is_front_page'] ) && $query['is_front_page'] && ( 1132 ! in_array( 'is_front_page', $options['value'], true ) 1133 ) ) { 1176 } elseif ( isset( $query['is_front_page'] ) && $query['is_front_page'] && ( ! in_array( 'is_front_page', $options['value'], true ) ) ) { 1134 1177 return false; 1135 1178 } … … 1138 1181 foreach ( self::$query_var_keys as $_type ) { 1139 1182 if ( 'is_main_query' !== $_type && isset( $query[ $_type ] ) && $query[ $_type ] && 1140 in_array( $_type, $options['value'], true ) ) {1183 in_array( $_type, $options['value'], true ) ) { 1141 1184 return true; 1142 1185 } … … 1155 1198 */ 1156 1199 public static function check_content_age( $options, Advanced_Ads_Ad $ad ) { 1157 global $post; 1200 $post = get_post(); 1201 1202 if ( ! $post 1203 && wp_doing_ajax() 1204 && isset( $_REQUEST['action'], $_REQUEST['theId'], $_REQUEST['isSingular'] ) 1205 && sanitize_key( $_REQUEST['action'] ) === 'advads_ad_select' 1206 && ( $_REQUEST['isSingular'] ) 1207 ) { 1208 $post = get_post( (int) $_REQUEST['theId'] ); 1209 } 1158 1210 1159 1211 $operator = ( isset( $options['operator'] ) && 'younger_than' === $options['operator'] ) ? 'younger_than' : 'older_than'; … … 1250 1302 } 1251 1303 // get conditions with rebased index keys. 1252 $conditions = array_values( $options['conditions'] ); 1253 $query = $options['wp_the_query']; 1254 $post = isset( $options['post'] ) ? $options['post'] : null; 1255 1256 1304 $conditions = array_values( $options['conditions'] ); 1305 $query = $options['wp_the_query']; 1306 $post = isset( $options['post'] ) ? $options['post'] : null; 1257 1307 $last_result = false; 1258 1308 $length = count( $conditions ); 1259 1309 1260 for ( $i = 0; $i < $length; ++ $i ) {1310 for ( $i = 0; $i < $length; ++$i ) { 1261 1311 $_condition = current( $conditions ); 1262 1312 $next = next( $conditions ); … … 1273 1323 $next_tax = ( isset( $next['type'] ) && isset( $this->conditions[ $next['type'] ]['taxonomy'] ) ) ? $this->conditions[ $next['type'] ]['taxonomy'] : false; 1274 1324 if ( $tax && $next_tax && $next_key 1275 && $next_tax === $tax 1276 && ( ! isset( $next['connector'] ) || 'or' !== $next['connector'] ) 1277 && 'is' === $_condition['operator'] && 'is' === $next['operator'] 1278 && $_condition['type'] !== $next['type'] ) { 1279 $next['connector'] = 'or'; 1280 $conditions[ $next_key ]['connector'] = 'or'; 1325 && $next_tax === $tax 1326 && ( ! isset( $next['connector'] ) || 'or' !== $next['connector'] ) 1327 && 'is' === $_condition['operator'] && 'is' === $next['operator'] 1328 && $_condition['type'] !== $next['type'] 1329 ) { 1330 $next['connector'] = 'or'; 1331 $conditions[ $next_key ]['connector'] = 'or'; 1281 1332 } 1282 1333 … … 1418 1469 public static function modify_post_search_sql( $sql ) { 1419 1470 global $wpdb; 1420 1421 // $sql = preg_replace_callback( "/{$wpdb->posts}.post_(content|excerpt)( NOT)? LIKE '%(.*?)%'/", array( 'Advanced_Ads_Display_Conditions', 'modify_post_search_sql_callback' ), $sql );1422 1423 1471 // removes the search in content and excerpt columns. 1424 1472 $sql = preg_replace( "/OR \({$wpdb->posts}.post_(content|excerpt)( NOT)? LIKE '(.*?)'\)/", '', $sql ); … … 1447 1495 } 1448 1496 } 1449 1450 1497 } -
advanced-ads/trunk/classes/frontend_checks.php
r3005553 r3029416 1 1 <?php 2 2 // phpcs:ignoreFile 3 4 use AdvancedAds\Assets_Registry; 3 5 use AdvancedAds\Utilities\WordPress; 4 6 … … 48 50 if ( Advanced_Ads_Ad_Health_Notices::notices_enabled() ) { 49 51 add_action( 'body_class', [ $this, 'body_class' ] ); 52 } 53 54 if( $this->has_adblocker_placements() ) { 55 if ( ! Assets_Registry::script_is('find-adblocker', 'enqueued') ) { 56 Assets_Registry::enqueue_script('find-adblocker'); 57 } 50 58 } 51 59 } … … 1117 1125 return false; 1118 1126 } 1127 1128 /** 1129 * Check if atleast one placement uses `adblocker item`. 1130 * 1131 * @return bool True/False. 1132 */ 1133 private function has_adblocker_placements() { 1134 $placements = Advanced_Ads::get_instance()->get_model()->get_ad_placements_array(); 1135 foreach ($placements as $placement) { 1136 if (!empty($placement['options']['item_adblocker'])) { 1137 return true; 1138 } 1139 } 1140 1141 return false; 1142 } 1119 1143 } -
advanced-ads/trunk/classes/plugin.php
r2986093 r3029416 215 215 } 216 216 217 $frontend_prefix = $this->get_frontend_prefix(); 218 217 219 ob_start(); 218 220 ?> 219 <script id="<?php echo esc_attr( $ this->get_frontend_prefix()); ?>ready">221 <script id="<?php echo esc_attr( $frontend_prefix ); ?>ready"> 220 222 <?php 221 223 readfile( sprintf( … … 227 229 </script> 228 230 <?php 231 232 /** 233 * Print inline script in the page header form add-ons. 234 * 235 * @param string $frontend_prefix the prefix used for Advanced Ads related HTML ID-s and classes. 236 */ 237 do_action( 'advanced_ads_inline_header_scripts', $frontend_prefix ); 229 238 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaping would break the HTML 230 239 echo Advanced_Ads_Utils::get_inline_asset( ob_get_clean() ); -
advanced-ads/trunk/includes/admin/class-assets.php
r3005553 r3029416 64 64 // TODO: add conditional loading. 65 65 Assets_Registry::enqueue_script( 'admin-global' ); 66 Assets_Registry::enqueue_script( ' admin-find-adblocker' );66 Assets_Registry::enqueue_script( 'find-adblocker' ); 67 67 68 68 $params = [ -
advanced-ads/trunk/includes/class-assets-registry.php
r2983598 r3029416 53 53 54 54 /** 55 * Determines whether a script has been added to the queue. 56 * 57 * @param string $handle Name of the script. 58 * @param string $status Optional. Status of the script to check. Default 'enqueued'. 59 * Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'. 60 * 61 * @return bool 62 */ 63 public static function script_is( $handle, $status = 'enqueued' ): bool { 64 return wp_script_is( self::prefix_it( $handle ), $status ); 65 } 66 67 /** 55 68 * Hook into WordPress. 56 69 * … … 59 72 public function hooks(): void { 60 73 add_action( 'admin_enqueue_scripts', [ $this, 'register_assets' ], 0 ); 74 add_action( 'wp_enqueue_scripts', [ $this, 'register_assets' ], 0 ); 61 75 } 62 76 … … 89 103 public function register_scripts(): void { 90 104 $this->register_script( 'admin-global', 'admin/assets/js/admin-global.js', [ 'jquery' ], false, true ); 91 $this->register_script( ' admin-find-adblocker', 'admin/assets/js/advertisement.js' );105 $this->register_script( 'find-adblocker', 'admin/assets/js/advertisement.js' ); 92 106 $this->register_script( 'ui', 'admin/assets/js/ui.js', [ 'jquery' ] ); 93 107 $this->register_script( 'conditions', 'admin/assets/js/conditions.js', [ 'jquery', self::prefix_it( 'ui' ) ] ); -
advanced-ads/trunk/languages/advanced-ads.pot
r3006148 r3029416 1 # Copyright (C) 202 3Advanced Ads GmbH1 # Copyright (C) 2024 Advanced Ads GmbH 2 2 # This file is distributed under the GPL-2.0+. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Advanced Ads 1.48. 0\n"5 "Project-Id-Version: Advanced Ads 1.48.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads/\n" 7 7 "Last-Translator: Thomas Maier <[email protected]>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 3-12-06T11:22:58+00:00\n"12 "POT-Creation-Date: 2024-01-31T11:13:51+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.6.0\n" … … 85 85 #. translators: %s is empty here, but the string will be followed by a name of an ad unit. 86 86 #: admin/includes/ad-health-notices.php:112 87 #: classes/frontend_checks.php:2 7287 #: classes/frontend_checks.php:280 88 88 msgid "Visible ads should not use the Header placement: %s" 89 89 msgstr "" … … 91 91 #: admin/includes/ad-health-notices.php:123 92 92 #: classes/ad-debug.php:272 93 #: classes/frontend_checks.php:2 5993 #: classes/frontend_checks.php:267 94 94 msgid "Your website is using HTTPS, but the ad code contains HTTP and might not work." 95 95 msgstr "" … … 293 293 294 294 #: admin/includes/class-ad-type.php:953 295 #: classes/frontend_checks.php:5 39295 #: classes/frontend_checks.php:547 296 296 msgid "Get help" 297 297 msgstr "" … … 482 482 #: admin/views/settings/general/disable-notices.php:14 483 483 #: classes/ad_type_plain.php:255 484 #: classes/display-conditions.php:8 43484 #: classes/display-conditions.php:887 485 485 #: modules/ads-txt/admin/views/setting-create.php:12 486 486 #: modules/privacy/admin/views/setting-general.php:34 … … 511 511 msgstr "" 512 512 513 #: admin/includes/class-meta-box.php:26 7513 #: admin/includes/class-meta-box.php:268 514 514 #: admin/includes/class-overview-widgets.php:64 515 515 msgid "Disable" 516 516 msgstr "" 517 517 518 #: admin/includes/class-meta-box.php:4 29518 #: admin/includes/class-meta-box.php:430 519 519 msgid "Ad Settings" 520 520 msgstr "" 521 521 522 #: admin/includes/class-meta-box.php:52 8522 #: admin/includes/class-meta-box.php:529 523 523 #: includes/admin/pages/class-dashboard.php:33 524 524 #: includes/admin/pages/class-dashboard.php:44 … … 528 528 529 529 #. translators: %1$d is the number of ads, %2$s and %3$s are URLs. 530 #: admin/includes/class-meta-box.php:54 4530 #: admin/includes/class-meta-box.php:545 531 531 msgid "%1$d ads – <a href=\"%2$s\">manage</a> - <a href=\"%3$s\">new</a>" 532 532 msgstr "" 533 533 534 #: admin/includes/class-meta-box.php:55 7534 #: admin/includes/class-meta-box.php:558 535 535 msgid "Get the tutorial via email" 536 536 msgstr "" 537 537 538 #: admin/includes/class-meta-box.php:56 6538 #: admin/includes/class-meta-box.php:567 539 539 msgid "Get AdSense tips via email" 540 540 msgstr "" 541 541 542 #: admin/includes/class-meta-box.php:57 5542 #: admin/includes/class-meta-box.php:576 543 543 msgid "Visit our blog for more articles about ad optimization" 544 544 msgstr "" 545 545 546 546 #. translators: %s is our URL. 547 #: admin/includes/class-meta-box.php:63 0547 #: admin/includes/class-meta-box.php:631 548 548 msgid "Latest posts on wpadvancedads.com" 549 549 msgstr "" … … 1257 1257 msgstr "" 1258 1258 1259 #. translators: %1$d is the number of elements in the list and %2$s a URL. 1260 #: admin/views/conditions/condition-author.php:41 1261 msgid "Only %1$d elements are displayed above. Use the <code>advanced-ads-admin-max-terms</code> filter to change this limit according to <a href=\"%2$s\" target=\"_blank\">this page</a>." 1259 #: admin/views/conditions/condition-author.php:37 1260 msgctxt "display the authors search field on ad edit page" 1261 msgid "add more authors" 1262 msgstr "" 1263 1264 #: admin/views/conditions/condition-author.php:43 1265 msgid "author name or id" 1262 1266 msgstr "" 1263 1267 … … 1690 1694 1691 1695 #: admin/views/settings/general/block-bots.php:11 1692 #: classes/frontend_checks.php:13 01696 #: classes/frontend_checks.php:138 1693 1697 msgid "You look like a bot" 1694 1698 msgstr "" … … 2060 2064 2061 2065 #. translators: %s is a URL. 2062 #: classes/ad_ajax_callbacks.php:2 622066 #: classes/ad_ajax_callbacks.php:296 2063 2067 msgid "An error occurred. Please use <a href=\"%s\" target=\"_blank\">this form</a> to sign up." 2064 2068 msgstr "" … … 2302 2306 msgstr "" 2303 2307 2308 #: classes/display-conditions.php:88 2309 msgid "post type" 2310 msgstr "" 2311 2304 2312 #: classes/display-conditions.php:89 2305 msgid "post type"2306 msgstr ""2307 2308 #: classes/display-conditions.php:902309 2313 #: includes/array_ad_conditions.php:40 2310 2314 msgid "Choose the public post types on which to display the ad." 2311 2315 msgstr "" 2312 2316 2317 #: classes/display-conditions.php:95 2318 msgid "specific pages" 2319 msgstr "" 2320 2313 2321 #: classes/display-conditions.php:96 2314 msgid "specific pages"2315 msgstr ""2316 2317 #: classes/display-conditions.php:972318 2322 #: includes/array_ad_conditions.php:58 2319 2323 msgid "Choose on which individual posts, pages and public post type pages you want to display or hide ads." 2320 2324 msgstr "" 2321 2325 2322 #: classes/display-conditions.php:10 32326 #: classes/display-conditions.php:102 2323 2327 msgid "general conditions" 2324 2328 msgstr "" 2325 2329 2326 #: classes/display-conditions.php:10 92330 #: classes/display-conditions.php:108 2327 2331 msgid "author" 2328 2332 msgstr "" 2329 2333 2334 #: classes/display-conditions.php:114 2335 msgid "content age" 2336 msgstr "" 2337 2330 2338 #: classes/display-conditions.php:115 2331 msgid "content age"2332 msgstr ""2333 2334 #: classes/display-conditions.php:1162335 2339 msgid "Display ads based on age of the page." 2336 2340 msgstr "" 2337 2341 2342 #: classes/display-conditions.php:121 2343 msgid "taxonomy" 2344 msgstr "" 2345 2338 2346 #: classes/display-conditions.php:122 2339 msgid "taxonomy"2340 msgstr ""2341 2342 #: classes/display-conditions.php:1232343 2347 msgid "Display ads based on the taxonomy of an archive page." 2344 2348 msgstr "" 2345 2349 2346 2350 #. translators: %s is a label of an archive page. 2347 #: classes/display-conditions.php:17 12351 #: classes/display-conditions.php:170 2348 2352 msgid "archive: %s" 2349 2353 msgstr "" 2350 2354 2351 #: classes/display-conditions.php:28 72355 #: classes/display-conditions.php:288 2352 2356 msgid "parent page" 2353 2357 msgstr "" 2354 2358 2355 #: classes/display-conditions.php:28 82359 #: classes/display-conditions.php:289 2356 2360 msgid "post meta" 2357 2361 msgstr "" 2358 2362 2359 #: classes/display-conditions.php:2 892363 #: classes/display-conditions.php:290 2360 2364 msgid "page template" 2361 2365 msgstr "" 2362 2366 2363 #: classes/display-conditions.php:29 02367 #: classes/display-conditions.php:291 2364 2368 msgid "url parameters" 2365 2369 msgstr "" 2366 2370 2367 #: classes/display-conditions.php:29 32371 #: classes/display-conditions.php:294 2368 2372 msgid "accelerated mobile pages" 2369 2373 msgstr "" … … 2384 2388 msgstr "" 2385 2389 2386 #: classes/display-conditions.php:6 272390 #: classes/display-conditions.php:641 2387 2391 msgctxt "display the terms search field on ad edit page" 2388 2392 msgid "add more terms" 2389 2393 msgstr "" 2390 2394 2391 #: classes/display-conditions.php:6 312395 #: classes/display-conditions.php:647 2392 2396 msgid "term name or id" 2393 2397 msgstr "" 2394 2398 2395 #: classes/display-conditions.php:7 012399 #: classes/display-conditions.php:726 2396 2400 msgid "title or id" 2397 2401 msgstr "" 2398 2402 2399 #: classes/display-conditions.php: 7562403 #: classes/display-conditions.php:800 2400 2404 #: includes/array_ad_conditions.php:63 2401 2405 msgid "Home Page" 2402 2406 msgstr "" 2403 2407 2404 #: classes/display-conditions.php: 7572408 #: classes/display-conditions.php:801 2405 2409 #: includes/array_ad_conditions.php:64 2406 2410 msgid "show on Home page" 2407 2411 msgstr "" 2408 2412 2409 #: classes/display-conditions.php: 7612413 #: classes/display-conditions.php:805 2410 2414 #: includes/array_ad_conditions.php:68 2411 2415 msgid "Singular Pages" 2412 2416 msgstr "" 2413 2417 2414 #: classes/display-conditions.php: 7622418 #: classes/display-conditions.php:806 2415 2419 #: includes/array_ad_conditions.php:69 2416 2420 msgid "show on singular pages/posts" 2417 2421 msgstr "" 2418 2422 2419 #: classes/display-conditions.php: 7662423 #: classes/display-conditions.php:810 2420 2424 #: includes/array_ad_conditions.php:73 2421 2425 msgid "Archive Pages" 2422 2426 msgstr "" 2423 2427 2424 #: classes/display-conditions.php: 7672428 #: classes/display-conditions.php:811 2425 2429 #: includes/array_ad_conditions.php:74 2426 2430 msgid "show on any type of archive page (category, tag, author and date)" 2427 2431 msgstr "" 2428 2432 2429 #: classes/display-conditions.php: 7712433 #: classes/display-conditions.php:815 2430 2434 #: includes/array_ad_conditions.php:78 2431 2435 msgid "Search Results" 2432 2436 msgstr "" 2433 2437 2434 #: classes/display-conditions.php: 7722438 #: classes/display-conditions.php:816 2435 2439 #: includes/array_ad_conditions.php:79 2436 2440 msgid "show on search result pages" 2437 2441 msgstr "" 2438 2442 2439 #: classes/display-conditions.php: 7762443 #: classes/display-conditions.php:820 2440 2444 #: includes/array_ad_conditions.php:83 2441 2445 msgid "404 Page" 2442 2446 msgstr "" 2443 2447 2444 #: classes/display-conditions.php: 7772448 #: classes/display-conditions.php:821 2445 2449 #: includes/array_ad_conditions.php:84 2446 2450 msgid "show on 404 error page" 2447 2451 msgstr "" 2448 2452 2449 #: classes/display-conditions.php: 7812453 #: classes/display-conditions.php:825 2450 2454 #: includes/array_ad_conditions.php:88 2451 2455 msgid "Attachment Pages" 2452 2456 msgstr "" 2453 2457 2454 #: classes/display-conditions.php: 7822458 #: classes/display-conditions.php:826 2455 2459 #: includes/array_ad_conditions.php:89 2456 2460 msgid "show on attachment pages" 2457 2461 msgstr "" 2458 2462 2459 #: classes/display-conditions.php: 7862463 #: classes/display-conditions.php:830 2460 2464 #: includes/array_ad_conditions.php:93 2461 2465 msgid "Secondary Queries" 2462 2466 msgstr "" 2463 2467 2464 #: classes/display-conditions.php: 7872468 #: classes/display-conditions.php:831 2465 2469 #: includes/array_ad_conditions.php:94 2466 2470 msgid "allow ads in secondary queries" 2467 2471 msgstr "" 2468 2472 2469 #: classes/display-conditions.php: 7912473 #: classes/display-conditions.php:835 2470 2474 msgid "RSS Feed" 2471 2475 msgstr "" 2472 2476 2473 #: classes/display-conditions.php: 7922477 #: classes/display-conditions.php:836 2474 2478 msgid "allow ads in RSS Feed" 2475 2479 msgstr "" 2476 2480 2477 #: classes/display-conditions.php: 7962481 #: classes/display-conditions.php:840 2478 2482 msgid "REST API" 2479 2483 msgstr "" 2480 2484 2481 #: classes/display-conditions.php: 7972485 #: classes/display-conditions.php:841 2482 2486 msgid "allow ads in REST API" 2483 2487 msgstr "" 2484 2488 2485 #: classes/display-conditions.php:8 322489 #: classes/display-conditions.php:876 2486 2490 msgid "older than" 2487 2491 msgstr "" 2488 2492 2489 #: classes/display-conditions.php:8 332493 #: classes/display-conditions.php:877 2490 2494 msgid "younger than" 2491 2495 msgstr "" 2492 2496 2493 #: classes/display-conditions.php:8 382497 #: classes/display-conditions.php:882 2494 2498 msgid "days" 2495 2499 msgstr "" 2496 2500 2497 #: classes/display-conditions.php:8 412501 #: classes/display-conditions.php:885 2498 2502 msgid "Display ads based on the age of a page or post." 2499 2503 msgstr "" … … 2551 2555 msgstr "" 2552 2556 2553 #: classes/frontend_checks.php:1 152557 #: classes/frontend_checks.php:123 2554 2558 msgid "Random AdSense ads" 2555 2559 msgstr "" 2556 2560 2557 #: classes/frontend_checks.php:1 442561 #: classes/frontend_checks.php:152 2558 2562 msgid "Ad blocker enabled" 2559 2563 msgstr "" 2560 2564 2561 #: classes/frontend_checks.php:1 562565 #: classes/frontend_checks.php:164 2562 2566 msgid "<em>%s</em> filter does not exist" 2563 2567 msgstr "" 2564 2568 2565 #: classes/frontend_checks.php:1 722569 #: classes/frontend_checks.php:180 2566 2570 msgid "Ads are disabled in the content of this page" 2567 2571 msgstr "" 2568 2572 2569 #: classes/frontend_checks.php:1 842573 #: classes/frontend_checks.php:192 2570 2574 msgid "the current post ID is 0 " 2571 2575 msgstr "" 2572 2576 2573 #: classes/frontend_checks.php:2 032577 #: classes/frontend_checks.php:211 2574 2578 msgid "Ads are disabled on this page" 2575 2579 msgstr "" 2576 2580 2577 #: classes/frontend_checks.php:2 172581 #: classes/frontend_checks.php:225 2578 2582 msgid "Ads are disabled on all pages" 2579 2583 msgstr "" 2580 2584 2581 #: classes/frontend_checks.php:2 322585 #: classes/frontend_checks.php:240 2582 2586 msgid "Ads are disabled on 404 pages" 2583 2587 msgstr "" 2584 2588 2585 #: classes/frontend_checks.php:2 462589 #: classes/frontend_checks.php:254 2586 2590 msgid "Ads are disabled on non singular pages" 2587 2591 msgstr "" 2588 2592 2589 #: classes/frontend_checks.php:26 02593 #: classes/frontend_checks.php:268 2590 2594 msgid "Ad IDs: %s" 2591 2595 msgstr "" 2592 2596 2593 #: classes/frontend_checks.php:2 882597 #: classes/frontend_checks.php:296 2594 2598 msgid "AdSense violation" 2595 2599 msgstr "" 2596 2600 2597 #: classes/frontend_checks.php:2 892601 #: classes/frontend_checks.php:297 2598 2602 msgid "Ad is hidden" 2599 2603 msgstr "" 2600 2604 2601 #: classes/frontend_checks.php:29 02605 #: classes/frontend_checks.php:298 2602 2606 msgid "IDs: %s" 2603 2607 msgstr "" 2604 2608 2605 #: classes/frontend_checks.php:3 062609 #: classes/frontend_checks.php:314 2606 2610 msgid "The following responsive AdSense ads are not showing up: %s" 2607 2611 msgstr "" 2608 2612 2609 #: classes/frontend_checks.php:3 232613 #: classes/frontend_checks.php:331 2610 2614 msgid "Consent not given" 2611 2615 msgstr "" 2612 2616 2613 #: classes/frontend_checks.php:34 02617 #: classes/frontend_checks.php:348 2614 2618 msgid "Enable TCF integration" 2615 2619 msgstr "" 2616 2620 2617 #: classes/frontend_checks.php:3 552621 #: classes/frontend_checks.php:363 2618 2622 msgid "Debug Google Ad Manager" 2619 2623 msgstr "" 2620 2624 2621 #: classes/frontend_checks.php:3 722625 #: classes/frontend_checks.php:380 2622 2626 msgid "highlight ads" 2623 2627 msgstr "" 2624 2628 2625 #: classes/frontend_checks.php: 4922629 #: classes/frontend_checks.php:500 2626 2630 msgid "Ad Health" 2627 2631 msgstr "" 2628 2632 2629 #: classes/frontend_checks.php:5 072633 #: classes/frontend_checks.php:515 2630 2634 msgid "Show %d more notifications" 2631 2635 msgstr "" 2632 2636 2633 #: classes/frontend_checks.php:5 262637 #: classes/frontend_checks.php:534 2634 2638 msgid "Everything is fine" 2635 2639 msgstr "" 2636 2640 2637 #: classes/frontend_checks.php: 5972641 #: classes/frontend_checks.php:605 2638 2642 msgid "the following code is used for automatic error detection and only visible to admins" 2639 2643 msgstr "" … … 3280 3284 msgstr "" 3281 3285 3282 #: modules/adblock-finder/admin/views/setting-ga.php:1 03286 #: modules/adblock-finder/admin/views/setting-ga.php:12 3283 3287 msgid "Google Analytics Tracking ID" 3284 3288 msgstr "" 3285 3289 3286 #: modules/adblock-finder/admin/views/setting-ga.php:14 3287 msgid "Do you want to know how many of your visitors are using an ad blocker? Enter your Google Analytics property ID above to count them." 3288 msgstr "" 3289 3290 #. translators: 1: is an example id for Universal Analytics <code>UA-123456-1</code>, 2: is an example id for GA4 '<code>G-A12BC3D456</code>' 3290 #. translators: %s is demo GA4 ID. 3291 3291 #: modules/adblock-finder/admin/views/setting-ga.php:19 3292 msgid " %1$s for Universal Analytics or %2$s for Google Analytics 4."3292 msgid "Do you want to know how many visitors use an ad blocker? Enter your Google Analytics property ID (%s) above to count them." 3293 3293 msgstr "" 3294 3294 -
advanced-ads/trunk/modules/adblock-finder/admin/views/setting-ga.php
r2609369 r3029416 3 3 * Input for Google Analytics property ID. 4 4 * 5 * @package Advanced_Ads_Admin 5 6 * @var string $ga_uid Google Analytics property ID 6 7 */ 8 7 9 ?> 8 10 <label> … … 12 14 13 15 <p class="description"> 14 <?php esc_html_e( 'Do you want to know how many of your visitors are using an ad blocker? Enter your Google Analytics property ID above to count them.', 'advanced-ads' ); ?>15 <br>16 16 <?php 17 17 printf( 18 /* translators: 1: is an example id for Universal Analytics <code>UA-123456-1</code>, 2: is an example id for GA4 '<code>G-A12BC3D456</code>' */ 19 esc_html__( '%1$s for Universal Analytics or %2$s for Google Analytics 4.', 'advanced-ads' ), 20 '<code>UA-123456-1</code>', 18 // translators: %s is demo GA4 ID. 19 esc_html__( 20 'Do you want to know how many visitors use an ad blocker? Enter your Google Analytics property ID (%s) above to count them.', 21 'advanced-ads' 22 ), 21 23 '<code>G-A12BC3D456</code>' 22 24 ); -
advanced-ads/trunk/modules/adblock-finder/public/adblocker-enabled.js
r2587606 r3029416 2 2 * Check if an ad blocker is enabled. 3 3 * 4 * @param {function}callback A callback function that is executed after the check has been done.5 * The 'is_enabled' (bool) variable is passed as the callback's first argument.4 * @param function callback A callback function that is executed after the check has been done. 5 * The 'isEnabled' (bool) variable is passed as the callback's first argument. 6 6 */ 7 window.advanced_ads_check_adblocker = ( function ( callback) {8 var pending_callbacks = [];9 var is_enabled= null;7 window.advanced_ads_check_adblocker = (function (callback) { 8 let pendingCallbacks = []; 9 let isEnabled = null; 10 10 11 function RAF( RAF_callback ) { 12 var fn = window.requestAnimationFrame 13 || window.mozRequestAnimationFrame 14 || window.webkitRequestAnimationFrame 15 || function ( RAF_callback ) { 16 return setTimeout( RAF_callback, 16 ); 11 function RAF(RAF_callback) { 12 const fn = 13 window.requestAnimationFrame || 14 window.mozRequestAnimationFrame || 15 window.webkitRequestAnimationFrame || 16 function (RAF_callback) { 17 return setTimeout(RAF_callback, 16); 17 18 }; 18 19 19 fn.call( window, RAF_callback);20 fn.call(window, RAF_callback); 20 21 } 21 22 22 RAF( function () {23 RAF(function () { 23 24 // Create a bait. 24 var ad = document.createElement( 'div');25 const ad = document.createElement('div'); 25 26 ad.innerHTML = ' '; 26 ad.setAttribute( 'class', 'ad_unit ad-unit text-ad text_ad pub_300x250' ); 27 ad.setAttribute( 'style', 'width: 1px !important; height: 1px !important; position: absolute !important; left: 0px !important; top: 0px !important; overflow: hidden !important;' ); 28 document.body.appendChild( ad ); 27 ad.setAttribute('class', 'ad_unit ad-unit text-ad text_ad pub_300x250'); 28 ad.setAttribute( 29 'style', 30 'width: 1px !important; height: 1px !important; position: absolute !important; left: 0px !important; top: 0px !important; overflow: hidden !important;' 31 ); 32 document.body.appendChild(ad); 29 33 30 RAF( function () {31 var styles = window.getComputedStyle && window.getComputedStyle( ad);32 var moz_binding = styles && styles.getPropertyValue( '-moz-binding');34 RAF(function () { 35 const styles = window.getComputedStyle?.(ad); 36 const mozBinding = styles?.getPropertyValue('-moz-binding'); 33 37 34 is_enabled = ( styles && styles.getPropertyValue( 'display' ) === 'none' ) 35 || ( typeof moz_binding === 'string' && moz_binding.indexOf( 'about:' ) !== - 1 ); 38 isEnabled = 39 (styles && styles.getPropertyValue('display') === 'none') || 40 (typeof mozBinding === 'string' && 41 mozBinding.indexOf('about:') !== -1); 36 42 37 43 // Call pending callbacks. 38 for ( var i = 0, length = pending_callbacks.length; i < length; i ++) {39 pending _callbacks[i]( is_enabled);44 for (var i = 0, length = pendingCallbacks.length; i < length; i++) { 45 pendingCallbacks[i](isEnabled); 40 46 } 41 pending _callbacks = [];42 } );43 } );47 pendingCallbacks = []; 48 }); 49 }); 44 50 45 return function ( callback ) { 46 if ( is_enabled === null ) { 47 pending_callbacks.push( callback ); 51 return function (callback) { 52 if ('undefined' === typeof advanced_ads_adblocker_test) { 53 isEnabled = true; 54 } 55 if (isEnabled === null) { 56 pendingCallbacks.push(callback); 48 57 return; 49 58 } 50 59 // Run the callback immediately 51 callback( is_enabled);60 callback(isEnabled); 52 61 }; 53 } ());62 })(); -
advanced-ads/trunk/modules/adblock-finder/public/adblocker-enabled.min.js
r2983598 r3029416 1 window.advanced_ads_check_adblocker=function(t){var n=[],e=null;function i(t){var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)};n.call(window,t)}return i((function(){var t=document.createElement("div");t.innerHTML=" ",t.setAttribute("class","ad_unit ad-unit text-ad text_ad pub_300x250"),t.setAttribute("style","width: 1px !important; height: 1px !important; position: absolute !important; left: 0px !important; top: 0px !important; overflow: hidden !important;"),document.body.appendChild(t),i((function(){var i =window.getComputedStyle&&window.getComputedStyle(t),o=i&&i.getPropertyValue("-moz-binding");e=i&&"none"===i.getPropertyValue("display")||"string"==typeof o&&-1!==o.indexOf("about:");for(var a=0,r=n.length;a<r;a++)n[a](e);n=[]}))})),function(t){null!==e?t(e):n.push(t)}}();1 window.advanced_ads_check_adblocker=function(t){var n=[],e=null;function i(t){var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)};n.call(window,t)}return i((function(){var t=document.createElement("div");t.innerHTML=" ",t.setAttribute("class","ad_unit ad-unit text-ad text_ad pub_300x250"),t.setAttribute("style","width: 1px !important; height: 1px !important; position: absolute !important; left: 0px !important; top: 0px !important; overflow: hidden !important;"),document.body.appendChild(t),i((function(){var i,o,a=null===(i=(o=window).getComputedStyle)||void 0===i?void 0:i.call(o,t),d=null==a?void 0:a.getPropertyValue("-moz-binding");e=a&&"none"===a.getPropertyValue("display")||"string"==typeof d&&-1!==d.indexOf("about:");for(var r=0,u=n.length;r<u;r++)n[r](e);n=[]}))})),function(t){"undefined"==typeof advanced_ads_adblocker_test&&(e=!0),null!==e?t(e):n.push(t)}}(); -
advanced-ads/trunk/readme.txt
r3006148 r3029416 5 5 Tested up to: 6.4 6 6 Requires PHP: 7.2 7 Stable tag: 1.4 8.17 Stable tag: 1.49.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 13 13 == Description == 14 14 15 Are you looking for a simple ad manager plugin? These are the top arguments to use Advanced Ads: 16 17 * approved in publishing and ad optimization since 2009 18 * works with all ad types and networks, including Google AdSense, Google Ad Manager (formerly Google DoubleClick for Publishers, DFP), Amazon ads, or media.net ads 19 * most features to test and optimize ads 20 * unlimited ad units 21 * ads.txt support 22 * dedicated ad block for the block editor 23 * Google AdSense Partner, who implements all technical changes early and in 100% compliance with the Google AdSense policies 24 * the only advertising solution with *Ad Health* integration and Google AdSense violation checks 25 * best rated [free support](https://wordpress.org/support/plugin/advanced-ads) 15 = The ultimate ad management plugin for WordPress = 16 17 Advanced Ads is the most comprehensive ad management tool available. It strikes the perfect balance between ease of use and powerful features, trusted by thousands of companies and businesses. 18 19 We took the pain out of advertising and made it easy to embed ads, banners, or any other code automatically—all within minutes and without the need for theme file editing. If you are looking for the best plugin for ad management, you have found it. 20 21 [Manual](https://wpadvancedads.com/manual/?utm_source=wporg&utm_medium=link&utm_campaign=wp-linkbar-manual) | [Support](https://wpadvancedads.com/aa-links/support) | [Demo](https://wpadvancedads.com/aa-links/demo) | [Premium Features](https://wpadvancedads.com/add-ons/all-access/?utm_source=wporg&utm_medium=link&utm_campaign=wp-linkbar-features) 22 23 * <strong>Usability:</strong> Clearly structured interface • Smart workflows for fluid day-to-day operations 24 * <strong>Functionality:</strong> Setting the gold standard for the market with outstanding features 25 * <strong>Compatibility:</strong> All ad networks • Dedicated integrations with loads of popular plugins and themes 26 * <strong>Expertise:</strong> Fast and top-rated support • Approved in publishing and ad optimization since 2009 27 * <strong>Reputation:</strong> Recommended by Google • Fully compliant with Google AdSense policies 28 29 Would you like to know if there is a certain feature, what the optimized setup would be, or how to implement your client’s demands? Just [open a thread in the forum](https://wordpress.org/support/plugin/advanced-ads#new-post)! 26 30 27 31 This is what our users are saying about Advanced Ads: 28 32 29 > We use this plugin to deliver rotating ads on a community news site, and it’s great. Both feature-rich and reliable, your imagination is the limit when it comes to the product you want to create for your users. We’ve delivered over a million ad impressions since we launched less than a year ago, using a combination of sidebar, top, sticky and in-content placements — both HTML5 and images. Advanced Ads makes it easy for our small team to deliver a good experience to our users and our advertisers. 30 > mytown304 on wp.org 31 32 Would you like to know if there is a certain feature, what the optimized setup would be, or how to implement your client’s demands? Just [open a thread in the forum](https://wordpress.org/support/plugin/advanced-ads#new-post)! 33 34 Advanced Ads allowed us to grow from 0 to 100 MM monthly ad impressions. Benefit from our experience as a publisher and monetize your website today! 35 36 > **Advanced Ads All Access** 37 >This plugin is the lite version of the Advanced Ads plugin that comes with all the features you will ever need to optimize your ads and increase your revenues, including advanced ad targeting, split tests, click fraud protection, lazy loading, background, popups and sticky ads, full AMP support, adblocker detection, the most comfortable Google Ad Manager integration, and tons more. [Click here to purchase the best premium WordPress ad management plugin now!](https://wpadvancedads.com/add-ons/all-access/?utm_source=wporg&utm_medium=link&utm_campaign=wp-all-access) 33 > We use this plugin to deliver rotating ads on a community news site, and it’s great. We’ve delivered over a million ad impressions since we launched less than a year ago, using a combination of sidebar, top, sticky and in-content placements — both HTML5 and images. Advanced Ads makes it easy for our small team to deliver a good experience to our users and our advertisers. 34 > <i>mytown304 on wp.org</i> 35 36 Advanced Ads allowed our founder to grow from 0 to 100 MM monthly ad impressions. Benefit from our experience as publishers and monetize your website today! 37 38 = Premium Features = 39 This plugin is the lite version of the Advanced Ads plugin that comes with all the features you will ever need to optimize your ads and increase your revenues, including performance tracking, advanced ad targeting, split tests, click fraud protection, lazy loading, background ads, popups and sticky ads, full AMP support, adblocker detection, the most comfortable Google Ad Manager integration, and tons more. [Click here to purchase the best premium WordPress ad management plugin now!](https://wpadvancedads.com/add-ons/all-access/?utm_source=wporg&utm_medium=link&utm_campaign=wp-all-access) 38 40 39 41 [Full Feature List](https://wpadvancedads.com/features/?utm_source=wporg&utm_medium=link&utm_campaign=wp-features) … … 150 152 https://vimeo.com/577170591 151 153 152 > <strong>Add-Ons</strong> 153 > 154 >* all add-ons include priority email support155 >* [All Access](https://wpadvancedads.com/add-ons/all-access/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – includes all available add-ons156 >* [Advanced Ads Pro](https://wpadvancedads.com/advanced-ads-pro/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – powerful tools for ad optimizations: cache-busting, more placements, [lazy loading](https://wpadvancedads.com/lazy-load-ads/?utm_source=wporg&utm_medium=link&utm_campaign=features), ad blocker module, [click fraud protection](https://wpadvancedads.com/manual/click-fraud-protection/?utm_source=wporg&utm_medium=link&utm_campaign=features), [geo targeting](https://wpadvancedads.com/add-ons/geo-targeting/?utm_source=wporg&utm_medium=link&utm_campaign=features), [parallax ads](https://wpadvancedads.com/parallax-ads/?utm_source=wporg&utm_medium=link&utm_campaign=features) and many more157 >* [Tracking](https://wpadvancedads.com/add-ons/tracking/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – track ad impressions and ad clicks with local methods or Google Analytics158 >* [AMP Ads](https://wpadvancedads.com/add-ons/amp-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – make your ads compatible with AMP and convert Google AdSense ads automatically159 >* [Google Ad Manager Integration](https://wpadvancedads.com/add-ons/google-ad-manager/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – a quick and error-free way to load ad units from your Google Ad Manager (formerly Google DoubleClick for Publishers, DFP) account without touching any ad codes160 >* [Sticky Ads](https://wpadvancedads.com/add-ons/sticky-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – increase click rates with fixed, sticky, and anchor ads161 >* [Fixed Widget for WordPress](https://wordpress.org/plugins/q2w3-fixed-widget/) – turn sidebar widgets into performant fixed sticky ads162 >* [PopUp and Layer Ads](https://wpadvancedads.com/add-ons/popup-and-layer-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – display ads and other content in layers, popups, and interstitials163 >* [Selling Ads](https://wpadvancedads.com/add-ons/selling-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) - allows you to sell ads on your website fully automated, including payments and advertiser profiles164 >* [Ad Slider](https://wpadvancedads.com/add-ons/slider/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – create a simple slider from your ads165 >* [Full Feature List](https://wpadvancedads.com/features/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons)154 = Add-Ons = 155 156 * all add-ons include priority email support 157 * [All Access](https://wpadvancedads.com/add-ons/all-access/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – includes all available add-ons 158 * [Advanced Ads Pro](https://wpadvancedads.com/advanced-ads-pro/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – powerful tools for ad optimizations: cache-busting, more placements, [lazy loading](https://wpadvancedads.com/lazy-load-ads/?utm_source=wporg&utm_medium=link&utm_campaign=features), ad blocker module, [click fraud protection](https://wpadvancedads.com/manual/click-fraud-protection/?utm_source=wporg&utm_medium=link&utm_campaign=features), [geo targeting](https://wpadvancedads.com/add-ons/geo-targeting/?utm_source=wporg&utm_medium=link&utm_campaign=features), [parallax ads](https://wpadvancedads.com/parallax-ads/?utm_source=wporg&utm_medium=link&utm_campaign=features) and many more 159 * [Tracking](https://wpadvancedads.com/add-ons/tracking/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – track ad impressions and ad clicks with local methods or Google Analytics 160 * [AMP Ads](https://wpadvancedads.com/add-ons/amp-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – make your ads compatible with AMP and convert Google AdSense ads automatically 161 * [Google Ad Manager Integration](https://wpadvancedads.com/add-ons/google-ad-manager/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – a quick and error-free way to load ad units from your Google Ad Manager (formerly Google DoubleClick for Publishers, DFP) account without touching any ad codes 162 * [Sticky Ads](https://wpadvancedads.com/add-ons/sticky-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – increase click rates with fixed, sticky, and anchor ads 163 * [Fixed Widget for WordPress](https://wordpress.org/plugins/q2w3-fixed-widget/) – turn sidebar widgets into performant fixed sticky ads 164 * [PopUp and Layer Ads](https://wpadvancedads.com/add-ons/popup-and-layer-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – display ads and other content in layers, popups, and interstitials 165 * [Selling Ads](https://wpadvancedads.com/add-ons/selling-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) - allows you to sell ads on your website fully automated, including payments and advertiser profiles 166 * [Ad Slider](https://wpadvancedads.com/add-ons/slider/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) – create a simple slider from your ads 167 * [Full Feature List](https://wpadvancedads.com/features/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons) 166 168 167 169 = ad blocker = … … 337 339 == Changelog == 338 340 339 = 1.48.1 (December 6, 2023) = 340 341 - Fix: prevent ad weight from always showing 10 342 343 = 1.48.0 (December 5, 2023) = 344 345 - Improvement: show Google Ad Manager debug link in Ad Health even when only a head tag exists 346 - Improvement: add arrows to jump through highlighted ads 347 - Improvement: link ads in the group modal 348 - Improvement: update the plugin list and its descriptions on the dashboard 349 - Improvement: add correct jumping through highlighted AdSense ads 350 - Fix: ensure ads without a stored ad weight in the database are displayed on the group page 351 - Fix: show the tooltip with placement and ad names only when 'highlight ads' is enabled 341 = 1.49.0 (January 31, 2024) = 342 343 - Improvement: enhance ad blocker detection to identify more ad blockers reliably 344 - Improvement: remove universal analytics description 345 - Fix: allow content age display condition to work with AJAX cache busting 346 - Fix: show search bar for author if max terms reach the limit 347 - Fix: prevent a fatal error on the ad edit page related to Display Conditions
Note: See TracChangeset
for help on using the changeset viewer.