Ads.txt Manager - Version 1.4.1

Version Description

  • Added: Support for OWNERDOMAIN & MANAGERDOMAIN per version 1.1 of the spec (props @SoftCreatR, @tott, @jeffpaul, @peterwilsoncc via #108)
  • Added: Unit tests (props @jeffpaul, @cadic, @faisal-alvi, @peterwilsoncc via #87)
  • Added: Dependency security scanning (props @jeffpaul, @peterwilsoncc via #97)
  • changed: Bump Wordpress tested up to to 6.1 (props @jayedul, @dkotter, @jeffpaul, @peterwilsoncc via #113)
  • changed: Minimum WP and PHP version requirement bumped to 5.7 and 7.4 respectively (props @jayedul, @dkotter, @peterwilsoncc, @cadic via #103, #117)
  • Fixed: Base URL corrected for E2E test suite. (props @peterwilsoncc, @cadic, @dkotter via #112)
  • Security: Bump got and @wordpress/env (props @jeffpaul, @peterwilsoncc, @dependabot, @dkotter via #104)
  • Security: Bump simple-git and @wordpress/env (props @jeffpaul, @peterwilsoncc via #105)
Download this release

Release Info

Developer 10up
Plugin Icon 128x128 Ads.txt Manager
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4.0 to 1.4.1

Files changed (3) hide show
  1. ads-txt.php +10 -8
  2. inc/save.php +2 -2
  3. readme.txt +26 -25
ads-txt.php CHANGED
@@ -1,12 +1,14 @@
1
  <?php
2
  /**
3
- * Plugin Name: Ads.txt Manager
4
- * Description: Create, manage, and validate your Ads.txt from within WordPress, just like any other content asset. Requires PHP 5.3+ and WordPress 4.9+.
5
- * Version: 1.4.0
6
- * Author: 10up
7
- * Author URI: https://10up.com
8
- * License: GPLv2 or later
9
- * Text Domain: ads-txt
 
 
10
  *
11
  * @package Ads_Txt_Manager
12
  */
@@ -15,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
15
  exit; // Exit if accessed directly.
16
  }
17
 
18
- define( 'ADS_TXT_MANAGER_VERSION', '1.4.0' );
19
  define( 'ADS_TXT_MANAGE_CAPABILITY', 'edit_ads_txt' );
20
  define( 'ADS_TXT_MANAGER_POST_OPTION', 'adstxt_post' );
21
  define( 'APP_ADS_TXT_MANAGER_POST_OPTION', 'app_adstxt_post' );
1
  <?php
2
  /**
3
+ * Plugin Name: Ads.txt Manager
4
+ * 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+.
5
+ * Version: 1.4.1
6
+ * Author: 10up
7
+ * Author URI: https://10up.com
8
+ * License: GPLv2 or later
9
+ * Requires at least: 5.7
10
+ * Requires PHP: 7.4
11
+ * Text Domain: ads-txt
12
  *
13
  * @package Ads_Txt_Manager
14
  */
17
  exit; // Exit if accessed directly.
18
  }
19
 
20
+ define( 'ADS_TXT_MANAGER_VERSION', '1.4.1' );
21
  define( 'ADS_TXT_MANAGE_CAPABILITY', 'edit_ads_txt' );
22
  define( 'ADS_TXT_MANAGER_POST_OPTION', 'adstxt_post' );
23
  define( 'APP_ADS_TXT_MANAGER_POST_OPTION', 'app_adstxt_post' );
inc/save.php CHANGED
@@ -104,8 +104,8 @@ function validate_line( $line, $line_number ) {
104
  } elseif ( 0 === strpos( $line, '#' ) ) { // This is a full-line comment.
105
  $sanitized = wp_strip_all_tags( $line );
106
  } elseif ( 1 < strpos( $line, '=' ) ) { // This is a variable declaration.
107
- // The spec currently supports CONTACT, INVENTORYPARTNERDOMAIN and SUBDOMAIN.
108
- if ( ! preg_match( '/^(CONTACT|SUBDOMAIN|INVENTORYPARTNERDOMAIN)=/i', $line ) ) {
109
  $errors[] = array(
110
  'line' => $line_number,
111
  'type' => 'invalid_variable',
104
  } elseif ( 0 === strpos( $line, '#' ) ) { // This is a full-line comment.
105
  $sanitized = wp_strip_all_tags( $line );
106
  } elseif ( 1 < strpos( $line, '=' ) ) { // This is a variable declaration.
107
+ // The spec currently supports CONTACT, INVENTORYPARTNERDOMAIN, SUBDOMAIN, OWNERDOMAIN and MANAGERDOMAIN.
108
+ if ( ! preg_match( '/^(CONTACT|SUBDOMAIN|INVENTORYPARTNERDOMAIN|OWNERDOMAIN|MANAGERDOMAIN)=/i', $line ) ) {
109
  $errors[] = array(
110
  'line' => $line_number,
111
  'type' => 'invalid_variable',
readme.txt CHANGED
@@ -3,19 +3,19 @@ Contributors: 10up, helen, adamsilverstein, jakemgold, peterwilsoncc
3
  Author URI: https://10up.com
4
  Plugin URI: https://github.com/10up/ads-txt
5
  Tags: ads.txt, app-ads.txt, ads, ad manager, advertising, publishing, publishers
6
- Requires at least: 4.9
7
- Tested up to: 6.0
8
- Requires PHP: 5.3
9
- Stable tag: 1.4.0
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
12
  Text Domain: ads-txt
13
 
14
- Create, manage, and validate your ads.txt and app-ads.txt from within WordPress, just like any other content asset. Requires PHP 5.3+ and WordPress 4.9+.
15
 
16
  == Description ==
17
 
18
- Create, manage, and validate your ads.txt and app-ads.txt from within WordPress, just like any other content asset. Requires PHP 5.3+ and WordPress 4.9+.
19
 
20
  === What is ads.txt? ===
21
 
@@ -23,8 +23,8 @@ Ads.txt is an initiative by the Interactive Advertising Bureau to enable publish
23
 
24
  === Technical Notes ===
25
 
26
- * Requires PHP 5.3+.
27
- * Requires WordPress 4.9+. Older versions of WordPress will not display any syntax highlighting and may break JavaScript and/or be unable to localize the plugin.
28
  * Ad blockers may break syntax highlighting and pre-save error checking on the edit screen.
29
  * Rewrites need to be enabled. Without rewrites, WordPress cannot know to supply `/ads.txt` when requested.
30
  * Your site URL must not contain a path (e.g. `https://example.com/site/` or path-based multisite installs). While the plugin will appear to function in the admin, it will not display the contents at `https://example.com/site/ads.txt`. This is because the plugin follows the IAB spec, which requires that the ads.txt file be located at the root of a domain or subdomain.
@@ -55,15 +55,25 @@ You will need to rename or remove the existing (app-)ads.txt file (keeping a cop
55
 
56
  == Changelog ==
57
 
 
 
 
 
 
 
 
 
 
 
58
  = 1.4.0 =
59
- * **Added:** support for the `INVENTORYPARTNERDOMAIN` variable (props [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi))
60
- * **Added:** end to end tests with Cypress (props [@cadic](https://github.com/cadic), [@dinhtungdu](https://github.com/dinhtungdu), [@darylldoyle](https://github.com/darylldoyle), [@Sidsector9](https://github.com/Sidsector9))
61
- * **Changed:** update dealerdirect/phpcodesniffer-composer-installer from 0.5.x to 0.7.1 (props [@evokelektrique](http://github.com/evokelektrique), [@peterwilsoncc](http://github.com/peterwilsoncc))
62
- * **Changed:** update minimist from 1.2.5 to 1.2.6
63
- * **Changed:** bump Wordpress tested up to to 6.0 (props [@mohitwp](https://github.com/mohitwp), [@cadic](https://github.com/cadic), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#85](https://github.com/10up/ads-txt/pull/85), [#90](https://github.com/10up/ads-txt/pull/90))
64
- * **Changed:** automated testing code compatibility against PHP versions from 5.3 to 8.1 (props [@cadic](https://github.com/cadic))
65
- * **Fixed:** allow admins to access revisions (props [@PypWalters](https://github.com/PypWalters), [@dinhtungdu](https://github.com/dinhtungdu))
66
- * **Fixed:** coding standards violations (props [@peterwilsoncc](http://github.com/peterwilsoncc))
67
 
68
  = 1.3.0 =
69
  * **Added:** Support for app-ads.txt filetype (props [@helen](https://profiles.wordpress.org/helen/), [@westi](https://profiles.wordpress.org/westi/), [@p0mmy](https://github.com/p0mmy))
@@ -73,13 +83,4 @@ You will need to rename or remove the existing (app-)ads.txt file (keeping a cop
73
  * **Changed:** Updated plugin screenshots and FAQs (props [@jeffpaul](https://profiles.wordpress.org/jeffpaul/), [@helen](https://profiles.wordpress.org/helen/))
74
  * **Fixed:** Update capability check when saving ads.txt (props [@eclev91](https://profiles.wordpress.org/eclev91/))
75
 
76
- = 1.2.0 =
77
- * **Added:** Make revisions accessible in the admin - now you can restore older versions of your ads.txt or view how it's changed over time (props [@adamsilverstein](https://profiles.wordpress.org/adamsilverstein/), [@helen](https://profiles.wordpress.org/helen/))
78
- * **Added:** Show a notice on the edit screen if an ads.txt file exists on the server (props [@kkoppenhaver](https://profiles.wordpress.org/kkoppenhaver/), [@helen](https://profiles.wordpress.org/helen/), [@tjnowell](https://profiles.wordpress.org/tjnowell/), [@adamsilverstein](https://profiles.wordpress.org/adamsilverstein/))
79
- * **Added:** Add a custom `edit_ads_txt` capability for granular assignment, which is assigned to administrators by default (props [@eclev91](https://profiles.wordpress.org/eclev91/), [@adamsilverstein](https://profiles.wordpress.org/adamsilverstein/))
80
- * **Added:** Enable filtering of the output using `ads_txt_content` (props [@eclev91](https://profiles.wordpress.org/eclev91/))
81
- * **Changed:** Updated documentation, automation, and coding standards (props [@jeffpaul](https://profiles.wordpress.org/jeffpaul/), [@adamsilverstein](https://profiles.wordpress.org/adamsilverstein/), [@helen](https://profiles.wordpress.org/helen/), [@mmcachran](https://profiles.wordpress.org/mmcachran/))
82
- * **Fixed:** Early escaping (props [@tjnowell](https://profiles.wordpress.org/tjnowell/))
83
- * **Fixed:** PHPCS issues and added PHPCS scanning (props [@adamsilverstein](https://profiles.wordpress.org/adamsilverstein/))
84
-
85
  Further changelog entries can be found in the [CHANGELOG.md](https://github.com/10up/ads-txt/blob/trunk/CHANGELOG.md) file.
3
  Author URI: https://10up.com
4
  Plugin URI: https://github.com/10up/ads-txt
5
  Tags: ads.txt, app-ads.txt, ads, ad manager, advertising, publishing, publishers
6
+ Requires at least: 5.7
7
+ Tested up to: 6.1
8
+ Requires PHP: 7.4
9
+ Stable tag: 1.4.1
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
12
  Text Domain: ads-txt
13
 
14
+ Create, manage, and validate your ads.txt and app-ads.txt from within WordPress, just like any other content asset. Requires PHP 7.4+ and WordPress 5.7+.
15
 
16
  == Description ==
17
 
18
+ Create, manage, and validate your ads.txt and app-ads.txt from within WordPress, just like any other content asset. Requires PHP 7.4+ and WordPress 5.7+.
19
 
20
  === What is ads.txt? ===
21
 
23
 
24
  === Technical Notes ===
25
 
26
+ * Requires PHP 7.4+.
27
+ * Requires WordPress 5.7+.
28
  * Ad blockers may break syntax highlighting and pre-save error checking on the edit screen.
29
  * Rewrites need to be enabled. Without rewrites, WordPress cannot know to supply `/ads.txt` when requested.
30
  * Your site URL must not contain a path (e.g. `https://example.com/site/` or path-based multisite installs). While the plugin will appear to function in the admin, it will not display the contents at `https://example.com/site/ads.txt`. This is because the plugin follows the IAB spec, which requires that the ads.txt file be located at the root of a domain or subdomain.
55
 
56
  == Changelog ==
57
 
58
+ = 1.4.1 =
59
+ * **Added:** Support for OWNERDOMAIN & MANAGERDOMAIN per version 1.1 of the spec (props [@SoftCreatR](https://github.com/SoftCreatR), [@tott](https://github.com/tott), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#108](https://github.com/10up/ads-txt/pull/108))
60
+ * **Added:** Unit tests (props [@jeffpaul](https://github.com/jeffpaul), [@cadic](https://github.com/cadic), [@faisal-alvi](https://github.com/faisal-alvi), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#87](https://github.com/10up/ads-txt/pull/87))
61
+ * **Added:** Dependency security scanning (props [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#97](https://github.com/10up/ads-txt/pull/97))
62
+ * **changed:** Bump Wordpress tested up to to 6.1 (props [@jayedul](https://github.com/jayedul), [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#113](https://github.com/10up/ads-txt/pull/113))
63
+ * **changed:** Minimum WP and PHP version requirement bumped to 5.7 and 7.4 respectively (props [@jayedul](https://github.com/jayedul), [@dkotter](https://github.com/dkotter), [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic) via [#103](https://github.com/10up/ads-txt/pull/103), [#117](https://github.com/10up/ads-txt/pull/117))
64
+ * **Fixed:** Base URL corrected for E2E test suite. (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic), [@dkotter](https://github.com/dkotter) via [#112](https://github.com/10up/ads-txt/pull/112))
65
+ * **Security:** Bump got and @wordpress/env (props [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc), [@dependabot](https://github.com/dependabot), [@dkotter](https://github.com/dkotter) via [#104](https://github.com/10up/ads-txt/pull/104))
66
+ * **Security:** Bump simple-git and @wordpress/env (props [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#105](https://github.com/10up/ads-txt/pull/105))
67
+
68
  = 1.4.0 =
69
+ * **Added:** Support for the `INVENTORYPARTNERDOMAIN` variable (props [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi))
70
+ * **Added:** End to end tests with Cypress (props [@cadic](https://github.com/cadic), [@dinhtungdu](https://github.com/dinhtungdu), [@darylldoyle](https://github.com/darylldoyle), [@Sidsector9](https://github.com/Sidsector9))
71
+ * **Changed:** Update dealerdirect/phpcodesniffer-composer-installer from 0.5.x to 0.7.1 (props [@evokelektrique](http://github.com/evokelektrique), [@peterwilsoncc](http://github.com/peterwilsoncc))
72
+ * **Changed:** Update minimist from 1.2.5 to 1.2.6
73
+ * **Changed:** Bump Wordpress tested up to to 6.0 (props [@mohitwp](https://github.com/mohitwp), [@cadic](https://github.com/cadic), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#85](https://github.com/10up/ads-txt/pull/85), [#90](https://github.com/10up/ads-txt/pull/90))
74
+ * **Changed:** Automated testing code compatibility against PHP versions from 5.3 to 8.1 (props [@cadic](https://github.com/cadic))
75
+ * **Fixed:** Allow admins to access revisions (props [@PypWalters](https://github.com/PypWalters), [@dinhtungdu](https://github.com/dinhtungdu))
76
+ * **Fixed:** Coding standards violations (props [@peterwilsoncc](http://github.com/peterwilsoncc))
77
 
78
  = 1.3.0 =
79
  * **Added:** Support for app-ads.txt filetype (props [@helen](https://profiles.wordpress.org/helen/), [@westi](https://profiles.wordpress.org/westi/), [@p0mmy](https://github.com/p0mmy))
83
  * **Changed:** Updated plugin screenshots and FAQs (props [@jeffpaul](https://profiles.wordpress.org/jeffpaul/), [@helen](https://profiles.wordpress.org/helen/))
84
  * **Fixed:** Update capability check when saving ads.txt (props [@eclev91](https://profiles.wordpress.org/eclev91/))
85
 
 
 
 
 
 
 
 
 
 
86
  Further changelog entries can be found in the [CHANGELOG.md](https://github.com/10up/ads-txt/blob/trunk/CHANGELOG.md) file.