Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Dec 14, 2022
2 parents 2741ace + e267bb1 commit 257973e
Show file tree
Hide file tree
Showing 26 changed files with 2,686 additions and 331 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.phpcs.xml.dist export-ignore
/.phpunit.result.cache export-ignore
/.wp-env.json export-ignore
/.wp-env.override.json export-ignore
/CHANGELOG.md export-ignore
Expand All @@ -18,4 +19,5 @@
/LICENSE.md export-ignore
/package-lock.json export-ignore
/package.json export-ignore
/phpunit.xml.dist export-ignore
/README.md export-ignore
30 changes: 30 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: No Response

# **What it does**: Closes issues where the original author doesn't respond to a request for information.
# **Why we have it**: To remove the need for maintainers to remember to check back on issues periodically to see if contributors have responded.
# **Who does it impact**: Everyone that works on docs or docs-internal.

on:
issue_comment:
types: [created]
schedule:
# Schedule for five minutes after the hour, every hour
- cron: '5 * * * *'

jobs:
noResponse:
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/[email protected]
with:
token: ${{ github.token }}
daysUntilClose: 14 # Number of days of inactivity before an Issue is closed for lack of response
responseRequiredLabel: "needs:feedback" # Label indicating that a response from the original author is required
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information. With only the
information that is currently in the issue, we don't have enough information
to take action. Please reach out if you have or find the answers we need so
that we can investigate further. See [this blog post on bug reports and the
importance of repro steps](https://www.lee-dohm.com/2015/01/04/writing-good-bug-reports/)
for more information about the kind of information that may be helpful.
2 changes: 1 addition & 1 deletion .github/workflows/php8-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '5.3', '5.4', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ]
php: [ '7.4', '8.0', '8.1' ]

steps:
- name: Checkout
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Unit Tests

env:
COMPOSER_VERSION: "2"
COMPOSER_CACHE: "${{ github.workspace }}/.composer-cache"

on:
push:
branches:
- develop
- trunk
pull_request:
branches:
- develop

jobs:
phpunit:
name: ${{ matrix.name }}
runs-on: ubuntu-latest

strategy:
matrix:
php:
- {name: 'PHP 7.4', version: '7.4'}
- {name: 'PHP 8.1', version: '8.1'}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set standard 10up cache directories
run: |
composer config -g cache-dir "${{ env.COMPOSER_CACHE }}"
- name: Prepare composer cache
uses: actions/cache@v2
with:
path: ${{ env.COMPOSER_CACHE }}
key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
composer-${{ env.COMPOSER_VERSION }}-
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '${{ matrix.php.version }}'
coverage: none
tools: composer:v2

- name: Install dependencies
run: composer install

- name: Test
run: ./vendor/bin/phpunit -v
2 changes: 1 addition & 1 deletion .github/workflows/push-asset-readme-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@master
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
2 changes: 1 addition & 1 deletion .github/workflows/push-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@master
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
core:
- {name: 'WP latest', version: 'latest'}
- {name: 'WP minimum', version: 'WordPress/WordPress#4.9'}
- {name: 'WP minimum', version: 'WordPress/WordPress#5.7'}
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}
steps:
- name: Checkout
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/wordpress-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "WordPress version checker"
on:
push:
branches:
- develop
- trunk
pull_request:
branches:
- develop
schedule:
- cron: '0 0 * * 1'

jobs:
wordpress-version-checker:
runs-on: ubuntu-latest
steps:
- name: WordPress version checker
uses: skaut/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ tests/cypress/screenshots
tests/cypress/videos

.wp-env.override.json
.phpunit.result.cache
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased] - TBD

## [1.4.1] - 2022-12-14
### 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))
- 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))
- Dependency security scanning (props [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#97](https://github.com/10up/ads-txt/pull/97))

### 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))
- 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))

### 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))

### 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))
- 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))

