Plugin Directory

Changeset 3327628


Ignore:
Timestamp:
07/14/2025 03:11:25 PM (9 months ago)
Author:
10up
Message:

Update to version 1.4.6 from GitHub

Location:
ads-txt
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ads-txt/tags/1.4.6/ads-txt.php

    r3158306 r3327628  
    44 * Plugin URI:        https://github.com/10up/ads-txt
    55 * Description:       Create, manage, and validate your Ads.txt from within WordPress, just like any other content asset. Requires PHP 7.4+ and WordPress 5.7+.
    6  * Version:           1.4.5
    7  * Requires at least: 6.4
     6 * Version:           1.4.6
     7 * Requires at least: 6.6
    88 * Requires PHP:      7.4
    99 * Author:            10up
     
    2020}
    2121
    22 define( 'ADS_TXT_MANAGER_VERSION', '1.4.5' );
     22define( 'ADS_TXT_MANAGER_VERSION', '1.4.6' );
    2323define( 'ADS_TXT_MANAGE_CAPABILITY', 'edit_ads_txt' );
    2424define( 'ADS_TXT_MANAGER_POST_OPTION', 'adstxt_post' );
  • ads-txt/tags/1.4.6/inc/admin.php

    r3108141 r3327628  
    2222    wp_enqueue_script(
    2323        'adstxt',
    24         esc_url( plugins_url( '/js/admin.js', dirname( __FILE__ ) ) ),
     24        esc_url( plugins_url( '/js/admin.js', __DIR__ ) ),
    2525        array( 'jquery', 'wp-backbone', 'wp-codemirror' ),
    2626        ADS_TXT_MANAGER_VERSION,
     
    3030    wp_enqueue_style(
    3131        'adstxt',
    32         esc_url( plugins_url( '/css/admin.css', dirname( __FILE__ ) ) ),
     32        esc_url( plugins_url( '/css/admin.css', __DIR__ ) ),
    3333        array(),
    3434        ADS_TXT_MANAGER_VERSION
     
    305305        <p><?php echo esc_html( $strings['precedence'] ); ?></p>
    306306
    307         <p><?php echo esc_html_e( 'Removed the existing file but are still seeing this warning?', 'ads-txt' ); ?> <a class="ads-txt-rerun-check" href="#"><?php echo esc_html_e( 'Re-run the check now', 'ads-txt' ); ?></a> <span class="spinner" style="float:none;margin:-2px 5px 0"></span></p>
     307        <p><?php esc_html_e( 'Removed the existing file but are still seeing this warning?', 'ads-txt' ); ?> <a class="ads-txt-rerun-check" href="#"><?php esc_html_e( 'Re-run the check now', 'ads-txt' ); ?></a> <span class="spinner" style="float:none;margin:-2px 5px 0"></span></p>
    308308    </div>
    309309    <?php if ( ! empty( $errors ) ) : ?>
     
    440440
    441441    if ( ! isset( $messages[ $error['type'] ] ) ) {
    442         return __( 'Unknown error', 'adstxt' );
     442        return __( 'Unknown error', 'ads-txt' );
    443443    }
    444444
     
    464464function get_error_messages() {
    465465    $messages = array(
    466         'invalid_variable'     => __( 'Unrecognized variable' ),
    467         'invalid_record'       => __( 'Invalid record' ),
    468         'invalid_account_type' => __( 'Third field should be RESELLER or DIRECT' ),
     466        'invalid_variable'     => __( 'Unrecognized variable', 'ads-txt' ),
     467        'invalid_record'       => __( 'Invalid record', 'ads-txt' ),
     468        'invalid_account_type' => __( 'Third field should be RESELLER or DIRECT', 'ads-txt' ),
    469469        /* translators: %s: Subdomain */
    470         'invalid_subdomain'    => __( '%s does not appear to be a valid subdomain' ),
     470        'invalid_subdomain'    => __( '%s does not appear to be a valid subdomain', 'ads-txt' ),
    471471        /* translators: %s: Exchange domain */
    472         'invalid_exchange'     => __( '%s does not appear to be a valid exchange domain' ),
     472        'invalid_exchange'     => __( '%s does not appear to be a valid exchange domain', 'ads-txt' ),
    473473        /* translators: %s: Alphanumeric TAG-ID */
    474         'invalid_tagid'        => __( '%s does not appear to be a valid TAG-ID' ),
     474        'invalid_tagid'        => __( '%s does not appear to be a valid TAG-ID', 'ads-txt' ),
    475475    );
    476476
     
    524524    $ads_posts = get_posts( $args );
    525525
    526     if ( 1 === count( $ads_posts ) && [ (int) $option ] === $ads_posts ) {
    527         return false;
    528     }
    529 
    530     // Search for the active post ID and remove it from the array.
    531     $index = array_search( (int) $option, $ads_posts, true );
    532     if ( false !== $index ) {
    533         unset( $ads_posts[ $index ] );
    534     }
     526    // Remove the active post ID from the array.
     527    $ads_posts = array_filter(
     528        $ads_posts,
     529        function ( $ads_post ) use ( $option ) {
     530            return $ads_post !== (int) $option;
     531        }
     532    );
    535533
    536534    if ( empty( $ads_posts ) ) {
  • ads-txt/tags/1.4.6/inc/helpers.php

    r3108141 r3327628  
    3737             * @since 1.2.0
    3838             *
    39              * @param type $adstxt The existing ads.txt content.
     39             * @param string $adstxt The existing ads.txt content.
    4040             */
    4141            echo esc_html( apply_filters( 'ads_txt_content', $adstxt ) );
     
    6464             * @since 1.3.0
    6565             *
    66              * @param type $app_adstxt The existing ads.txt content.
     66             * @param string $app_adstxt The existing ads.txt content.
    6767             */
    6868            echo esc_html( apply_filters( 'app_ads_txt_content', $adstxt ) );
  • ads-txt/tags/1.4.6/readme.txt

    r3281243 r3327628  
    22Contributors:      10up, helen, adamsilverstein, jakemgold, peterwilsoncc, jeffpaul
    33Tags:              ads.txt, app-ads.txt, ads, ad manager, advertising
    4 Requires at least: 6.6
    54Tested up to:      6.8
    6 Stable tag:        1.4.5
     5Stable tag:        1.4.6
    76License:           GPL-2.0-or-later
    87License URI:       https://spdx.org/licenses/GPL-2.0-or-later.html
     
    5049
    5150== Changelog ==
     51
     52= 1.4.6 - 2025-07-14 =
     53* **Changed:** Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant (props [@Soean](https://github.com/Soean), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#187](https://github.com/10up/ads-txt/pull/187)).
     54* **Changed:** Bump WordPress "tested up to" version 6.8 (props [@jeffpaul](https://github.com/jeffpaul), [@godleman](https://github.com/godleman) via [#183](https://github.com/10up/ads-txt/pull/183), [#184](https://github.com/10up/ads-txt/pull/184), [#194](https://github.com/10up/ads-txt/pull/194), [#195](https://github.com/10up/ads-txt/pull/195)).
     55* **Changed:** Bump WordPress minimum supported version to 6.6 (props [@jeffpaul](https://github.com/jeffpaul), [@godleman](https://github.com/godleman) via [#183](https://github.com/10up/ads-txt/pull/183), [#184](https://github.com/10up/ads-txt/pull/184), [#194](https://github.com/10up/ads-txt/pull/194), [#195](https://github.com/10up/ads-txt/pull/195)).
     56* **Fixed:** Add missing text domain and fix wrong text domain (props [@mehrazmorshed](https://github.com/mehrazmorshed), [@dkotter](https://github.com/dkotter) via [#182](https://github.com/10up/ads-txt/pull/182)).
     57* **Fixed:** Remove unnecessary `echo` statement (props [@Soean](https://github.com/Soean), [@dkotter](https://github.com/dkotter) via [#186](https://github.com/10up/ads-txt/pull/186)).
     58* **Fixed:** Improve performance of the `clean_orphaned_posts` function (props [@dilipbheda](https://github.com/dilipbheda), [@dkotter](https://github.com/dkotter) via [#192](https://github.com/10up/ads-txt/pull/192)).
     59* **Security:** Bump `serialize-javascript` from 6.0.0 to 6.0.2 and `mocha` from 10.2.0 to 11.1.0 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#185](https://github.com/10up/ads-txt/pull/185)).
    5260
    5361= 1.4.5 - 2024-09-26 =
  • ads-txt/trunk/ads-txt.php

    r3158306 r3327628  
    44 * Plugin URI:        https://github.com/10up/ads-txt
    55 * Description:       Create, manage, and validate your Ads.txt from within WordPress, just like any other content asset. Requires PHP 7.4+ and WordPress 5.7+.
    6  * Version:           1.4.5
    7  * Requires at least: 6.4
     6 * Version:           1.4.6
     7 * Requires at least: 6.6
    88 * Requires PHP:      7.4
    99 * Author:            10up
     
    2020}
    2121
    22 define( 'ADS_TXT_MANAGER_VERSION', '1.4.5' );
     22define( 'ADS_TXT_MANAGER_VERSION', '1.4.6' );
    2323define( 'ADS_TXT_MANAGE_CAPABILITY', 'edit_ads_txt' );
    2424define( 'ADS_TXT_MANAGER_POST_OPTION', 'adstxt_post' );
  • ads-txt/trunk/inc/admin.php

    r3108141 r3327628  
    2222    wp_enqueue_script(
    2323        'adstxt',
    24         esc_url( plugins_url( '/js/admin.js', dirname( __FILE__ ) ) ),
     24        esc_url( plugins_url( '/js/admin.js', __DIR__ ) ),
    2525        array( 'jquery', 'wp-backbone', 'wp-codemirror' ),
    2626        ADS_TXT_MANAGER_VERSION,
     
    3030    wp_enqueue_style(
    3131        'adstxt',
    32         esc_url( plugins_url( '/css/admin.css', dirname( __FILE__ ) ) ),
     32        esc_url( plugins_url( '/css/admin.css', __DIR__ ) ),
    3333        array(),
    3434        ADS_TXT_MANAGER_VERSION
     
    305305        <p><?php echo esc_html( $strings['precedence'] ); ?></p>
    306306
    307         <p><?php echo esc_html_e( 'Removed the existing file but are still seeing this warning?', 'ads-txt' ); ?> <a class="ads-txt-rerun-check" href="#"><?php echo esc_html_e( 'Re-run the check now', 'ads-txt' ); ?></a> <span class="spinner" style="float:none;margin:-2px 5px 0"></span></p>
     307        <p><?php esc_html_e( 'Removed the existing file but are still seeing this warning?', 'ads-txt' ); ?> <a class="ads-txt-rerun-check" href="#"><?php esc_html_e( 'Re-run the check now', 'ads-txt' ); ?></a> <span class="spinner" style="float:none;margin:-2px 5px 0"></span></p>
    308308    </div>
    309309    <?php if ( ! empty( $errors ) ) : ?>
     
    440440
    441441    if ( ! isset( $messages[ $error['type'] ] ) ) {
    442         return __( 'Unknown error', 'adstxt' );
     442        return __( 'Unknown error', 'ads-txt' );
    443443    }
    444444
     
    464464function get_error_messages() {
    465465    $messages = array(
    466         'invalid_variable'     => __( 'Unrecognized variable' ),
    467         'invalid_record'       => __( 'Invalid record' ),
    468         'invalid_account_type' => __( 'Third field should be RESELLER or DIRECT' ),
     466        'invalid_variable'     => __( 'Unrecognized variable', 'ads-txt' ),
     467        'invalid_record'       => __( 'Invalid record', 'ads-txt' ),
     468        'invalid_account_type' => __( 'Third field should be RESELLER or DIRECT', 'ads-txt' ),
    469469        /* translators: %s: Subdomain */
    470         'invalid_subdomain'    => __( '%s does not appear to be a valid subdomain' ),
     470        'invalid_subdomain'    => __( '%s does not appear to be a valid subdomain', 'ads-txt' ),
    471471        /* translators: %s: Exchange domain */
    472         'invalid_exchange'     => __( '%s does not appear to be a valid exchange domain' ),
     472        'invalid_exchange'     => __( '%s does not appear to be a valid exchange domain', 'ads-txt' ),
    473473        /* translators: %s: Alphanumeric TAG-ID */
    474         'invalid_tagid'        => __( '%s does not appear to be a valid TAG-ID' ),
     474        'invalid_tagid'        => __( '%s does not appear to be a valid TAG-ID', 'ads-txt' ),
    475475    );
    476476
     
    524524    $ads_posts = get_posts( $args );
    525525
    526     if ( 1 === count( $ads_posts ) && [ (int) $option ] === $ads_posts ) {
    527         return false;
    528     }
    529 
    530     // Search for the active post ID and remove it from the array.
    531     $index = array_search( (int) $option, $ads_posts, true );
    532     if ( false !== $index ) {
    533         unset( $ads_posts[ $index ] );
    534     }
     526    // Remove the active post ID from the array.
     527    $ads_posts = array_filter(
     528        $ads_posts,
     529        function ( $ads_post ) use ( $option ) {
     530            return $ads_post !== (int) $option;
     531        }
     532    );
    535533
    536534    if ( empty( $ads_posts ) ) {
  • ads-txt/trunk/inc/helpers.php

    r3108141 r3327628  
    3737             * @since 1.2.0
    3838             *
    39              * @param type $adstxt The existing ads.txt content.
     39             * @param string $adstxt The existing ads.txt content.
    4040             */
    4141            echo esc_html( apply_filters( 'ads_txt_content', $adstxt ) );
     
    6464             * @since 1.3.0
    6565             *
    66              * @param type $app_adstxt The existing ads.txt content.
     66             * @param string $app_adstxt The existing ads.txt content.
    6767             */
    6868            echo esc_html( apply_filters( 'app_ads_txt_content', $adstxt ) );
  • ads-txt/trunk/readme.txt

    r3281243 r3327628  
    22Contributors:      10up, helen, adamsilverstein, jakemgold, peterwilsoncc, jeffpaul
    33Tags:              ads.txt, app-ads.txt, ads, ad manager, advertising
    4 Requires at least: 6.6
    54Tested up to:      6.8
    6 Stable tag:        1.4.5
     5Stable tag:        1.4.6
    76License:           GPL-2.0-or-later
    87License URI:       https://spdx.org/licenses/GPL-2.0-or-later.html
     
    5049
    5150== Changelog ==
     51
     52= 1.4.6 - 2025-07-14 =
     53* **Changed:** Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant (props [@Soean](https://github.com/Soean), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#187](https://github.com/10up/ads-txt/pull/187)).
     54* **Changed:** Bump WordPress "tested up to" version 6.8 (props [@jeffpaul](https://github.com/jeffpaul), [@godleman](https://github.com/godleman) via [#183](https://github.com/10up/ads-txt/pull/183), [#184](https://github.com/10up/ads-txt/pull/184), [#194](https://github.com/10up/ads-txt/pull/194), [#195](https://github.com/10up/ads-txt/pull/195)).
     55* **Changed:** Bump WordPress minimum supported version to 6.6 (props [@jeffpaul](https://github.com/jeffpaul), [@godleman](https://github.com/godleman) via [#183](https://github.com/10up/ads-txt/pull/183), [#184](https://github.com/10up/ads-txt/pull/184), [#194](https://github.com/10up/ads-txt/pull/194), [#195](https://github.com/10up/ads-txt/pull/195)).
     56* **Fixed:** Add missing text domain and fix wrong text domain (props [@mehrazmorshed](https://github.com/mehrazmorshed), [@dkotter](https://github.com/dkotter) via [#182](https://github.com/10up/ads-txt/pull/182)).
     57* **Fixed:** Remove unnecessary `echo` statement (props [@Soean](https://github.com/Soean), [@dkotter](https://github.com/dkotter) via [#186](https://github.com/10up/ads-txt/pull/186)).
     58* **Fixed:** Improve performance of the `clean_orphaned_posts` function (props [@dilipbheda](https://github.com/dilipbheda), [@dkotter](https://github.com/dkotter) via [#192](https://github.com/10up/ads-txt/pull/192)).
     59* **Security:** Bump `serialize-javascript` from 6.0.0 to 6.0.2 and `mocha` from 10.2.0 to 11.1.0 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#185](https://github.com/10up/ads-txt/pull/185)).
    5260
    5361= 1.4.5 - 2024-09-26 =
Note: See TracChangeset for help on using the changeset viewer.