Changeset 3366446
- Timestamp:
- 09/23/2025 12:08:59 PM (3 months ago)
- Location:
- advanced-ads
- Files:
-
- 16 edited
- 1 copied
-
tags/2.0.12 (copied) (copied from advanced-ads/trunk)
-
tags/2.0.12/advanced-ads.php (modified) (2 diffs)
-
tags/2.0.12/includes/abstracts/abstract-ad.php (modified) (1 diff)
-
tags/2.0.12/includes/abstracts/abstract-group.php (modified) (3 diffs)
-
tags/2.0.12/includes/ads/class-ad-repository.php (modified) (1 diff)
-
tags/2.0.12/includes/compatibility/class-admin-compatibility.php (modified) (3 diffs)
-
tags/2.0.12/languages/advanced-ads.pot (modified) (7 diffs)
-
tags/2.0.12/readme.txt (modified) (2 diffs)
-
tags/2.0.12/wp.advads (modified) (1 diff)
-
trunk/advanced-ads.php (modified) (2 diffs)
-
trunk/includes/abstracts/abstract-ad.php (modified) (1 diff)
-
trunk/includes/abstracts/abstract-group.php (modified) (3 diffs)
-
trunk/includes/ads/class-ad-repository.php (modified) (1 diff)
-
trunk/includes/compatibility/class-admin-compatibility.php (modified) (3 diffs)
-
trunk/languages/advanced-ads.pot (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wp.advads (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
advanced-ads/tags/2.0.12/advanced-ads.php
r3350685 r3366446 11 11 * @wordpress-plugin 12 12 * Plugin Name: Advanced Ads 13 * Version: 2.0.1 113 * Version: 2.0.12 14 14 * Description: Manage and optimize your ads in WordPress 15 15 * Plugin URI: https://wpadvancedads.com … … 38 38 39 39 define( 'ADVADS_FILE', __FILE__ ); 40 define( 'ADVADS_VERSION', '2.0.1 1' );40 define( 'ADVADS_VERSION', '2.0.12' ); 41 41 42 42 // Load the autoloader. -
advanced-ads/tags/2.0.12/includes/abstracts/abstract-ad.php
r3350685 r3366446 617 617 */ 618 618 public function is_head_placement(): bool { 619 return null !== $this->get_parent() && $this->get_parent()->is_type( 'header' ); 619 if ( null !== $this->get_parent() && $this->get_parent()->is_type( 'header' ) ) { 620 return true; 621 } 622 623 // group as head placement. 624 if ( 'header' === $this->get_prop( 'group_placement_context' ) ) { 625 return true; 626 } 627 628 return false; 620 629 } 621 630 -
advanced-ads/tags/2.0.12/includes/abstracts/abstract-group.php
r3253289 r3366446 264 264 265 265 /** 266 * Checks if the group is placed in the header.266 * Checks if the group is placed in head. 267 267 * 268 268 * @return bool … … 567 567 568 568 /** 569 * Prepare the output for the ads .569 * Prepare the output for the ads in the group. 570 570 * 571 571 * @param array $ordered_ad_ids Ordered ad IDs. 572 572 * 573 * @return array 573 * @return array Output for each ad. 574 574 */ 575 575 private function prepare_ad_output( $ordered_ad_ids ): array { … … 587 587 $ad->set_prop_temp( 'ad_args', $this->get_prop( 'ad_args' ) ); 588 588 $ad->set_parent( $this ); 589 // group as head placement. 590 $ad->set_prop_temp( 'group_placement_context', $this->is_head_placement() ? 'header' : 'content' ); 589 591 $ad->set_prop_temp( 'ad_label', 'disabled' ); 590 592 $ad_output = $ad->can_display() ? $ad->output() : ''; -
advanced-ads/tags/2.0.12/includes/ads/class-ad-repository.php
r3350685 r3366446 127 127 'post_content' => apply_filters( 128 128 'advanced-ads-pre-ad-save-' . $ad->get_type(), 129 apply_filters( 130 'content_save_pre', 131 $is_text_ad ? $ad->get_content( 'edit' ) : wp_unslash( $ad->get_content( 'edit' ) ) 132 ) 129 $is_text_ad 130 ? wp_unslash( $ad->get_content( 'edit' ) ) 131 : apply_filters( 'content_save_pre', wp_unslash( $ad->get_content( 'edit' ) ) ) 133 132 ), 134 133 ]; -
advanced-ads/tags/2.0.12/includes/compatibility/class-admin-compatibility.php
r3253289 r3366446 10 10 namespace AdvancedAds\Compatibility; 11 11 12 use AdvancedAds\Constants; 12 13 use AdvancedAds\Utilities\Conditional; 13 14 use AdvancedAds\Framework\Interfaces\Integration_Interface; … … 29 30 add_action( 'quads_meta_box_post_types', [ $this, 'fix_wpquadspro_issue' ], 11 ); 30 31 add_filter( 'wpml_admin_language_switcher_active_languages', [ $this, 'wpml_language_switcher' ] ); 32 33 // Hide from WPML translation settings. 34 if ( defined( 'ICL_SITEPRESS_VERSION' ) ) { 35 add_filter( 'get_translatable_documents', [ $this, 'wpml_hide_from_translation' ], 10, 1 ); 36 } 31 37 } 32 38 … … 89 95 return $active_languages; 90 96 } 97 98 /** 99 * Hide post type from WPML translatable documents. 100 * 101 * @param array $documents Array of translatable documents. 102 * 103 * @return array Modified array. 104 */ 105 public function wpml_hide_from_translation( $documents ): array { 106 if ( isset( $documents[ Constants::POST_TYPE_PLACEMENT ] ) ) { 107 unset( $documents[ Constants::POST_TYPE_PLACEMENT ] ); 108 } 109 return $documents; 110 } 91 111 } -
advanced-ads/tags/2.0.12/languages/advanced-ads.pot
r3350685 r3366446 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Advanced Ads 2.0.1 0\n"5 "Project-Id-Version: Advanced Ads 2.0.11\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: 2025-0 8-26T20:07:47+00:00\n"12 "POT-Creation-Date: 2025-09-23T12:04:42+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 1242 1242 1243 1243 #: classes/display-conditions.php:734 1244 #: includes/abstracts/abstract-ad.php:8 271244 #: includes/abstracts/abstract-ad.php:836 1245 1245 #: includes/admin/class-groups-list-table.php:362 1246 1246 #: views/admin/placements/quick-edit.php:16 … … 1617 1617 1618 1618 #. translators: %s is a date. 1619 #: includes/abstracts/abstract-ad.php:8 041619 #: includes/abstracts/abstract-ad.php:813 1620 1620 #, php-format 1621 1621 msgid "starts %s" … … 1623 1623 1624 1624 #. translators: %s is a date. 1625 #: includes/abstracts/abstract-ad.php:8 161625 #: includes/abstracts/abstract-ad.php:825 1626 1626 #, php-format 1627 1627 msgid "expires %s" … … 1629 1629 1630 1630 #. translators: %s is a date. 1631 #: includes/abstracts/abstract-ad.php:8 221631 #: includes/abstracts/abstract-ad.php:831 1632 1632 #, php-format 1633 1633 msgid "expired %s" 1634 1634 msgstr "" 1635 1635 1636 #: includes/abstracts/abstract-ad.php:8 281636 #: includes/abstracts/abstract-ad.php:837 1637 1637 #: includes/admin/class-placement-quick-edit.php:48 1638 1638 #: views/admin/placements/edit-modal/fields/status.php:13 … … 1642 1642 msgstr "" 1643 1643 1644 #: includes/abstracts/abstract-ad.php:8 291644 #: includes/abstracts/abstract-ad.php:838 1645 1645 msgid "Trashed" 1646 1646 msgstr "" 1647 1647 1648 1648 #. translators: %1$s is a placement name, %2$s is the ads name. 1649 #: includes/abstracts/abstract-ad.php:12 021649 #: includes/abstracts/abstract-ad.php:1211 1650 1650 #, php-format 1651 1651 msgid "Placement name: %1$s; Ads: %2$s" -
advanced-ads/tags/2.0.12/readme.txt
r3350685 r3366446 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 2.0.1 17 Stable tag: 2.0.12 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 361 361 == Changelog == 362 362 363 = 2.0.12 (September 23, 2025) = 364 365 - Improvement: prevent quotation marks in ad codes being escaped with ACF enabled 366 - Fix: groups now correctly inject ads in header placements 367 - Fix: remove placements from WPML translation options 368 363 369 = 2.0.11 (August 27, 2025) = 364 370 -
advanced-ads/tags/2.0.12/wp.advads
r3350685 r3366446 3 3 "name": "Advanced Ads", 4 4 "description": "Manage and optimize your ads in WordPress", 5 "version": "2.0.1 1",5 "version": "2.0.12", 6 6 "requireWP": "5.7", 7 7 "requirePHP": "7.4", -
advanced-ads/trunk/advanced-ads.php
r3350685 r3366446 11 11 * @wordpress-plugin 12 12 * Plugin Name: Advanced Ads 13 * Version: 2.0.1 113 * Version: 2.0.12 14 14 * Description: Manage and optimize your ads in WordPress 15 15 * Plugin URI: https://wpadvancedads.com … … 38 38 39 39 define( 'ADVADS_FILE', __FILE__ ); 40 define( 'ADVADS_VERSION', '2.0.1 1' );40 define( 'ADVADS_VERSION', '2.0.12' ); 41 41 42 42 // Load the autoloader. -
advanced-ads/trunk/includes/abstracts/abstract-ad.php
r3350685 r3366446 617 617 */ 618 618 public function is_head_placement(): bool { 619 return null !== $this->get_parent() && $this->get_parent()->is_type( 'header' ); 619 if ( null !== $this->get_parent() && $this->get_parent()->is_type( 'header' ) ) { 620 return true; 621 } 622 623 // group as head placement. 624 if ( 'header' === $this->get_prop( 'group_placement_context' ) ) { 625 return true; 626 } 627 628 return false; 620 629 } 621 630 -
advanced-ads/trunk/includes/abstracts/abstract-group.php
r3253289 r3366446 264 264 265 265 /** 266 * Checks if the group is placed in the header.266 * Checks if the group is placed in head. 267 267 * 268 268 * @return bool … … 567 567 568 568 /** 569 * Prepare the output for the ads .569 * Prepare the output for the ads in the group. 570 570 * 571 571 * @param array $ordered_ad_ids Ordered ad IDs. 572 572 * 573 * @return array 573 * @return array Output for each ad. 574 574 */ 575 575 private function prepare_ad_output( $ordered_ad_ids ): array { … … 587 587 $ad->set_prop_temp( 'ad_args', $this->get_prop( 'ad_args' ) ); 588 588 $ad->set_parent( $this ); 589 // group as head placement. 590 $ad->set_prop_temp( 'group_placement_context', $this->is_head_placement() ? 'header' : 'content' ); 589 591 $ad->set_prop_temp( 'ad_label', 'disabled' ); 590 592 $ad_output = $ad->can_display() ? $ad->output() : ''; -
advanced-ads/trunk/includes/ads/class-ad-repository.php
r3350685 r3366446 127 127 'post_content' => apply_filters( 128 128 'advanced-ads-pre-ad-save-' . $ad->get_type(), 129 apply_filters( 130 'content_save_pre', 131 $is_text_ad ? $ad->get_content( 'edit' ) : wp_unslash( $ad->get_content( 'edit' ) ) 132 ) 129 $is_text_ad 130 ? wp_unslash( $ad->get_content( 'edit' ) ) 131 : apply_filters( 'content_save_pre', wp_unslash( $ad->get_content( 'edit' ) ) ) 133 132 ), 134 133 ]; -
advanced-ads/trunk/includes/compatibility/class-admin-compatibility.php
r3253289 r3366446 10 10 namespace AdvancedAds\Compatibility; 11 11 12 use AdvancedAds\Constants; 12 13 use AdvancedAds\Utilities\Conditional; 13 14 use AdvancedAds\Framework\Interfaces\Integration_Interface; … … 29 30 add_action( 'quads_meta_box_post_types', [ $this, 'fix_wpquadspro_issue' ], 11 ); 30 31 add_filter( 'wpml_admin_language_switcher_active_languages', [ $this, 'wpml_language_switcher' ] ); 32 33 // Hide from WPML translation settings. 34 if ( defined( 'ICL_SITEPRESS_VERSION' ) ) { 35 add_filter( 'get_translatable_documents', [ $this, 'wpml_hide_from_translation' ], 10, 1 ); 36 } 31 37 } 32 38 … … 89 95 return $active_languages; 90 96 } 97 98 /** 99 * Hide post type from WPML translatable documents. 100 * 101 * @param array $documents Array of translatable documents. 102 * 103 * @return array Modified array. 104 */ 105 public function wpml_hide_from_translation( $documents ): array { 106 if ( isset( $documents[ Constants::POST_TYPE_PLACEMENT ] ) ) { 107 unset( $documents[ Constants::POST_TYPE_PLACEMENT ] ); 108 } 109 return $documents; 110 } 91 111 } -
advanced-ads/trunk/languages/advanced-ads.pot
r3350685 r3366446 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Advanced Ads 2.0.1 0\n"5 "Project-Id-Version: Advanced Ads 2.0.11\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: 2025-0 8-26T20:07:47+00:00\n"12 "POT-Creation-Date: 2025-09-23T12:04:42+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 1242 1242 1243 1243 #: classes/display-conditions.php:734 1244 #: includes/abstracts/abstract-ad.php:8 271244 #: includes/abstracts/abstract-ad.php:836 1245 1245 #: includes/admin/class-groups-list-table.php:362 1246 1246 #: views/admin/placements/quick-edit.php:16 … … 1617 1617 1618 1618 #. translators: %s is a date. 1619 #: includes/abstracts/abstract-ad.php:8 041619 #: includes/abstracts/abstract-ad.php:813 1620 1620 #, php-format 1621 1621 msgid "starts %s" … … 1623 1623 1624 1624 #. translators: %s is a date. 1625 #: includes/abstracts/abstract-ad.php:8 161625 #: includes/abstracts/abstract-ad.php:825 1626 1626 #, php-format 1627 1627 msgid "expires %s" … … 1629 1629 1630 1630 #. translators: %s is a date. 1631 #: includes/abstracts/abstract-ad.php:8 221631 #: includes/abstracts/abstract-ad.php:831 1632 1632 #, php-format 1633 1633 msgid "expired %s" 1634 1634 msgstr "" 1635 1635 1636 #: includes/abstracts/abstract-ad.php:8 281636 #: includes/abstracts/abstract-ad.php:837 1637 1637 #: includes/admin/class-placement-quick-edit.php:48 1638 1638 #: views/admin/placements/edit-modal/fields/status.php:13 … … 1642 1642 msgstr "" 1643 1643 1644 #: includes/abstracts/abstract-ad.php:8 291644 #: includes/abstracts/abstract-ad.php:838 1645 1645 msgid "Trashed" 1646 1646 msgstr "" 1647 1647 1648 1648 #. translators: %1$s is a placement name, %2$s is the ads name. 1649 #: includes/abstracts/abstract-ad.php:12 021649 #: includes/abstracts/abstract-ad.php:1211 1650 1650 #, php-format 1651 1651 msgid "Placement name: %1$s; Ads: %2$s" -
advanced-ads/trunk/readme.txt
r3350685 r3366446 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 2.0.1 17 Stable tag: 2.0.12 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 361 361 == Changelog == 362 362 363 = 2.0.12 (September 23, 2025) = 364 365 - Improvement: prevent quotation marks in ad codes being escaped with ACF enabled 366 - Fix: groups now correctly inject ads in header placements 367 - Fix: remove placements from WPML translation options 368 363 369 = 2.0.11 (August 27, 2025) = 364 370 -
advanced-ads/trunk/wp.advads
r3350685 r3366446 3 3 "name": "Advanced Ads", 4 4 "description": "Manage and optimize your ads in WordPress", 5 "version": "2.0.1 1",5 "version": "2.0.12", 6 6 "requireWP": "5.7", 7 7 "requirePHP": "7.4",
Note: See TracChangeset
for help on using the changeset viewer.