Changeset 3327628
- Timestamp:
- 07/14/2025 03:11:25 PM (9 months ago)
- Location:
- ads-txt
- Files:
-
- 8 edited
- 1 copied
-
tags/1.4.6 (copied) (copied from ads-txt/trunk)
-
tags/1.4.6/ads-txt.php (modified) (2 diffs)
-
tags/1.4.6/inc/admin.php (modified) (6 diffs)
-
tags/1.4.6/inc/helpers.php (modified) (2 diffs)
-
tags/1.4.6/readme.txt (modified) (2 diffs)
-
trunk/ads-txt.php (modified) (2 diffs)
-
trunk/inc/admin.php (modified) (6 diffs)
-
trunk/inc/helpers.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ads-txt/tags/1.4.6/ads-txt.php
r3158306 r3327628 4 4 * Plugin URI: https://github.com/10up/ads-txt 5 5 * 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. 57 * Requires at least: 6. 46 * Version: 1.4.6 7 * Requires at least: 6.6 8 8 * Requires PHP: 7.4 9 9 * Author: 10up … … 20 20 } 21 21 22 define( 'ADS_TXT_MANAGER_VERSION', '1.4. 5' );22 define( 'ADS_TXT_MANAGER_VERSION', '1.4.6' ); 23 23 define( 'ADS_TXT_MANAGE_CAPABILITY', 'edit_ads_txt' ); 24 24 define( 'ADS_TXT_MANAGER_POST_OPTION', 'adstxt_post' ); -
ads-txt/tags/1.4.6/inc/admin.php
r3108141 r3327628 22 22 wp_enqueue_script( 23 23 'adstxt', 24 esc_url( plugins_url( '/js/admin.js', dirname( __FILE__ )) ),24 esc_url( plugins_url( '/js/admin.js', __DIR__ ) ), 25 25 array( 'jquery', 'wp-backbone', 'wp-codemirror' ), 26 26 ADS_TXT_MANAGER_VERSION, … … 30 30 wp_enqueue_style( 31 31 'adstxt', 32 esc_url( plugins_url( '/css/admin.css', dirname( __FILE__ )) ),32 esc_url( plugins_url( '/css/admin.css', __DIR__ ) ), 33 33 array(), 34 34 ADS_TXT_MANAGER_VERSION … … 305 305 <p><?php echo esc_html( $strings['precedence'] ); ?></p> 306 306 307 <p><?php e cho esc_html_e( 'Removed the existing file but are still seeing this warning?', 'ads-txt' ); ?> <a class="ads-txt-rerun-check" href="#"><?php echoesc_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> 308 308 </div> 309 309 <?php if ( ! empty( $errors ) ) : ?> … … 440 440 441 441 if ( ! isset( $messages[ $error['type'] ] ) ) { 442 return __( 'Unknown error', 'ads txt' );442 return __( 'Unknown error', 'ads-txt' ); 443 443 } 444 444 … … 464 464 function get_error_messages() { 465 465 $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' ), 469 469 /* 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' ), 471 471 /* 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' ), 473 473 /* 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' ), 475 475 ); 476 476 … … 524 524 $ads_posts = get_posts( $args ); 525 525 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 ); 535 533 536 534 if ( empty( $ads_posts ) ) { -
ads-txt/tags/1.4.6/inc/helpers.php
r3108141 r3327628 37 37 * @since 1.2.0 38 38 * 39 * @param type$adstxt The existing ads.txt content.39 * @param string $adstxt The existing ads.txt content. 40 40 */ 41 41 echo esc_html( apply_filters( 'ads_txt_content', $adstxt ) ); … … 64 64 * @since 1.3.0 65 65 * 66 * @param type$app_adstxt The existing ads.txt content.66 * @param string $app_adstxt The existing ads.txt content. 67 67 */ 68 68 echo esc_html( apply_filters( 'app_ads_txt_content', $adstxt ) ); -
ads-txt/tags/1.4.6/readme.txt
r3281243 r3327628 2 2 Contributors: 10up, helen, adamsilverstein, jakemgold, peterwilsoncc, jeffpaul 3 3 Tags: ads.txt, app-ads.txt, ads, ad manager, advertising 4 Requires at least: 6.65 4 Tested up to: 6.8 6 Stable tag: 1.4. 55 Stable tag: 1.4.6 7 6 License: GPL-2.0-or-later 8 7 License URI: https://spdx.org/licenses/GPL-2.0-or-later.html … … 50 49 51 50 == 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)). 52 60 53 61 = 1.4.5 - 2024-09-26 = -
ads-txt/trunk/ads-txt.php
r3158306 r3327628 4 4 * Plugin URI: https://github.com/10up/ads-txt 5 5 * 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. 57 * Requires at least: 6. 46 * Version: 1.4.6 7 * Requires at least: 6.6 8 8 * Requires PHP: 7.4 9 9 * Author: 10up … … 20 20 } 21 21 22 define( 'ADS_TXT_MANAGER_VERSION', '1.4. 5' );22 define( 'ADS_TXT_MANAGER_VERSION', '1.4.6' ); 23 23 define( 'ADS_TXT_MANAGE_CAPABILITY', 'edit_ads_txt' ); 24 24 define( 'ADS_TXT_MANAGER_POST_OPTION', 'adstxt_post' ); -
ads-txt/trunk/inc/admin.php
r3108141 r3327628 22 22 wp_enqueue_script( 23 23 'adstxt', 24 esc_url( plugins_url( '/js/admin.js', dirname( __FILE__ )) ),24 esc_url( plugins_url( '/js/admin.js', __DIR__ ) ), 25 25 array( 'jquery', 'wp-backbone', 'wp-codemirror' ), 26 26 ADS_TXT_MANAGER_VERSION, … … 30 30 wp_enqueue_style( 31 31 'adstxt', 32 esc_url( plugins_url( '/css/admin.css', dirname( __FILE__ )) ),32 esc_url( plugins_url( '/css/admin.css', __DIR__ ) ), 33 33 array(), 34 34 ADS_TXT_MANAGER_VERSION … … 305 305 <p><?php echo esc_html( $strings['precedence'] ); ?></p> 306 306 307 <p><?php e cho esc_html_e( 'Removed the existing file but are still seeing this warning?', 'ads-txt' ); ?> <a class="ads-txt-rerun-check" href="#"><?php echoesc_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> 308 308 </div> 309 309 <?php if ( ! empty( $errors ) ) : ?> … … 440 440 441 441 if ( ! isset( $messages[ $error['type'] ] ) ) { 442 return __( 'Unknown error', 'ads txt' );442 return __( 'Unknown error', 'ads-txt' ); 443 443 } 444 444 … … 464 464 function get_error_messages() { 465 465 $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' ), 469 469 /* 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' ), 471 471 /* 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' ), 473 473 /* 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' ), 475 475 ); 476 476 … … 524 524 $ads_posts = get_posts( $args ); 525 525 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 ); 535 533 536 534 if ( empty( $ads_posts ) ) { -
ads-txt/trunk/inc/helpers.php
r3108141 r3327628 37 37 * @since 1.2.0 38 38 * 39 * @param type$adstxt The existing ads.txt content.39 * @param string $adstxt The existing ads.txt content. 40 40 */ 41 41 echo esc_html( apply_filters( 'ads_txt_content', $adstxt ) ); … … 64 64 * @since 1.3.0 65 65 * 66 * @param type$app_adstxt The existing ads.txt content.66 * @param string $app_adstxt The existing ads.txt content. 67 67 */ 68 68 echo esc_html( apply_filters( 'app_ads_txt_content', $adstxt ) ); -
ads-txt/trunk/readme.txt
r3281243 r3327628 2 2 Contributors: 10up, helen, adamsilverstein, jakemgold, peterwilsoncc, jeffpaul 3 3 Tags: ads.txt, app-ads.txt, ads, ad manager, advertising 4 Requires at least: 6.65 4 Tested up to: 6.8 6 Stable tag: 1.4. 55 Stable tag: 1.4.6 7 6 License: GPL-2.0-or-later 8 7 License URI: https://spdx.org/licenses/GPL-2.0-or-later.html … … 50 49 51 50 == 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)). 52 60 53 61 = 1.4.5 - 2024-09-26 =
Note: See TracChangeset
for help on using the changeset viewer.