Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release prep: Backports for 1.9.0. #985

Merged
merged 8 commits into from
Dec 15, 2022
18 changes: 15 additions & 3 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@ on:
- develop-v1
jobs:
cypress:
name: ${{ matrix.core.name }}
name: ${{ matrix.core.name }} / ${{ matrix.php.name }}
runs-on: ubuntu-latest
strategy:
matrix:
php:
- {name: 'PHP Default', version: null}
core:
- {name: 'WP latest', version: 'latest'}
- {name: 'WP minimum', version: 'WordPress/WordPress#5.2'}
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}
include:
- php: {name: 'PHP 8.1', version: '8.1'}
core: {name: 'WP stable', version: 'latest'}
- php: {name: 'PHP 7.4', version: '7.4' }
core: {name: 'WP minimum', version: 'WordPress/WordPress#5.2'}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -37,11 +43,17 @@ jobs:
run: composer install

- name: Set the core version
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }}
run: |
./tests/bin/set-core-version.js ${{ matrix.core.version }} ${{ matrix.php.version }}

- name: Set up WP environment
run: npm run env:start

- name: Log WP environment versions
run: |
npx wp-env run cli "wp core version"
npx wp-env run cli "php --version"

- name: Convert to multisite
run: npm run to-multisite

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
with:
php-version: '7.4'
coverage: none
tools: composer:v2
tools: composer:v2, cs2pr

- name: Install dependencies
run: composer install --ignore-platform-reqs
Expand All @@ -69,6 +69,9 @@ jobs:
run: ./vendor/bin/phpcs -i

- name: PHPCS check
uses: chekalsky/phpcs-action@v1
with:
phpcs_bin_path: './vendor/bin/phpcs . --runtime-set testVersion 5.6-'
id: phpcs-sniffs
run: ./vendor/bin/phpcs . --runtime-set testVersion 5.6- --report-full --report-checkstyle=./.github/phpcs-report.xml

- name: Show PHPCS results in PR
if: ${{ always() }}
run: cs2pr ./.github/phpcs-report.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ screenshots/
lang/
docs-built
.phpunit.result.cache
/.wp-env.override.json
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ All notable changes to this project will be documented in this file, per [the Ke
- Add `dt_allowed_media_extensions` and `dt_media_processing_filename` filters so that different media types or specific files can be detected and targeted.

### Fixed
- Ensure media meta is passed through `prepare_meta()` to apply the blacklist. This completes the generated image size info fix from 1.3.3.
- Ensure media meta is passed through `prepare_meta()` to apply the exclusion. This completes the generated image size info fix from 1.3.3.
- Avoid a PHP notice when only using the block editor on the receiving site.
- Avoid a jQuery Migrate notice.

Expand Down Expand Up @@ -370,7 +370,7 @@ This adds a post type selector when viewing the Pull Content list for both exter

### Changed
- Don’t set Distributor meta data on REST API post creation unless post was created by Distributor
- Blacklist the `_wp_old_slug` and `_wp_old_date` meta
- Exclude the `_wp_old_slug` and `_wp_old_date` meta
- Disable pull UI while switching between pull connections

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

> Distributor is a WordPress plugin that makes it easy to distribute and reuse content across your websites — whether in a single multisite or across the web.

[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Tests](https://github.com/10up/distributor/actions/workflows/test.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/test.yml) [![Linting](https://github.com/10up/distributor/actions/workflows/lint.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/lint.yml) [![Code scanning](https://github.com/10up/distributor/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/codeql-analysis.yml) [![Release Version](https://img.shields.io/github/release/10up/distributor.svg)](https://github.com/10up/distributor/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v6.0%20tested-success.svg) [![License](https://img.shields.io/github/license/10up/distributor.svg)](https://github.com/10up/distributor/blob/develop/LICENSE.md)
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Tests](https://github.com/10up/distributor/actions/workflows/test.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/test.yml) [![Linting](https://github.com/10up/distributor/actions/workflows/lint.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/lint.yml) [![Code scanning](https://github.com/10up/distributor/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/codeql-analysis.yml) [![Release Version](https://img.shields.io/github/release/10up/distributor.svg)](https://github.com/10up/distributor/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v6.1%20tested-success.svg) [![License](https://img.shields.io/github/license/10up/distributor.svg)](https://github.com/10up/distributor/blob/develop/LICENSE.md)

*You can learn more about Distributor's features at [DistributorPlugin.com](https://distributorplugin.com) and documentation at the [Distributor documentation site](https://10up.github.io/distributor/).*

Expand Down Expand Up @@ -74,7 +74,7 @@ To help inform our roadmap, keep adopters apprised of major updates and changes
1. Ensure that the current version of Distributor is active on BOTH sites being connected. We'll refer to these as mainsite.com and remotesite.com.
1. On mainsite.com, navigate to `Distributor` > `External Connections` and click `Add New`.
1. Enter a label for the connection (e.g., `remotesite`).
1. Enter the URL (e.g. `https://remotesite.com`) for your remote site below the External Site URL and press the `Authorize Connection` button.
1. Enter the URL (e.g. `https://remotesite.com`) for your remote site below the External Site URL and press the `Authorize Connection` button.
1. You will be prompted to enter the user name and password of an administrative role of the `remotesite.com` if you are not already logged into `remotesite.com` and then redirected to the Authorize Application screen.
1. At the Authorize Application screen, enter the name of the main site and press the 'Yes, I approve of this connection' button
1. Review the roles selected in `Roles Allowed to Push` are the ones you want to support, update if necessary, then press the `Update Connection` button.
Expand Down
58 changes: 37 additions & 21 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,7 @@ public static function canonicalize_front_end() {
add_filter( 'wpseo_canonical', array( '\Distributor\ExternalConnections\WordPressExternalConnection', 'wpseo_canonical_url' ) );
add_filter( 'wpseo_opengraph_url', array( '\Distributor\ExternalConnections\WordPressExternalConnection', 'wpseo_og_url' ) );
add_filter( 'the_author', array( '\Distributor\ExternalConnections\WordPressExternalConnection', 'the_author_distributed' ) );
add_filter( 'get_the_author_display_name', array( '\Distributor\ExternalConnections\WordPressExternalConnection', 'the_author_distributed' ) );
add_filter( 'author_link', array( '\Distributor\ExternalConnections\WordPressExternalConnection', 'author_posts_url_distributed' ), 10, 3 );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,7 @@ public static function canonicalize_front_end() {
add_filter( 'wpseo_canonical', array( '\Distributor\InternalConnections\NetworkSiteConnection', 'wpseo_canonical_url' ) );
add_filter( 'wpseo_opengraph_url', array( '\Distributor\InternalConnections\NetworkSiteConnection', 'wpseo_og_url' ) );
add_filter( 'the_author', array( '\Distributor\InternalConnections\NetworkSiteConnection', 'the_author_distributed' ) );
add_filter( 'get_the_author_display_name', array( '\Distributor\InternalConnections\NetworkSiteConnection', 'the_author_distributed' ) );
add_filter( 'author_link', array( '\Distributor\InternalConnections\NetworkSiteConnection', 'author_posts_url_distributed' ), 10, 3 );
}

Expand Down
Loading