Plugin Directory

Changeset 3055119


Ignore:
Timestamp:
03/20/2024 09:38:04 AM (21 months ago)
Author:
advancedads
Message:

Update to version 1.51.3 from GitHub

Location:
advanced-ads
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • advanced-ads/tags/1.51.3/admin/includes/class-meta-box.php

    r3041809 r3055119  
    301301                $advads_gadsense_options['hidden'] = ! $unit_code;
    302302                $view                              = 'gadsense-dashboard.php';
     303                $pub_id                            = Advanced_Ads_AdSense_Data::get_instance()->get_adsense_id();
    303304                $hndlelinks                        = '<a href="' . esc_url( admin_url( 'admin.php?page=advanced-ads-settings#top#adsense' ) ) . '" target="_blank">' . __( 'Disable', 'advanced-ads' ) . '</a>';
    304305                break;
  • advanced-ads/tags/1.51.3/advanced-ads.php

    r3050336 r3055119  
    1313 * Plugin URI:        https://wpadvancedads.com
    1414 * Description:       Manage and optimize your ads in WordPress
    15  * Version:           1.51.2
     15 * Version:           1.51.3
    1616 * Author:            Advanced Ads GmbH
    1717 * Author URI:        https://wpadvancedads.com
     
    3434
    3535define( 'ADVADS_FILE', __FILE__ );
    36 define( 'ADVADS_VERSION', '1.51.2' );
     36define( 'ADVADS_VERSION', '1.51.3' );
    3737
    3838// Load the autoloader.
  • advanced-ads/tags/1.51.3/includes/admin/class-groups-list-table.php

    r3006148 r3055119  
    368368     */
    369369    private function render_edit_modal( $group ): void {
    370         $group_ads_info = $this->get_group_ads_info( $group );
     370        $group_ads_info = $this->get_group_ads_info( $group, 'modal' );
    371371        $ads            = $group_ads_info['ads'] ?? null;
    372372        $weights        = $group_ads_info['weights'] ?? null;
     
    465465
    466466    /**
    467      * Get ads information for this group
     467     * Get ads information for this group.
    468468     *
    469469     * @param Advanced_Ads_Group $group group object.
    470470     *
    471      * @return WP_Query
    472      */
    473     private function get_group_ads_info( $group ) {
    474         if ( isset( $this->group_ads_info[ $group->id ] ) ) {
    475             return $this->group_ads_info[ $group->id ];
    476         }
     471     * @return array
     472     */
     473    private function get_group_ads_info( $group, $view = 'list' ) {
     474        /* TODO: reenable the following caching mechanism when switching to AA 2.0 */
     475//      if ( isset( $this->group_ads_info[ $group->id ] ) ) {
     476//          return $this->group_ads_info[ $group->id ];
     477//      }
    477478
    478479        $weights = $group->get_ad_weights();
    479 
    480         $sorted_ad_ids = array_keys( $weights );
    481         $args          = [
     480        $args    = [
    482481            'post_type'      => Entities::POST_TYPE_AD,
    483482            'post_status'    => [ 'publish', 'future', 'pending', 'private' ],
    484483            'taxonomy'       => $group->taxonomy,
    485484            'term'           => $group->slug,
    486             'posts_per_page' => - 1,
     485            'posts_per_page' => -1,
    487486        ];
    488487
    489         $ads        = new WP_Query( $args );
    490 
    491         $ad_ids     = wp_list_pluck( $ads->posts, 'ID' );
    492 
    493         $weights = array_reduce( $ads->posts, function( $carry, $item ) use ( $weights ) {
    494             $weight             = $weights[$item->ID] ?? Advanced_Ads_Group::MAX_AD_GROUP_DEFAULT_WEIGHT;
    495             $carry[ $item->ID ] = $item->post_status === 'publish' ? $weight : 0;
     488        $ads    = new WP_Query( $args );
     489        $ad_ids = wp_list_pluck( $ads->posts, 'ID' );
     490
     491        $weights = array_reduce( $ads->posts, function( $carry, $item ) use ( $weights, $view ) {
     492            $weight             = $weights[ $item->ID ] ?? Advanced_Ads_Group::MAX_AD_GROUP_DEFAULT_WEIGHT;
     493            $carry[ $item->ID ] = ( $view === 'modal' || $item->post_status === 'publish' ) ? $weight : 0;
    496494
    497495            return $carry;
  • advanced-ads/tags/1.51.3/languages/advanced-ads.pot

    r3050336 r3055119  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Advanced Ads 1.51.1\n"
     5"Project-Id-Version: Advanced Ads 1.51.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads/\n"
    77"Last-Translator: Thomas Maier <[email protected]>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-03-13T09:10:08+00:00\n"
     12"POT-Creation-Date: 2024-03-20T09:37:32+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.6.0\n"
     
    1616
    1717#. Plugin Name of the plugin
    18 #: admin/includes/class-meta-box.php:564
     18#: admin/includes/class-meta-box.php:565
    1919#: modules/gutenberg/includes/class-gutenberg.php:136
    2020msgid "Advanced Ads"
     
    518518msgstr ""
    519519
    520 #: admin/includes/class-meta-box.php:303
     520#: admin/includes/class-meta-box.php:304
    521521#: admin/includes/class-overview-widgets.php:64
    522522msgid "Disable"
    523523msgstr ""
    524524
    525 #: admin/includes/class-meta-box.php:465
     525#: admin/includes/class-meta-box.php:466
    526526msgid "Ad Settings"
    527527msgstr ""
    528528
    529529#. translators: %1$d is the number of ads, %2$s and %3$s are URLs.
    530 #: admin/includes/class-meta-box.php:580
     530#: admin/includes/class-meta-box.php:581
    531531msgid "%1$d ads – <a href=\"%2$s\">manage</a> - <a href=\"%3$s\">new</a>"
    532532msgstr ""
    533533
    534 #: admin/includes/class-meta-box.php:593
     534#: admin/includes/class-meta-box.php:594
    535535msgid "Get the tutorial via email"
    536536msgstr ""
    537537
    538 #: admin/includes/class-meta-box.php:602
     538#: admin/includes/class-meta-box.php:603
    539539msgid "Get AdSense tips via email"
    540540msgstr ""
    541541
    542 #: admin/includes/class-meta-box.php:611
     542#: admin/includes/class-meta-box.php:612
    543543msgid "Visit our blog for more articles about ad optimization"
    544544msgstr ""
    545545
    546546#. translators: %s is our URL.
    547 #: admin/includes/class-meta-box.php:666
     547#: admin/includes/class-meta-box.php:667
    548548msgid "Latest posts on wpadvancedads.com"
    549549msgstr ""
     
    28772877
    28782878#. translators: amount of ads displayed
    2879 #: includes/admin/class-groups-list-table.php:528
     2879#: includes/admin/class-groups-list-table.php:526
    28802880msgid "Up to %d ad displayed."
    28812881msgid_plural "Up to %d ads displayed"
     
    45724572
    45734573#. translators: %d is a number.
    4574 #: views/admin/tables/groups/list-row-loop.php:38
     4574#: views/admin/tables/groups/list-row-loop.php:42
    45754575msgid "show %d more ads"
    45764576msgstr ""
  • advanced-ads/tags/1.51.3/readme.txt

    r3050336 r3055119  
    55Tested up to: 6.4
    66Requires PHP: 7.2
    7 Stable tag: 1.51.2
     7Stable tag: 1.51.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    339339== Changelog ==
    340340
     341= 1.51.3 (March 20, 2024) =
     342
     343- Fix: prevent weight reset to 0 for resaved scheduled ads
     344- Fix: correct issue with AdSense metabox on ad edit page
     345
    341346= 1.51.2 (March 13, 2024) =
    342347
  • advanced-ads/tags/1.51.3/views/admin/tables/groups/list-row-loop.php

    r2983598 r3055119  
    99 * @var int[]              $weights    All weights.
    1010 * @var int                $weight_sum Sum of all ad weights.
     11 * @var Groups_List_Table  $this       The group terms list table class.
     12 * @var WP_Query           $ads        The query object to fetch all ads inside that group.
    1113 */
     14
     15use AdvancedAds\Admin\Groups_List_Table;
    1216
    1317$i = 1;
  • advanced-ads/trunk/admin/includes/class-meta-box.php

    r3041809 r3055119  
    301301                $advads_gadsense_options['hidden'] = ! $unit_code;
    302302                $view                              = 'gadsense-dashboard.php';
     303                $pub_id                            = Advanced_Ads_AdSense_Data::get_instance()->get_adsense_id();
    303304                $hndlelinks                        = '<a href="' . esc_url( admin_url( 'admin.php?page=advanced-ads-settings#top#adsense' ) ) . '" target="_blank">' . __( 'Disable', 'advanced-ads' ) . '</a>';
    304305                break;
  • advanced-ads/trunk/advanced-ads.php

    r3050336 r3055119  
    1313 * Plugin URI:        https://wpadvancedads.com
    1414 * Description:       Manage and optimize your ads in WordPress
    15  * Version:           1.51.2
     15 * Version:           1.51.3
    1616 * Author:            Advanced Ads GmbH
    1717 * Author URI:        https://wpadvancedads.com
     
    3434
    3535define( 'ADVADS_FILE', __FILE__ );
    36 define( 'ADVADS_VERSION', '1.51.2' );
     36define( 'ADVADS_VERSION', '1.51.3' );
    3737
    3838// Load the autoloader.
  • advanced-ads/trunk/includes/admin/class-groups-list-table.php

    r3006148 r3055119  
    368368     */
    369369    private function render_edit_modal( $group ): void {
    370         $group_ads_info = $this->get_group_ads_info( $group );
     370        $group_ads_info = $this->get_group_ads_info( $group, 'modal' );
    371371        $ads            = $group_ads_info['ads'] ?? null;
    372372        $weights        = $group_ads_info['weights'] ?? null;
     
    465465
    466466    /**
    467      * Get ads information for this group
     467     * Get ads information for this group.
    468468     *
    469469     * @param Advanced_Ads_Group $group group object.
    470470     *
    471      * @return WP_Query
    472      */
    473     private function get_group_ads_info( $group ) {
    474         if ( isset( $this->group_ads_info[ $group->id ] ) ) {
    475             return $this->group_ads_info[ $group->id ];
    476         }
     471     * @return array
     472     */
     473    private function get_group_ads_info( $group, $view = 'list' ) {
     474        /* TODO: reenable the following caching mechanism when switching to AA 2.0 */
     475//      if ( isset( $this->group_ads_info[ $group->id ] ) ) {
     476//          return $this->group_ads_info[ $group->id ];
     477//      }
    477478
    478479        $weights = $group->get_ad_weights();
    479 
    480         $sorted_ad_ids = array_keys( $weights );
    481         $args          = [
     480        $args    = [
    482481            'post_type'      => Entities::POST_TYPE_AD,
    483482            'post_status'    => [ 'publish', 'future', 'pending', 'private' ],
    484483            'taxonomy'       => $group->taxonomy,
    485484            'term'           => $group->slug,
    486             'posts_per_page' => - 1,
     485            'posts_per_page' => -1,
    487486        ];
    488487
    489         $ads        = new WP_Query( $args );
    490 
    491         $ad_ids     = wp_list_pluck( $ads->posts, 'ID' );
    492 
    493         $weights = array_reduce( $ads->posts, function( $carry, $item ) use ( $weights ) {
    494             $weight             = $weights[$item->ID] ?? Advanced_Ads_Group::MAX_AD_GROUP_DEFAULT_WEIGHT;
    495             $carry[ $item->ID ] = $item->post_status === 'publish' ? $weight : 0;
     488        $ads    = new WP_Query( $args );
     489        $ad_ids = wp_list_pluck( $ads->posts, 'ID' );
     490
     491        $weights = array_reduce( $ads->posts, function( $carry, $item ) use ( $weights, $view ) {
     492            $weight             = $weights[ $item->ID ] ?? Advanced_Ads_Group::MAX_AD_GROUP_DEFAULT_WEIGHT;
     493            $carry[ $item->ID ] = ( $view === 'modal' || $item->post_status === 'publish' ) ? $weight : 0;
    496494
    497495            return $carry;
  • advanced-ads/trunk/languages/advanced-ads.pot

    r3050336 r3055119  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Advanced Ads 1.51.1\n"
     5"Project-Id-Version: Advanced Ads 1.51.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads/\n"
    77"Last-Translator: Thomas Maier <[email protected]>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-03-13T09:10:08+00:00\n"
     12"POT-Creation-Date: 2024-03-20T09:37:32+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.6.0\n"
     
    1616
    1717#. Plugin Name of the plugin
    18 #: admin/includes/class-meta-box.php:564
     18#: admin/includes/class-meta-box.php:565
    1919#: modules/gutenberg/includes/class-gutenberg.php:136
    2020msgid "Advanced Ads"
     
    518518msgstr ""
    519519
    520 #: admin/includes/class-meta-box.php:303
     520#: admin/includes/class-meta-box.php:304
    521521#: admin/includes/class-overview-widgets.php:64
    522522msgid "Disable"
    523523msgstr ""
    524524
    525 #: admin/includes/class-meta-box.php:465
     525#: admin/includes/class-meta-box.php:466
    526526msgid "Ad Settings"
    527527msgstr ""
    528528
    529529#. translators: %1$d is the number of ads, %2$s and %3$s are URLs.
    530 #: admin/includes/class-meta-box.php:580
     530#: admin/includes/class-meta-box.php:581
    531531msgid "%1$d ads – <a href=\"%2$s\">manage</a> - <a href=\"%3$s\">new</a>"
    532532msgstr ""
    533533
    534 #: admin/includes/class-meta-box.php:593
     534#: admin/includes/class-meta-box.php:594
    535535msgid "Get the tutorial via email"
    536536msgstr ""
    537537
    538 #: admin/includes/class-meta-box.php:602
     538#: admin/includes/class-meta-box.php:603
    539539msgid "Get AdSense tips via email"
    540540msgstr ""
    541541
    542 #: admin/includes/class-meta-box.php:611
     542#: admin/includes/class-meta-box.php:612
    543543msgid "Visit our blog for more articles about ad optimization"
    544544msgstr ""
    545545
    546546#. translators: %s is our URL.
    547 #: admin/includes/class-meta-box.php:666
     547#: admin/includes/class-meta-box.php:667
    548548msgid "Latest posts on wpadvancedads.com"
    549549msgstr ""
     
    28772877
    28782878#. translators: amount of ads displayed
    2879 #: includes/admin/class-groups-list-table.php:528
     2879#: includes/admin/class-groups-list-table.php:526
    28802880msgid "Up to %d ad displayed."
    28812881msgid_plural "Up to %d ads displayed"
     
    45724572
    45734573#. translators: %d is a number.
    4574 #: views/admin/tables/groups/list-row-loop.php:38
     4574#: views/admin/tables/groups/list-row-loop.php:42
    45754575msgid "show %d more ads"
    45764576msgstr ""
  • advanced-ads/trunk/readme.txt

    r3050336 r3055119  
    55Tested up to: 6.4
    66Requires PHP: 7.2
    7 Stable tag: 1.51.2
     7Stable tag: 1.51.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    339339== Changelog ==
    340340
     341= 1.51.3 (March 20, 2024) =
     342
     343- Fix: prevent weight reset to 0 for resaved scheduled ads
     344- Fix: correct issue with AdSense metabox on ad edit page
     345
    341346= 1.51.2 (March 13, 2024) =
    342347
  • advanced-ads/trunk/views/admin/tables/groups/list-row-loop.php

    r2983598 r3055119  
    99 * @var int[]              $weights    All weights.
    1010 * @var int                $weight_sum Sum of all ad weights.
     11 * @var Groups_List_Table  $this       The group terms list table class.
     12 * @var WP_Query           $ads        The query object to fetch all ads inside that group.
    1113 */
     14
     15use AdvancedAds\Admin\Groups_List_Table;
    1216
    1317$i = 1;
Note: See TracChangeset for help on using the changeset viewer.