Changeset 3187581
- Timestamp:
- 11/13/2024 12:25:25 PM (13 months ago)
- Location:
- advanced-ads
- Files:
-
- 24 edited
- 1 copied
-
tags/1.56.0 (copied) (copied from advanced-ads/trunk)
-
tags/1.56.0/admin/includes/class-meta-box.php (modified) (1 diff)
-
tags/1.56.0/admin/views/support.php (modified) (1 diff)
-
tags/1.56.0/advanced-ads.php (modified) (2 diffs)
-
tags/1.56.0/classes/in-content-injector.php (modified) (1 diff)
-
tags/1.56.0/languages/advanced-ads.pot (modified) (6 diffs)
-
tags/1.56.0/modules/one-click/admin/class-ajax.php (modified) (1 diff)
-
tags/1.56.0/modules/one-click/modules/class-workflow.php (modified) (2 diffs)
-
tags/1.56.0/modules/pef/class-module.php (modified) (8 diffs)
-
tags/1.56.0/modules/pef/main.php (modified) (1 diff)
-
tags/1.56.0/modules/pef/views/template.php (modified) (1 diff)
-
tags/1.56.0/readme.txt (modified) (2 diffs)
-
tags/1.56.0/views/admin/screens/dashboard.php (modified) (1 diff)
-
trunk/admin/includes/class-meta-box.php (modified) (1 diff)
-
trunk/admin/views/support.php (modified) (1 diff)
-
trunk/advanced-ads.php (modified) (2 diffs)
-
trunk/classes/in-content-injector.php (modified) (1 diff)
-
trunk/languages/advanced-ads.pot (modified) (6 diffs)
-
trunk/modules/one-click/admin/class-ajax.php (modified) (1 diff)
-
trunk/modules/one-click/modules/class-workflow.php (modified) (2 diffs)
-
trunk/modules/pef/class-module.php (modified) (8 diffs)
-
trunk/modules/pef/main.php (modified) (1 diff)
-
trunk/modules/pef/views/template.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/views/admin/screens/dashboard.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
advanced-ads/tags/1.56.0/admin/includes/class-meta-box.php
r3170554 r3187581 661 661 } 662 662 663 $currencies = [ 'EUR', 'USD' ];663 $currencies = [ 'EUR', 'USD', 'GBP', 'CHF' ]; 664 664 $feed_url = 'https://wpadvancedads.com/category/tutorials/feed/'; 665 665 $campaign = 'dashboard'; -
advanced-ads/tags/1.56.0/admin/views/support.php
r3086263 r3187581 73 73 <?php endif; ?> 74 74 </div> 75 <?php AdvancedAds\Modules\ProductExperimentationFramework\Module::get_instance()->render( 'support' ); ?> -
advanced-ads/tags/1.56.0/advanced-ads.php
r3170554 r3187581 13 13 * Plugin URI: https://wpadvancedads.com 14 14 * Description: Manage and optimize your ads in WordPress 15 * Version: 1.5 5.015 * Version: 1.56.0 16 16 * Author: Advanced Ads 17 17 * Author URI: https://wpadvancedads.com … … 34 34 35 35 define( 'ADVADS_FILE', __FILE__ ); 36 define( 'ADVADS_VERSION', '1.5 5.0' );36 define( 'ADVADS_VERSION', '1.56.0' ); 37 37 38 38 // Load the autoloader. -
advanced-ads/tags/1.56.0/classes/in-content-injector.php
r3170554 r3187581 83 83 if ( in_array( $tag_option, [ 'img', 'iframe', 'custom' ], true ) ) { 84 84 $defaults['allowEmpty'] = true; 85 } 86 87 // Merge the options if possible. If there are common keys, we don't merge them to prevent overriding and unexpected behavior. 88 $common_keys = array_intersect_key( $options, $placement_opts ); 89 if ( empty( $common_keys ) ) { 90 $options = array_merge( $options, $placement_opts ); 85 91 } 86 92 -
advanced-ads/tags/1.56.0/languages/advanced-ads.pot
r3170554 r3187581 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Advanced Ads 1.5 4.1\n"5 "Project-Id-Version: Advanced Ads 1.55.0\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: 2024-1 0-16T11:58:57+00:00\n"12 "POT-Creation-Date: 2024-11-13T12:24:30+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" … … 817 817 818 818 #: admin/includes/class-settings.php:178 819 #: classes/in-content-injector.php:61 1819 #: classes/in-content-injector.php:617 820 820 msgid "Disable level limitation" 821 821 msgstr "" … … 2648 2648 2649 2649 #. translators: %s stands for the name of the "Disable level limitation" option and automatically translated as well 2650 #: classes/in-content-injector.php:61 02650 #: classes/in-content-injector.php:616 2651 2651 msgid "Set <em>%s</em> to show more ads" 2652 2652 msgstr "" … … 4186 4186 msgstr "" 4187 4187 4188 #: modules/one-click/admin/class-ajax.php:135 4189 #: modules/one-click/admin/class-ajax.php:170 4188 #. translators: 1 is the opening link to the Advanced Ads website, 2 the closing link 4189 #: modules/one-click/admin/class-ajax.php:136 4190 msgid "The backup of your ads.txt file has failed. Please ensure that a manual backup is created You can find detailed instructions on how to manually back up your ads.txt file in the manual. %1$sManual%2$s" 4191 msgstr "" 4192 4193 #: modules/one-click/admin/class-ajax.php:146 4194 msgid "File successfully backed up." 4195 msgstr "" 4196 4197 #: modules/one-click/admin/class-ajax.php:174 4190 4198 msgid "An error has occurred please try again." 4191 msgstr ""4192 4193 #: modules/one-click/admin/class-ajax.php:1424194 msgid "File successfully backed up."4195 4199 msgstr "" 4196 4200 … … 4216 4220 msgstr "" 4217 4221 4222 #: modules/pef/class-module.php:197 4223 #: modules/pef/class-module.php:205 4224 msgid "FROM THE ADVANCED ADS LABS:" 4225 msgstr "" 4226 4227 #: modules/pef/class-module.php:198 4228 #: modules/pef/class-module.php:206 4229 msgid "The Campaign Manager" 4230 msgstr "" 4231 4232 #: modules/pef/class-module.php:200 4233 #: modules/pef/class-module.php:208 4234 msgid "Advanced Ads’ upcoming new product, the Campaign Manager, will shake up how you sell ad space to clients directly. It bundles a decade of users’ requests and ideas into one standalone product. The core feature set includes a brilliant advertisement schedule screen, grouping ads and reports by client, brushed-up email notifications for timed ads, and more.<br><br>Our team is in the early stages of development, and we would like to see if this product resonates with you." 4235 msgstr "" 4236 4237 #: modules/pef/class-module.php:201 4238 #: modules/pef/class-module.php:209 4239 msgid "Are you interested in this product concept?" 4240 msgstr "" 4241 4242 #: modules/pef/class-module.php:202 4243 #: modules/pef/class-module.php:210 4244 msgid "Yes, I want to know more!" 4245 msgstr "" 4246 4218 4247 #: modules/privacy/admin/admin.php:51 4219 4248 msgid "Privacy" -
advanced-ads/tags/1.56.0/modules/one-click/admin/class-ajax.php
r3170554 r3187581 132 132 if ( false === $result ) { 133 133 $notice = sprintf( 134 '<div class="notice notice-error flex items-center p-4">%s</div>', 135 esc_html__( 'An error has occurred please try again.', 'advanced-ads' ) 134 '<div class="notice notice-error flex items-center p-4">' 135 /* translators: 1 is the opening link to the Advanced Ads website, 2 the closing link */ 136 . __( 'The backup of your ads.txt file has failed. Please ensure that a manual backup is created You can find detailed instructions on how to manually back up your ads.txt file in the manual. %1$sManual%2$s', 'advanced-ads' ) 137 . '</div>', 138 '<a href="https://wpadvancedads.com/manual/ads-txt/?utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-ads-txt-oci#Manual_backup_of_the_adstxt_file" target="_blank" class="advads-manual-link" style="display: inline !important;">', 139 '</a>' 136 140 ); 137 141 wp_send_json_error( $notice ); -
advanced-ads/tags/1.56.0/modules/one-click/modules/class-workflow.php
r3145275 r3187581 49 49 if ( Options::module( 'ads_txt' ) ) { 50 50 ( new AdsTxt() )->hooks(); 51 } 52 53 if ( ! function_exists( 'wp_advads_pro' ) ) { 54 add_filter( 'advanced-ads-placement-content-offsets', [ $this, 'placement_content_offsets' ], 10, 3 ); 51 55 } 52 56 } … … 142 146 ( new Api_Ads() )->import(); 143 147 } 148 149 /** 150 * Get offsets for Content placement. 151 * 152 * @param array $offsets Existing Offsets. 153 * @param array $options Injection options. 154 * @param array $placement_opts Placement options. 155 * 156 * @return array $offsets New offsets. 157 */ 158 public function placement_content_offsets( $offsets, $options, $placement_opts ) { 159 if ( ! isset( $options['paragraph_count'] ) ) { 160 return $offsets; 161 } 162 163 // "Content" placement, repeat position. 164 if ( 165 ( ! empty( $placement_opts['repeat'] ) || ! empty( $options['repeat'] ) ) && 166 isset( $options['paragraph_id'] ) && 167 isset( $options['paragraph_select_from_bottom'] ) 168 ) { 169 170 $offsets = []; 171 for ( $i = $options['paragraph_id'] - 1; $i < $options['paragraph_count']; $i++ ) { 172 // Select every X number. 173 if ( 0 === ( $i + 1 ) % $options['paragraph_id'] ) { 174 $offsets[] = $options['paragraph_select_from_bottom'] ? $options['paragraph_count'] - 1 - $i : $i; 175 } 176 } 177 } 178 179 return $offsets; 180 } 144 181 } -
advanced-ads/tags/1.56.0/modules/pef/class-module.php
r3050336 r3187581 14 14 class Module { 15 15 /** 16 * The singleton 17 * 18 * @var Module 19 */ 20 private static $instance; 21 22 /** 23 * User meta key where the dismiss flag is stored. 24 * 25 * @var string 26 */ 27 const USER_META = 'advanced_ads_pef_dismiss'; 28 29 /** 16 30 * Current running features 17 31 * 18 32 * @var array[] 19 33 */ 20 const FEATURES = [ 21 'labs-video-ads' => [ 22 'name' => 'Video Ads', 23 'weight' => 1, 24 'text' => 'The Advanced Ads team is developing a new feature to support video ads. This enables embedding videos from your WordPress media library and video ad networks. Like image ads, they would be fully compatible with all conditions and placements. We are curious whether our users want us to prioritize this feature.', 25 ], 26 'labs-email-notifications' => [ 27 'name' => 'Email Notifications', 28 'weight' => 1, 29 'text' => 'The Advanced Ads team is developing a new feature to improve email notifications. Imagine receiving timely reminders in your inbox, giving you ample time to take action. Whether renewing an ad, adjusting ad groups, or checking the statistics after a campaign has ended, you’ll be in the know every step of the way. We are curious whether our users want us to prioritize this feature.', 30 ], 31 'labs-image-mapping' => [ 32 'name' => 'Image Mapping', 33 'weight' => 1, 34 'text' => 'The Advanced Ads team is developing a new feature to allow serving multiple images with the same ad unit. This workflow can save you time in certain setups and is an alternative to ad groups when it comes to multiple campaigns from the same advertiser. We are curious whether our users want us to prioritize this feature.', 35 ], 36 'labs-automated-split-tests' => [ 37 'name' => 'Automated Split Tests', 38 'weight' => 1, 39 'text' => 'The Advanced Ads team is working on a new feature to simplify your workload: automated split testing. Let us handle the heavy lifting for you by automatically maximizing your ad performance based on the CTR of your ad units. We are curious whether our users want us to prioritize this feature.', 40 ], 41 'labs-ad-preview' => [ 42 'name' => 'Ad Preview', 43 'weight' => 1, 44 'text' => 'The Advanced Ads team is developing a new feature: ad previews. Simply input the code in the Parameter box, and watch your ad come to life on the Edit Ad page. We are curious whether our users want us to prioritize this feature.', 45 ], 46 'labs-animated-ads' => [ 47 'name' => 'Animated Ads', 48 'weight' => 1, 49 'text' => 'The Advanced Ads team is developing a new feature to allow animating ads. Captivate your audience with eye-catching effects like flip, slider, and fade. Enhance engagement and leave a lasting impression with dynamic ad displays. We are curious whether our users want us to prioritize this feature.', 50 ], 51 'labs-active-view-tracking' => [ 52 'name' => 'Active View Tracking', 53 'weight' => 1, 54 'text' => 'The Advanced Ads team is developing a new feature to enable active view tracking. Gain precise insights into ad viewability and upgrade your metrics. With active view tracking, you’ll know if your ad is loaded and visible in the viewport. We are curious whether our users want us to prioritize this feature.', 55 ], 56 'labs-ad-schedule-wizard' => [ 57 'name' => 'Ad Schedule Wizard', 58 'weight' => 1, 59 'text' => 'The Advanced Ads team is developing a better ad scheduling and planning interface. Simplify your workflow and maximize efficiency. With an improved user experience, managing your ads could be easier than ever. We are curious whether our users want us to prioritize this feature.', 60 ], 61 'labs-reports-insights' => [ 62 'name' => 'Reports & Insights', 63 'weight' => 1, 64 'text' => 'The Advanced Ads team is improving the reporting. Customize your email reports to focus on the metrics that most matter to you and easily share them as PDFs. Empower yourself with actionable data and streamline communication with stakeholders. We are curious whether our users want us to prioritize this feature.', 65 ], 66 ]; 67 68 /** 69 * User meta key where the dismiss flag is stored. 70 * 71 * @var string 72 */ 73 const USER_META = 'advanced_ads_pef_dismiss'; 74 75 /** 76 * The singleton 77 * 78 * @var Module 79 */ 80 private static $instance; 34 private $features; 81 35 82 36 /** … … 102 56 103 57 /** 104 * Private constructor58 * Singleton design 105 59 */ 106 60 private function __construct() { 61 $this->set_features(); 62 107 63 // Wait for `admin_init` to get the current user. 108 64 add_action( 'admin_init', [ $this, 'admin_init' ] ); 65 } 66 67 /** 68 * Return the singleton. Create it if needed 69 * 70 * @return Module 71 */ 72 public static function get_instance() { 73 if ( null === self::$instance ) { 74 self::$instance = new self(); 75 } 76 77 return self::$instance; 109 78 } 110 79 … … 118 87 if ( $this->get_minor_version( ADVADS_VERSION ) === $this->get_minor_version( $meta ) ) { 119 88 $this->can_display = false; 120 121 89 return; 122 90 } 91 123 92 $this->collect_weights(); 124 93 add_action( 'wp_ajax_advanced_ads_pef', [ $this, 'dismiss' ] ); … … 139 108 140 109 /** 141 * Collect feature ID with their weight as recorded in the class constant. Also calculate the weight sum142 */143 private function collect_weights() {144 if ( 0 !== $this->weight_sum ) {145 return;146 }147 foreach ( self::FEATURES as $id => $feature ) {148 $this->weights[ $id ] = (int) $feature['weight'];149 $this->weight_sum += $this->weights[ $id ];150 }151 }152 153 /**154 110 * Get a random feature based on weights and a random number 155 111 * … … 157 113 */ 158 114 public function get_winner_feature() { 159 $random_weight = mt_rand( 1, $this->weight_sum );115 $random_weight = wp_rand( 1, $this->weight_sum ); 160 116 $current_weight = 0; 161 foreach ( self::FEATURESas $id => $feature ) {117 foreach ( $this->features as $id => $feature ) { 162 118 $current_weight += $this->weights[ $id ]; 163 119 if ( $random_weight <= $current_weight ) { … … 167 123 'weight' => $this->weights[ $id ], 168 124 ], 169 self::FEATURES[ $id ]125 $this->features[ $id ] 170 126 ); 171 127 } … … 181 137 */ 182 138 public function render( $screen ) { 139 // Early bail!! 183 140 if ( ! $this->can_display ) { 184 141 return; 185 142 } 186 143 $winner = $this->get_winner_feature(); 144 187 145 require_once DIR . '/views/template.php'; 188 146 } … … 208 166 */ 209 167 public function build_link( $winner, $screen ) { 210 $link = "https://wpadvancedads.com/advanced-ads-labs/?utm_source=advanced-ads&utm_medium=link&utm_campaign=$screen-aa-labs&utm_term=b"; 211 $link .= str_replace( '.', '-', ADVADS_VERSION ) . "w{$winner['weight']}-{$this->weight_sum}&utm_content={$winner['id']}"; 212 213 return $link; 214 } 215 216 /** 217 * Return the singleton. Create it if needed 218 * 219 * @return Module 220 */ 221 public static function get_instance() { 222 if ( null === self::$instance ) { 223 self::$instance = new self(); 224 } 225 226 return self::$instance; 168 $utm_source = 'advanced-ads'; 169 $utm_medium = 'link'; 170 $utm_campaign = sprintf( '%s-aa-labs', $screen ); 171 $utm_term = sprintf( 172 'b%sw%d-%d', 173 str_replace( '.', '-', ADVADS_VERSION ), 174 $winner['weight'], 175 $this->weight_sum 176 ); 177 $utm_content = $winner['id']; 178 179 return sprintf( 180 'https://wpadvancedads.com/advanced-ads-labs/?utm_source=%s&utm_medium=%s&utm_campaign=%s&utm_term=%s&utm_content=%s', 181 $utm_source, 182 $utm_medium, 183 $utm_campaign, 184 $utm_term, 185 $utm_content 186 ); 187 } 188 189 /** 190 * Set the features/banners 191 * 192 * @return void 193 */ 194 private function set_features() { 195 $this->features = [ 196 'labs-campaign-manager-ay' => [ 197 'subheading' => __( 'FROM THE ADVANCED ADS LABS:', 'advanced-ads' ), 198 'heading' => __( 'The Campaign Manager', 'advanced-ads' ), 199 'weight' => 1, 200 'text' => __( 'Advanced Ads’ upcoming new product, the Campaign Manager, will shake up how you sell ad space to clients directly. It bundles a decade of users’ requests and ideas into one standalone product. The core feature set includes a brilliant advertisement schedule screen, grouping ads and reports by client, brushed-up email notifications for timed ads, and more.<br><br>Our team is in the early stages of development, and we would like to see if this product resonates with you.', 'advanced-ads' ), 201 'cta' => __( 'Are you interested in this product concept?', 'advanced-ads' ), 202 'cta_button' => __( 'Yes, I want to know more!', 'advanced-ads' ), 203 ], 204 'labs-campaign-manager-be' => [ 205 'subheading' => __( 'FROM THE ADVANCED ADS LABS:', 'advanced-ads' ), 206 'heading' => __( 'The Campaign Manager', 'advanced-ads' ), 207 'weight' => 1, 208 'text' => __( 'Advanced Ads’ upcoming new product, the Campaign Manager, will shake up how you sell ad space to clients directly. It bundles a decade of users’ requests and ideas into one standalone product. The core feature set includes a brilliant advertisement schedule screen, grouping ads and reports by client, brushed-up email notifications for timed ads, and more.<br><br>Our team is in the early stages of development, and we would like to see if this product resonates with you.', 'advanced-ads' ), 209 'cta' => __( 'Are you interested in this product concept?', 'advanced-ads' ), 210 'cta_button' => __( 'Yes, I want to know more!', 'advanced-ads' ), 211 ], 212 ]; 213 } 214 215 /** 216 * Collect feature ID with their weight as recorded in the class constant. Also calculate the weight sum 217 */ 218 private function collect_weights() { 219 if ( 0 !== $this->weight_sum ) { 220 return; 221 } 222 foreach ( $this->features as $id => $feature ) { 223 $this->weights[ $id ] = (int) $feature['weight']; 224 $this->weight_sum += $this->weights[ $id ]; 225 } 227 226 } 228 227 } -
advanced-ads/tags/1.56.0/modules/pef/main.php
r3086263 r3187581 15 15 return; 16 16 } 17 18 Module::get_instance(); -
advanced-ads/tags/1.56.0/modules/pef/views/template.php
r3050336 r3187581 124 124 <div class="aa_overview_pef_upper"> 125 125 <p class="aa_overview_pef_dismiss"><a class="dashicons dashicons-dismiss" href="#"></a></p> 126 <p class="aa_overview_pef_subhead"> Shout-outs from the Advanced Ads Labs</p>127 <h3 class="aa_overview_pef_head"><?php echo esc_html( $winner[' name'] ); ?></h3>128 <p class="aa_overview_pef_copy"><?php echo esc_html( $winner['text'] ); ?></p>126 <p class="aa_overview_pef_subhead"><?php echo esc_html( $winner['subheading'] ); ?></p> 127 <h3 class="aa_overview_pef_head"><?php echo esc_html( $winner['heading'] ); ?></h3> 128 <p class="aa_overview_pef_copy"><?php echo wp_kses_post( $winner['text'] ); ?></p> 129 129 </div> 130 130 <div class="aa_overview_pef_lower"> 131 <p class="aa_overview_pef_cta">Does this feature appeal to you?<a class="aa_overview_pef_button" href="<?php echo esc_url( $this->build_link( $winner, $screen ) ); ?>" target="_blank">Yes, focus on it!</a> 131 <p class="aa_overview_pef_cta"> 132 <?php echo esc_html( $winner['cta'] ); ?> 133 <a class="aa_overview_pef_button" href="<?php echo esc_url( $this->build_link( $winner, $screen ) ); ?>" target="_blank"> 134 <?php echo esc_html( $winner['cta_button'] ); ?> 135 </a> 132 136 </p> 133 137 </div> -
advanced-ads/tags/1.56.0/readme.txt
r3170554 r3187581 3 3 Tags: ads, adsense, amazon, affiliate, ad manager 4 4 Requires at least: 5.0 5 Tested up to: 6. 55 Tested up to: 6.6 6 6 Requires PHP: 7.2 7 Stable tag: 1.5 5.07 Stable tag: 1.56.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 357 357 == Changelog == 358 358 359 = 1.5 5.0 (October 16, 2024) =360 361 - Improvement: add manual links to some settings359 = 1.56.0 (November 13, 2024) = 360 361 - Improvement: optimize code structure slightly for better performance 362 362 - Improvement: enhance PubGuru one click integration 363 - Fix: correct an issue with repeating ads before a heading -
advanced-ads/tags/1.56.0/views/admin/screens/dashboard.php
r3086263 r3187581 7 7 */ 8 8 9 use AdvancedAds\Modules\ProductExperimentationFramework\Module; 10 9 11 ?> 10 12 <div class="wrap"> 11 13 <div id="advads-overview"> 14 <?php Module::get_instance()->render( 'overview' ); ?> 12 15 <?php Advanced_Ads_Overview_Widgets_Callbacks::setup_overview_widgets(); ?> 13 16 </div> -
advanced-ads/trunk/admin/includes/class-meta-box.php
r3170554 r3187581 661 661 } 662 662 663 $currencies = [ 'EUR', 'USD' ];663 $currencies = [ 'EUR', 'USD', 'GBP', 'CHF' ]; 664 664 $feed_url = 'https://wpadvancedads.com/category/tutorials/feed/'; 665 665 $campaign = 'dashboard'; -
advanced-ads/trunk/admin/views/support.php
r3086263 r3187581 73 73 <?php endif; ?> 74 74 </div> 75 <?php AdvancedAds\Modules\ProductExperimentationFramework\Module::get_instance()->render( 'support' ); ?> -
advanced-ads/trunk/advanced-ads.php
r3170554 r3187581 13 13 * Plugin URI: https://wpadvancedads.com 14 14 * Description: Manage and optimize your ads in WordPress 15 * Version: 1.5 5.015 * Version: 1.56.0 16 16 * Author: Advanced Ads 17 17 * Author URI: https://wpadvancedads.com … … 34 34 35 35 define( 'ADVADS_FILE', __FILE__ ); 36 define( 'ADVADS_VERSION', '1.5 5.0' );36 define( 'ADVADS_VERSION', '1.56.0' ); 37 37 38 38 // Load the autoloader. -
advanced-ads/trunk/classes/in-content-injector.php
r3170554 r3187581 83 83 if ( in_array( $tag_option, [ 'img', 'iframe', 'custom' ], true ) ) { 84 84 $defaults['allowEmpty'] = true; 85 } 86 87 // Merge the options if possible. If there are common keys, we don't merge them to prevent overriding and unexpected behavior. 88 $common_keys = array_intersect_key( $options, $placement_opts ); 89 if ( empty( $common_keys ) ) { 90 $options = array_merge( $options, $placement_opts ); 85 91 } 86 92 -
advanced-ads/trunk/languages/advanced-ads.pot
r3170554 r3187581 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Advanced Ads 1.5 4.1\n"5 "Project-Id-Version: Advanced Ads 1.55.0\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: 2024-1 0-16T11:58:57+00:00\n"12 "POT-Creation-Date: 2024-11-13T12:24:30+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" … … 817 817 818 818 #: admin/includes/class-settings.php:178 819 #: classes/in-content-injector.php:61 1819 #: classes/in-content-injector.php:617 820 820 msgid "Disable level limitation" 821 821 msgstr "" … … 2648 2648 2649 2649 #. translators: %s stands for the name of the "Disable level limitation" option and automatically translated as well 2650 #: classes/in-content-injector.php:61 02650 #: classes/in-content-injector.php:616 2651 2651 msgid "Set <em>%s</em> to show more ads" 2652 2652 msgstr "" … … 4186 4186 msgstr "" 4187 4187 4188 #: modules/one-click/admin/class-ajax.php:135 4189 #: modules/one-click/admin/class-ajax.php:170 4188 #. translators: 1 is the opening link to the Advanced Ads website, 2 the closing link 4189 #: modules/one-click/admin/class-ajax.php:136 4190 msgid "The backup of your ads.txt file has failed. Please ensure that a manual backup is created You can find detailed instructions on how to manually back up your ads.txt file in the manual. %1$sManual%2$s" 4191 msgstr "" 4192 4193 #: modules/one-click/admin/class-ajax.php:146 4194 msgid "File successfully backed up." 4195 msgstr "" 4196 4197 #: modules/one-click/admin/class-ajax.php:174 4190 4198 msgid "An error has occurred please try again." 4191 msgstr ""4192 4193 #: modules/one-click/admin/class-ajax.php:1424194 msgid "File successfully backed up."4195 4199 msgstr "" 4196 4200 … … 4216 4220 msgstr "" 4217 4221 4222 #: modules/pef/class-module.php:197 4223 #: modules/pef/class-module.php:205 4224 msgid "FROM THE ADVANCED ADS LABS:" 4225 msgstr "" 4226 4227 #: modules/pef/class-module.php:198 4228 #: modules/pef/class-module.php:206 4229 msgid "The Campaign Manager" 4230 msgstr "" 4231 4232 #: modules/pef/class-module.php:200 4233 #: modules/pef/class-module.php:208 4234 msgid "Advanced Ads’ upcoming new product, the Campaign Manager, will shake up how you sell ad space to clients directly. It bundles a decade of users’ requests and ideas into one standalone product. The core feature set includes a brilliant advertisement schedule screen, grouping ads and reports by client, brushed-up email notifications for timed ads, and more.<br><br>Our team is in the early stages of development, and we would like to see if this product resonates with you." 4235 msgstr "" 4236 4237 #: modules/pef/class-module.php:201 4238 #: modules/pef/class-module.php:209 4239 msgid "Are you interested in this product concept?" 4240 msgstr "" 4241 4242 #: modules/pef/class-module.php:202 4243 #: modules/pef/class-module.php:210 4244 msgid "Yes, I want to know more!" 4245 msgstr "" 4246 4218 4247 #: modules/privacy/admin/admin.php:51 4219 4248 msgid "Privacy" -
advanced-ads/trunk/modules/one-click/admin/class-ajax.php
r3170554 r3187581 132 132 if ( false === $result ) { 133 133 $notice = sprintf( 134 '<div class="notice notice-error flex items-center p-4">%s</div>', 135 esc_html__( 'An error has occurred please try again.', 'advanced-ads' ) 134 '<div class="notice notice-error flex items-center p-4">' 135 /* translators: 1 is the opening link to the Advanced Ads website, 2 the closing link */ 136 . __( 'The backup of your ads.txt file has failed. Please ensure that a manual backup is created You can find detailed instructions on how to manually back up your ads.txt file in the manual. %1$sManual%2$s', 'advanced-ads' ) 137 . '</div>', 138 '<a href="https://wpadvancedads.com/manual/ads-txt/?utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-ads-txt-oci#Manual_backup_of_the_adstxt_file" target="_blank" class="advads-manual-link" style="display: inline !important;">', 139 '</a>' 136 140 ); 137 141 wp_send_json_error( $notice ); -
advanced-ads/trunk/modules/one-click/modules/class-workflow.php
r3145275 r3187581 49 49 if ( Options::module( 'ads_txt' ) ) { 50 50 ( new AdsTxt() )->hooks(); 51 } 52 53 if ( ! function_exists( 'wp_advads_pro' ) ) { 54 add_filter( 'advanced-ads-placement-content-offsets', [ $this, 'placement_content_offsets' ], 10, 3 ); 51 55 } 52 56 } … … 142 146 ( new Api_Ads() )->import(); 143 147 } 148 149 /** 150 * Get offsets for Content placement. 151 * 152 * @param array $offsets Existing Offsets. 153 * @param array $options Injection options. 154 * @param array $placement_opts Placement options. 155 * 156 * @return array $offsets New offsets. 157 */ 158 public function placement_content_offsets( $offsets, $options, $placement_opts ) { 159 if ( ! isset( $options['paragraph_count'] ) ) { 160 return $offsets; 161 } 162 163 // "Content" placement, repeat position. 164 if ( 165 ( ! empty( $placement_opts['repeat'] ) || ! empty( $options['repeat'] ) ) && 166 isset( $options['paragraph_id'] ) && 167 isset( $options['paragraph_select_from_bottom'] ) 168 ) { 169 170 $offsets = []; 171 for ( $i = $options['paragraph_id'] - 1; $i < $options['paragraph_count']; $i++ ) { 172 // Select every X number. 173 if ( 0 === ( $i + 1 ) % $options['paragraph_id'] ) { 174 $offsets[] = $options['paragraph_select_from_bottom'] ? $options['paragraph_count'] - 1 - $i : $i; 175 } 176 } 177 } 178 179 return $offsets; 180 } 144 181 } -
advanced-ads/trunk/modules/pef/class-module.php
r3050336 r3187581 14 14 class Module { 15 15 /** 16 * The singleton 17 * 18 * @var Module 19 */ 20 private static $instance; 21 22 /** 23 * User meta key where the dismiss flag is stored. 24 * 25 * @var string 26 */ 27 const USER_META = 'advanced_ads_pef_dismiss'; 28 29 /** 16 30 * Current running features 17 31 * 18 32 * @var array[] 19 33 */ 20 const FEATURES = [ 21 'labs-video-ads' => [ 22 'name' => 'Video Ads', 23 'weight' => 1, 24 'text' => 'The Advanced Ads team is developing a new feature to support video ads. This enables embedding videos from your WordPress media library and video ad networks. Like image ads, they would be fully compatible with all conditions and placements. We are curious whether our users want us to prioritize this feature.', 25 ], 26 'labs-email-notifications' => [ 27 'name' => 'Email Notifications', 28 'weight' => 1, 29 'text' => 'The Advanced Ads team is developing a new feature to improve email notifications. Imagine receiving timely reminders in your inbox, giving you ample time to take action. Whether renewing an ad, adjusting ad groups, or checking the statistics after a campaign has ended, you’ll be in the know every step of the way. We are curious whether our users want us to prioritize this feature.', 30 ], 31 'labs-image-mapping' => [ 32 'name' => 'Image Mapping', 33 'weight' => 1, 34 'text' => 'The Advanced Ads team is developing a new feature to allow serving multiple images with the same ad unit. This workflow can save you time in certain setups and is an alternative to ad groups when it comes to multiple campaigns from the same advertiser. We are curious whether our users want us to prioritize this feature.', 35 ], 36 'labs-automated-split-tests' => [ 37 'name' => 'Automated Split Tests', 38 'weight' => 1, 39 'text' => 'The Advanced Ads team is working on a new feature to simplify your workload: automated split testing. Let us handle the heavy lifting for you by automatically maximizing your ad performance based on the CTR of your ad units. We are curious whether our users want us to prioritize this feature.', 40 ], 41 'labs-ad-preview' => [ 42 'name' => 'Ad Preview', 43 'weight' => 1, 44 'text' => 'The Advanced Ads team is developing a new feature: ad previews. Simply input the code in the Parameter box, and watch your ad come to life on the Edit Ad page. We are curious whether our users want us to prioritize this feature.', 45 ], 46 'labs-animated-ads' => [ 47 'name' => 'Animated Ads', 48 'weight' => 1, 49 'text' => 'The Advanced Ads team is developing a new feature to allow animating ads. Captivate your audience with eye-catching effects like flip, slider, and fade. Enhance engagement and leave a lasting impression with dynamic ad displays. We are curious whether our users want us to prioritize this feature.', 50 ], 51 'labs-active-view-tracking' => [ 52 'name' => 'Active View Tracking', 53 'weight' => 1, 54 'text' => 'The Advanced Ads team is developing a new feature to enable active view tracking. Gain precise insights into ad viewability and upgrade your metrics. With active view tracking, you’ll know if your ad is loaded and visible in the viewport. We are curious whether our users want us to prioritize this feature.', 55 ], 56 'labs-ad-schedule-wizard' => [ 57 'name' => 'Ad Schedule Wizard', 58 'weight' => 1, 59 'text' => 'The Advanced Ads team is developing a better ad scheduling and planning interface. Simplify your workflow and maximize efficiency. With an improved user experience, managing your ads could be easier than ever. We are curious whether our users want us to prioritize this feature.', 60 ], 61 'labs-reports-insights' => [ 62 'name' => 'Reports & Insights', 63 'weight' => 1, 64 'text' => 'The Advanced Ads team is improving the reporting. Customize your email reports to focus on the metrics that most matter to you and easily share them as PDFs. Empower yourself with actionable data and streamline communication with stakeholders. We are curious whether our users want us to prioritize this feature.', 65 ], 66 ]; 67 68 /** 69 * User meta key where the dismiss flag is stored. 70 * 71 * @var string 72 */ 73 const USER_META = 'advanced_ads_pef_dismiss'; 74 75 /** 76 * The singleton 77 * 78 * @var Module 79 */ 80 private static $instance; 34 private $features; 81 35 82 36 /** … … 102 56 103 57 /** 104 * Private constructor58 * Singleton design 105 59 */ 106 60 private function __construct() { 61 $this->set_features(); 62 107 63 // Wait for `admin_init` to get the current user. 108 64 add_action( 'admin_init', [ $this, 'admin_init' ] ); 65 } 66 67 /** 68 * Return the singleton. Create it if needed 69 * 70 * @return Module 71 */ 72 public static function get_instance() { 73 if ( null === self::$instance ) { 74 self::$instance = new self(); 75 } 76 77 return self::$instance; 109 78 } 110 79 … … 118 87 if ( $this->get_minor_version( ADVADS_VERSION ) === $this->get_minor_version( $meta ) ) { 119 88 $this->can_display = false; 120 121 89 return; 122 90 } 91 123 92 $this->collect_weights(); 124 93 add_action( 'wp_ajax_advanced_ads_pef', [ $this, 'dismiss' ] ); … … 139 108 140 109 /** 141 * Collect feature ID with their weight as recorded in the class constant. Also calculate the weight sum142 */143 private function collect_weights() {144 if ( 0 !== $this->weight_sum ) {145 return;146 }147 foreach ( self::FEATURES as $id => $feature ) {148 $this->weights[ $id ] = (int) $feature['weight'];149 $this->weight_sum += $this->weights[ $id ];150 }151 }152 153 /**154 110 * Get a random feature based on weights and a random number 155 111 * … … 157 113 */ 158 114 public function get_winner_feature() { 159 $random_weight = mt_rand( 1, $this->weight_sum );115 $random_weight = wp_rand( 1, $this->weight_sum ); 160 116 $current_weight = 0; 161 foreach ( self::FEATURESas $id => $feature ) {117 foreach ( $this->features as $id => $feature ) { 162 118 $current_weight += $this->weights[ $id ]; 163 119 if ( $random_weight <= $current_weight ) { … … 167 123 'weight' => $this->weights[ $id ], 168 124 ], 169 self::FEATURES[ $id ]125 $this->features[ $id ] 170 126 ); 171 127 } … … 181 137 */ 182 138 public function render( $screen ) { 139 // Early bail!! 183 140 if ( ! $this->can_display ) { 184 141 return; 185 142 } 186 143 $winner = $this->get_winner_feature(); 144 187 145 require_once DIR . '/views/template.php'; 188 146 } … … 208 166 */ 209 167 public function build_link( $winner, $screen ) { 210 $link = "https://wpadvancedads.com/advanced-ads-labs/?utm_source=advanced-ads&utm_medium=link&utm_campaign=$screen-aa-labs&utm_term=b"; 211 $link .= str_replace( '.', '-', ADVADS_VERSION ) . "w{$winner['weight']}-{$this->weight_sum}&utm_content={$winner['id']}"; 212 213 return $link; 214 } 215 216 /** 217 * Return the singleton. Create it if needed 218 * 219 * @return Module 220 */ 221 public static function get_instance() { 222 if ( null === self::$instance ) { 223 self::$instance = new self(); 224 } 225 226 return self::$instance; 168 $utm_source = 'advanced-ads'; 169 $utm_medium = 'link'; 170 $utm_campaign = sprintf( '%s-aa-labs', $screen ); 171 $utm_term = sprintf( 172 'b%sw%d-%d', 173 str_replace( '.', '-', ADVADS_VERSION ), 174 $winner['weight'], 175 $this->weight_sum 176 ); 177 $utm_content = $winner['id']; 178 179 return sprintf( 180 'https://wpadvancedads.com/advanced-ads-labs/?utm_source=%s&utm_medium=%s&utm_campaign=%s&utm_term=%s&utm_content=%s', 181 $utm_source, 182 $utm_medium, 183 $utm_campaign, 184 $utm_term, 185 $utm_content 186 ); 187 } 188 189 /** 190 * Set the features/banners 191 * 192 * @return void 193 */ 194 private function set_features() { 195 $this->features = [ 196 'labs-campaign-manager-ay' => [ 197 'subheading' => __( 'FROM THE ADVANCED ADS LABS:', 'advanced-ads' ), 198 'heading' => __( 'The Campaign Manager', 'advanced-ads' ), 199 'weight' => 1, 200 'text' => __( 'Advanced Ads’ upcoming new product, the Campaign Manager, will shake up how you sell ad space to clients directly. It bundles a decade of users’ requests and ideas into one standalone product. The core feature set includes a brilliant advertisement schedule screen, grouping ads and reports by client, brushed-up email notifications for timed ads, and more.<br><br>Our team is in the early stages of development, and we would like to see if this product resonates with you.', 'advanced-ads' ), 201 'cta' => __( 'Are you interested in this product concept?', 'advanced-ads' ), 202 'cta_button' => __( 'Yes, I want to know more!', 'advanced-ads' ), 203 ], 204 'labs-campaign-manager-be' => [ 205 'subheading' => __( 'FROM THE ADVANCED ADS LABS:', 'advanced-ads' ), 206 'heading' => __( 'The Campaign Manager', 'advanced-ads' ), 207 'weight' => 1, 208 'text' => __( 'Advanced Ads’ upcoming new product, the Campaign Manager, will shake up how you sell ad space to clients directly. It bundles a decade of users’ requests and ideas into one standalone product. The core feature set includes a brilliant advertisement schedule screen, grouping ads and reports by client, brushed-up email notifications for timed ads, and more.<br><br>Our team is in the early stages of development, and we would like to see if this product resonates with you.', 'advanced-ads' ), 209 'cta' => __( 'Are you interested in this product concept?', 'advanced-ads' ), 210 'cta_button' => __( 'Yes, I want to know more!', 'advanced-ads' ), 211 ], 212 ]; 213 } 214 215 /** 216 * Collect feature ID with their weight as recorded in the class constant. Also calculate the weight sum 217 */ 218 private function collect_weights() { 219 if ( 0 !== $this->weight_sum ) { 220 return; 221 } 222 foreach ( $this->features as $id => $feature ) { 223 $this->weights[ $id ] = (int) $feature['weight']; 224 $this->weight_sum += $this->weights[ $id ]; 225 } 227 226 } 228 227 } -
advanced-ads/trunk/modules/pef/main.php
r3086263 r3187581 15 15 return; 16 16 } 17 18 Module::get_instance(); -
advanced-ads/trunk/modules/pef/views/template.php
r3050336 r3187581 124 124 <div class="aa_overview_pef_upper"> 125 125 <p class="aa_overview_pef_dismiss"><a class="dashicons dashicons-dismiss" href="#"></a></p> 126 <p class="aa_overview_pef_subhead"> Shout-outs from the Advanced Ads Labs</p>127 <h3 class="aa_overview_pef_head"><?php echo esc_html( $winner[' name'] ); ?></h3>128 <p class="aa_overview_pef_copy"><?php echo esc_html( $winner['text'] ); ?></p>126 <p class="aa_overview_pef_subhead"><?php echo esc_html( $winner['subheading'] ); ?></p> 127 <h3 class="aa_overview_pef_head"><?php echo esc_html( $winner['heading'] ); ?></h3> 128 <p class="aa_overview_pef_copy"><?php echo wp_kses_post( $winner['text'] ); ?></p> 129 129 </div> 130 130 <div class="aa_overview_pef_lower"> 131 <p class="aa_overview_pef_cta">Does this feature appeal to you?<a class="aa_overview_pef_button" href="<?php echo esc_url( $this->build_link( $winner, $screen ) ); ?>" target="_blank">Yes, focus on it!</a> 131 <p class="aa_overview_pef_cta"> 132 <?php echo esc_html( $winner['cta'] ); ?> 133 <a class="aa_overview_pef_button" href="<?php echo esc_url( $this->build_link( $winner, $screen ) ); ?>" target="_blank"> 134 <?php echo esc_html( $winner['cta_button'] ); ?> 135 </a> 132 136 </p> 133 137 </div> -
advanced-ads/trunk/readme.txt
r3170554 r3187581 3 3 Tags: ads, adsense, amazon, affiliate, ad manager 4 4 Requires at least: 5.0 5 Tested up to: 6. 55 Tested up to: 6.6 6 6 Requires PHP: 7.2 7 Stable tag: 1.5 5.07 Stable tag: 1.56.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 357 357 == Changelog == 358 358 359 = 1.5 5.0 (October 16, 2024) =360 361 - Improvement: add manual links to some settings359 = 1.56.0 (November 13, 2024) = 360 361 - Improvement: optimize code structure slightly for better performance 362 362 - Improvement: enhance PubGuru one click integration 363 - Fix: correct an issue with repeating ads before a heading -
advanced-ads/trunk/views/admin/screens/dashboard.php
r3086263 r3187581 7 7 */ 8 8 9 use AdvancedAds\Modules\ProductExperimentationFramework\Module; 10 9 11 ?> 10 12 <div class="wrap"> 11 13 <div id="advads-overview"> 14 <?php Module::get_instance()->render( 'overview' ); ?> 12 15 <?php Advanced_Ads_Overview_Widgets_Callbacks::setup_overview_widgets(); ?> 13 16 </div>
Note: See TracChangeset
for help on using the changeset viewer.