## [1.4.0] - 2022-04-13
### Added
- Support for the `INVENTORYPARTNERDOMAIN` variable (props [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi) via [#74](https://github.com/10up/ads-txt/pull/74))
Expand Down Expand Up @@ -57,6 +74,7 @@ All notable changes to this project will be documented in this file, per [the Ke
- Initial plugin release

[Unreleased]: https://github.com/10up/ads-txt/compare/trunk...develop
[1.4.1]: https://github.com/10up/ads-txt/compare/1.4.0...1.4.1
[1.4.0]: https://github.com/10up/ads-txt/compare/1.3.0...1.4.0
[1.3.0]: https://github.com/10up/ads-txt/compare/1.2.0...1.3.0
[1.2.0]: https://github.com/10up/ads-txt/compare/1.1...1.2.0
Expand Down
17 changes: 9 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ Line 10: f08c47fec0942 does not appear to be a valid TAG-ID
1. Branch: Starting from develop, cut a release branch named `release/X.Y.Z` for your changes.
2. Version bump: Bump the version number in `ads-txt.php` and `readme.txt` if it does not already reflect the version being released.
3. Changelog: Add/update the changelog in both `readme.txt` and `CHANGELOG.md`
4. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in `.gitattributes`.
5. Readme updates: Make any other readme changes as necessary. `CHANGELOG.md` and `README.md` are geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different.
6. Merge: Make a non-fast-forward merge from `develop` to `trunk` (`git checkout trunk && git merge --no-ff develop`).
7. Release: Create a [new release](https://github.com/10up/ads-txt/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues on the milestone (e.g. https://github.com/10up/ads-txt/milestone/1?closed=1).
8. SVN: Wait for the [GitHub Action](https://github.com/10up/ads-txt/actions) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
9. Check WordPress.org: Ensure that the changes are live on [https://wordpress.org/plugins/ads-txt/](https://wordpress.org/plugins/ads-txt/). This may take a few minutes.
10. Close milestone: Edit the [X.Y.Z milestone](https://github.com/10up/ads-txt/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close the milestone.
11. Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`.
4. Credits: Update `CREDITS.md` to include new contributors, manually removing any bots.
5. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in `.gitattributes`.
6. Readme updates: Make any other readme changes as necessary. `CHANGELOG.md` and `README.md` are geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different.
7. Merge: Make a non-fast-forward merge from `develop` to `trunk` (`git checkout trunk && git merge --no-ff develop`).
8. Release: Create a [new release](https://github.com/10up/ads-txt/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues on the milestone (e.g. https://github.com/10up/ads-txt/milestone/1?closed=1).
9. SVN: Wait for the [GitHub Action](https://github.com/10up/ads-txt/actions) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
10. Check WordPress.org: Ensure that the changes are live on [https://wordpress.org/plugins/ads-txt/](https://wordpress.org/plugins/ads-txt/). This may take a few minutes.
11. Close milestone: Edit the [X.Y.Z milestone](https://github.com/10up/ads-txt/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close the milestone.
12. Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`.
2 changes: 1 addition & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo

Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc.

[10up (@10up)](https://github.com/10up), [Helen Hou-Sandi (@helen)](https://github.com/helen), [Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [Scott Buscemi (@scottbuscemi)](https://github.com/scottbuscemi), [John Eckman (@jeckman)](https://github.com/jeckman), [philipjohn (@philipjohn)](https://github.com/philipjohn), [Keanan Koppenhaver (@kkoppenhaver)](https://github.com/kkoppenhaver), [vtellapmc (@vtellapmc)](https://github.com/vtellapmc), [Tom J Nowell (@tomjn)](https://github.com/tomjn), [Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher), [Ethan Clevenger (@ethanclevenger91)](https://github.com/ethanclevenger91), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Peter Westwood (@westi)](https://github.com/westi), [Matthew McAchran (@mmcachran)](https://github.com/mmcachran), [Stephanie Walters (@PypWalters)](https://github.com/PypWalters), [barneyjeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Ramon Ahnert (@Rahmon)](https://github.com/Rahmon), [EVOKE (@evokelektrique)](https://github.com/evokelektrique), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Max Lyuchin (@cadic)](https://github.com/cadic), [dependabot[bot] (@dependabot[bot])](https://github.com/dependabot[bot]), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Jake Goldman (@jakemgold)](https://github.com/jakemgold), [cp101 (@p0mmy)](https://github.com/p0mmy), [Ivan (@ivankruchkoff)](https://github.com/ivankruchkoff), [Ankit K Gupta (@ankitguptaindia)](https://github.com/ankitguptaindia), [Tim Moore (@tmoorewp)](https://github.com/tmoorewp), [Per Søderlind (@soderlind)](https://github.com/soderlind), [Daryll Doyle (@darylldoyle)](https://github.com/darylldoyle), [Mohit Dadhich (@mohitwp)](https://github.com/mohitwp).
[10up (@10up)](https://github.com/10up), [Helen Hou-Sandi (@helen)](https://github.com/helen), [Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [Scott Buscemi (@scottbuscemi)](https://github.com/scottbuscemi), [John Eckman (@jeckman)](https://github.com/jeckman), [philipjohn (@philipjohn)](https://github.com/philipjohn), [Keanan Koppenhaver (@kkoppenhaver)](https://github.com/kkoppenhaver), [vtellapmc (@vtellapmc)](https://github.com/vtellapmc), [Tom J Nowell (@tomjn)](https://github.com/tomjn), [Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher), [Ethan Clevenger (@ethanclevenger91)](https://github.com/ethanclevenger91), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Peter Westwood (@westi)](https://github.com/westi), [Matthew McAchran (@mmcachran)](https://github.com/mmcachran), [Stephanie Walters (@PypWalters)](https://github.com/PypWalters), [barneyjeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Ramon Ahnert (@Rahmon)](https://github.com/Rahmon), [EVOKE (@evokelektrique)](https://github.com/evokelektrique), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Max Lyuchin (@cadic)](https://github.com/cadic), [Vikram (@vikrampm1)](https://github.com/vikrampm1), [Jayedul K. (@jayedul)](https://github.com/jayedul), [Thorsten Ott (@tott)](https://github.com/tott), [Sascha Greuel (@SoftCreatR)](https://github.com/SoftCreatR), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Jake Goldman (@jakemgold)](https://github.com/jakemgold), [cp101 (@p0mmy)](https://github.com/p0mmy), [Ivan (@ivankruchkoff)](https://github.com/ivankruchkoff), [Ankit K Gupta (@ankitguptaindia)](https://github.com/ankitguptaindia), [Tim Moore (@tmoorewp)](https://github.com/tmoorewp), [Per Søderlind (@soderlind)](https://github.com/soderlind), [Daryll Doyle (@darylldoyle)](https://github.com/darylldoyle), [Mohit Dadhich (@mohitwp)](https://github.com/mohitwp), [RoeyHarari44 (@RoeyHarari44)](https://github.com/RoeyHarari44), [Dhanendran (@dhanendran)](https://github.com/dhanendran)

## Libraries

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Yes! However, if you are using a subfolder installation it will only work for th

## Requirements

* Requires PHP 5.3+.
* 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.
* Requires PHP 7.4+.
* Requires WordPress 5.7+.
* Ad blockers may break syntax highlighting and pre-save error checking on the edit screen. See [#20](https://github.com/10up/ads-txt/issues/20).
* Rewrites need to be enabled. Without rewrites, WordPress cannot know to supply `/ads.txt` when requested.
* 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.
Expand Down
18 changes: 10 additions & 8 deletions ads-txt.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
* Plugin Name: Ads.txt Manager
* 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+.
* Version: 1.4.0
* Author: 10up
* Author URI: https://10up.com
* License: GPLv2 or later
* Text Domain: ads-txt
* Plugin Name: Ads.txt Manager
* 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+.
* Version: 1.4.1
* Author: 10up
* Author URI: https://10up.com
* License: GPLv2 or later
* Requires at least: 5.7
* Requires PHP: 7.4
* Text Domain: ads-txt
*
* @package Ads_Txt_Manager
*/
Expand All @@ -15,7 +17,7 @@
exit; // Exit if accessed directly.
}

define( 'ADS_TXT_MANAGER_VERSION', '1.4.0' );
define( 'ADS_TXT_MANAGER_VERSION', '1.4.1' );
define( 'ADS_TXT_MANAGE_CAPABILITY', 'edit_ads_txt' );
define( 'ADS_TXT_MANAGER_POST_OPTION', 'adstxt_post' );
define( 'APP_ADS_TXT_MANAGER_POST_OPTION', 'app_adstxt_post' );
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
],
"type": "wordpress-plugin",
"require-dev": {
"10up/phpcs-composer": "dev-master"
"10up/phpcs-composer": "dev-master",
"10up/wp_mock": "^0.5.0",
"phpunit/phpunit": "^9.5"
},
"license": "GPLv2 or later",
"config": {
Expand Down
Loading

0 comments on commit 257973e

Please sign in to comment.