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: 2.0.0 #1123

Merged
merged 12 commits into from
Sep 5, 2023
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file, per [the Ke
## [2.0.0] - TBD
**Note that Distributor now requires PHP 7.4 or later and WordPress 5.7 or later.**

_This entry was generated for the 2.0.0-rc1 release and will be updated during the Beta and Release Candidate processes._
Please see the [migration guide](https://10up.github.io/distributor/tutorial-migration-guide-version-1-to-version-2.html) for important changes between version 1 and version 2 that may require your action.

### Added
- Migration guide for version 1 to version 2 (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@faisal-alvi](https://github.com/faisal-alvi), [@jeffpaul](https://github.com/jeffpaul) via [#996](https://github.com/10up/distributor/pull/996)).
Expand Down Expand Up @@ -470,7 +470,7 @@ This adds a post type selector when viewing the Pull Content list for both exter
- Initial closed release.

[Unreleased]: https://github.com/10up/distributor/compare/trunk...develop
[2.0.0]: https://github.com/10up/distributor/compare/1.9.1...develop
[2.0.0]: https://github.com/10up/distributor/compare/1.9.1...2.0.0
[1.9.1]: https://github.com/10up/distributor/compare/1.9.0...1.9.1
[1.9.0]: https://github.com/10up/distributor/compare/1.8.0...1.9.0
[1.8.0]: https://github.com/10up/distributor/compare/1.7.1...1.8.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Distributor is built with the same extensible approach as WordPress itself, with
* [WordPress](http://wordpress.org) 5.7+
* External connections require HTTP Basic Authentication or [WordPress.com OAuth2](https://developer.wordpress.com/docs/oauth2/) (must be on [WordPress VIP](https://wpvip.com/)) be set up on the remote website. For Basic Auth, we recommend using [Application Passwords](https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/#Getting-Credentials) built in to WordPress.
* For external connections, Distributor needs to be installed on BOTH sides of the connection.
* Version 2 of Distributor requires version two on BOTH sides of all connections.
* Version 2.0.0 of Distributor requires version 2.0.0 on BOTH sides of all connections. For other version 2.0.0 specific changes, please see our [migration guide](https://10up.github.io/distributor/tutorial-migration-guide-version-1-to-version-2.html).

## Installation

Expand Down
4 changes: 2 additions & 2 deletions distributor.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: https://github.com/10up/distributor
* Update URI: https://distributorplugin.com
* Description: Makes it easy to distribute and reuse content across your websites, whether inside of a multisite or across the web.
* Version: 2.0.0-rc1
* Version: 2.0.0
* Requires at least: 5.7
* Requires PHP: 7.4
* Author: 10up Inc.
Expand All @@ -28,7 +28,7 @@
exit; // Exit if accessed directly.
}

define( 'DT_VERSION', '2.0.0-rc1' );
define( 'DT_VERSION', '2.0.0' );
define( 'DT_PLUGIN_FILE', preg_replace( '#^.*plugins/(.*)$#i', '$1', __FILE__ ) );
define( 'DT_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'DT_PLUGIN_FULL_FILE', __FILE__ );
Expand Down
6 changes: 3 additions & 3 deletions docs/migration-guide-version-1-to-version-2.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Version 2 of Distributor includes a number of breaking changes that will require updates to custom code you may have written for distributor.
Version 2.0.0 of Distributor includes a number of breaking changes that will require updates to custom code you may have written for distributor.

## External connections require a minimum of version 2.0
## External connections require a minimum of version 2.0.0

It is recommended that both ends of an external connection run the same version of Distributor.

Version 2.0 of Distributor will prevent the pulling of posts from sites running Version 1.9.x or lower of Distributor.
Version 2.0.0 of Distributor will prevent the pulling of posts from sites running Version 1.9.x or lower of Distributor.

### Remove canonical links for both Internal and External Connections

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public function remote_post( $url = '', $args = array() ) {
&& isset( $response_headers['x-distributor'] )
&& (
! isset( $response_headers['x-distributor-version'] )
|| version_compare( $response_headers['x-distributor-version'], '2.0.0-alpha', '<' )
|| version_compare( $response_headers['x-distributor-version'], '2.0.0', '<' )
)
) {
$version_error = new \WP_Error();
Expand Down
2 changes: 1 addition & 1 deletion includes/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ function get_pull_content_permissions( $request ) {
&& null !== $request->get_param( 'distributor_request' )
&& (
null === $request->get_header( 'X-Distributor-Version' )
|| version_compare( $request->get_header( 'X-Distributor-Version' ), '2.0.0-alpha', '<' )
|| version_compare( $request->get_header( 'X-Distributor-Version' ), '2.0.0', '<' )
)
) {
return new \WP_Error(
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "distributor",
"version": "2.0.0-rc.1",
"version": "2.0.0",
"description": "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.",
"author": {
"name": "10up",
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: content, distribution, syndication, management
Requires at least: 5.7
Tested up to: 6.2
Requires PHP: 7.4
Stable tag: 1.9.1
Stable tag: 2.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down
1 change: 1 addition & 0 deletions tests/cypress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { defineConfig } = require( 'cypress' );
const { readConfig } = require( '@wordpress/env/lib/config' );

module.exports = defineConfig( {
chromeWebSecurity: false,
fixturesFolder: 'tests/cypress/fixtures',
screenshotsFolder: 'tests/cypress/screenshots',
videosFolder: 'tests/cypress/videos',
Expand Down
2 changes: 1 addition & 1 deletion tests/php/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
WP_Mock::bootstrap();

define( 'DT_PLUGIN_PATH', dirname( __DIR__, 2 ) );
define( 'DT_VERSION', '2.0.0-rc1' );
define( 'DT_VERSION', '2.0.0' );

require_once __DIR__ . '/includes/common.php';
require_once __DIR__ . '/includes/TestCase.php';
Expand Down
Loading