Skip to content

Commit 4267320

Browse files
author
10upbot on GitHub
committed
Committing built version of e4c9e8e
1 parent 9e10492 commit 4267320

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1499
-2511
lines changed

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
/.github export-ignore
22
/.gitattributes export-ignore
33
/.gitignore export-ignore
4+
/.wordpress-version-checker.json export-ignore
5+
6+
# Text files should have LF line endings.
7+
* text eol=lf
8+
9+
# Binary files should not be modified.
10+
*.mo binary
11+
*.png binary
12+
*.jpg binary

.github/workflows/wordpress-latest.yml renamed to .github/workflows/wordpress-version-checker.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ on:
1010
schedule:
1111
- cron: '0 0 * * 1'
1212

13+
permissions:
14+
issues: write
15+
1316
jobs:
1417
wordpress-version-checker:
1518
runs-on: ubuntu-latest
1619
steps:
1720
- name: WordPress version checker
18-
uses: skaut/wordpress-version-checker@v1.2.0
21+
uses: skaut/wordpress-version-checker@master
1922
with:
2023
repo-token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file, per [the Ke
77
## [2.0.0] - TBD
88
**Note that Distributor now requires PHP 7.4 or later and WordPress 5.7 or later.**
99

10-
_This entry was generated for the 2.0.0-rc1 release and will be updated during the Beta and Release Candidate processes._
10+
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.
1111

1212
### Added
1313
- 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)).
@@ -30,12 +30,13 @@ _This entry was generated for the 2.0.0-rc1 release and will be updated during t
3030
- Toggles the Distributor admin bar element in Gutenberg based on the post status (props [@ggutenberg](https://github.com/ggutenberg), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#1022](https://github.com/10up/distributor/pull/1022), [#1114](https://github.com/10up/distributor/pull/1114)).
3131
- Reduced duplicate code pushing posts to connections (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul), [@faisal-alvi](https://github.com/faisal-alvi), [@aaronware](https://github.com/aaronware) via [#999](https://github.com/10up/distributor/pull/999)).
3232
- Unified translator comments (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic) via [#949](https://github.com/10up/distributor/pull/949)).
33-
- WordPress "tested up to" version 6.2 (props [@jayedul](https://github.com/jayedul), [@faisal-alvi](https://github.com/faisal-alvi), [@jeffpaul](https://github.com/jeffpaul) via [#1047](https://github.com/10up/distributor/pull/1047)).
33+
- WordPress "tested up to" version 6.3 (props [@jayedul](https://github.com/jayedul), [@faisal-alvi](https://github.com/faisal-alvi), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#1047](https://github.com/10up/distributor/pull/1047), [#1123](https://github.com/10up/distributor/pull/1123)).
3434
- Browserlist database updated to version 1.0.30001489 (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@dkotter](https://github.com/dkotter) via [#1059](https://github.com/10up/distributor/pull/1059)).
3535
- Build process now uses `@wordpress/scripts` in place of Gulp (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@dinhtungdu](https://github.com/dinhtungdu), [@dkotter](https://github.com/dkotter) via [#916](https://github.com/10up/distributor/pull/916)).
3636
- Migrated E2E tests to Cypress (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@jeffpaul](https://github.com/jeffpaul), [@iamdharmesh](https://github.com/iamdharmesh) via [#1070](https://github.com/10up/distributor/pull/1070)).
3737
- Update `dependency-review.yml` (props [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#1054](https://github.com/10up/distributor/pull/1054)).
3838
- Order of operations setting meta, media and terms in the network push and pull functions (props [@sethrubenstein](https://github.com/sethrubenstein), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#1095](https://github.com/10up/distributor/pull/1095)).
39+
- Upgrade the Plugin Update Checker library from 4.13 to 5.1 (props [@dkotter](https://github.com/dkotter) via [#1124](https://github.com/10up/distributor/pull/1124)).
3940

4041
### Deprecated
4142
- `dt_push_post` action hook (props [@dkotter](https://github.com/dkotter), [@peterwilsoncc](https://github.com/peterwilsoncc), [@dhanendran](https://github.com/dhanendran), [@ravinderk](https://github.com/ravinderk), [@jeffpaul](https://github.com/jeffpaul) via [#1024](https://github.com/10up/distributor/pull/1024)).
@@ -470,7 +471,7 @@ This adds a post type selector when viewing the Pull Content list for both exter
470471
- Initial closed release.
471472

472473
[Unreleased]: https://github.com/10up/distributor/compare/trunk...develop
473-
[2.0.0]: https://github.com/10up/distributor/compare/1.9.1...develop
474+
[2.0.0]: https://github.com/10up/distributor/compare/1.9.1...2.0.0
474475
[1.9.1]: https://github.com/10up/distributor/compare/1.9.0...1.9.1
475476
[1.9.0]: https://github.com/10up/distributor/compare/1.8.0...1.9.0
476477
[1.8.0]: https://github.com/10up/distributor/compare/1.7.1...1.8.0

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
> 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.
66
7-
[![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)
7+
[![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.3%20tested-success.svg) [![License](https://img.shields.io/github/license/10up/distributor.svg)](https://github.com/10up/distributor/blob/develop/LICENSE.md)
88

99
*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/).*
1010

@@ -58,7 +58,7 @@ Distributor is built with the same extensible approach as WordPress itself, with
5858
* [WordPress](http://wordpress.org) 5.7+
5959
* 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.
6060
* For external connections, Distributor needs to be installed on BOTH sides of the connection.
61-
* Version 2 of Distributor requires version two on BOTH sides of all connections.
61+
* 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).
6262

6363
## Installation
6464

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"require": {
1414
"php": ">=7.4",
15-
"yahnis-elsts/plugin-update-checker": "4.13",
15+
"yahnis-elsts/plugin-update-checker": "5.1",
1616
"ext-json": "*"
1717
},
1818
"autoload": {

distributor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Plugin URI: https://github.com/10up/distributor
55
* Update URI: https://distributorplugin.com
66
* Description: Makes it easy to distribute and reuse content across your websites, whether inside of a multisite or across the web.
7-
* Version: 2.0.0-rc1
7+
* Version: 2.0.0
88
* Requires at least: 5.7
99
* Requires PHP: 7.4
1010
* Author: 10up Inc.
@@ -28,7 +28,7 @@
2828
exit; // Exit if accessed directly.
2929
}
3030

31-
define( 'DT_VERSION', '2.0.0-rc1' );
31+
define( 'DT_VERSION', '2.0.0' );
3232
define( 'DT_PLUGIN_FILE', preg_replace( '#^.*plugins/(.*)$#i', '$1', __FILE__ ) );
3333
define( 'DT_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
3434
define( 'DT_PLUGIN_FULL_FILE', __FILE__ );

includes/bootstrap.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
namespace Distributor;
1414

15+
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
16+
1517
/**
1618
* PSR-4 autoloading
1719
*/
@@ -130,7 +132,7 @@ function() {
130132
}
131133
);
132134

133-
if ( class_exists( '\\Puc_v4_Factory' ) ) {
135+
if ( class_exists( '\\YahnisElsts\PluginUpdateChecker\v5\PucFactory' ) ) {
134136
/**
135137
* Enable updates if we have a valid license
136138
*/
@@ -144,7 +146,7 @@ function() {
144146

145147
if ( $valid_license ) {
146148
// @codingStandardsIgnoreStart
147-
$updateChecker = \Puc_v4_Factory::buildUpdateChecker(
149+
$updateChecker = PucFactory::buildUpdateChecker(
148150
'https://github.com/10up/distributor/',
149151
DT_PLUGIN_FULL_FILE,
150152
'distributor'
@@ -174,7 +176,9 @@ function( $transient ) use ( $updateChecker ) {
174176
$update = $updateChecker->getUpdateState()->getUpdate();
175177
// Adding the plugin info to the `no_update` property is required
176178
// for the enable/disable auto-updates links to correctly appear in UI.
177-
$transient->no_update[ $update->filename ] = $update;
179+
if ( $update ) {
180+
$transient->no_update[ $update->filename ] = $update;
181+
}
178182
}
179183

180184
return $transient;

includes/classes/ExternalConnections/WordPressExternalConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public function remote_post( $url = '', $args = array() ) {
276276
&& isset( $response_headers['x-distributor'] )
277277
&& (
278278
! isset( $response_headers['x-distributor-version'] )
279-
|| version_compare( $response_headers['x-distributor-version'], '2.0.0-alpha', '<' )
279+
|| version_compare( $response_headers['x-distributor-version'], '2.0.0', '<' )
280280
)
281281
) {
282282
$version_error = new \WP_Error();

includes/rest-api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ function get_pull_content_permissions( $request ) {
379379
&& null !== $request->get_param( 'distributor_request' )
380380
&& (
381381
null === $request->get_header( 'X-Distributor-Version' )
382-
|| version_compare( $request->get_header( 'X-Distributor-Version' ), '2.0.0-alpha', '<' )
382+
|| version_compare( $request->get_header( 'X-Distributor-Version' ), '2.0.0', '<' )
383383
)
384384
) {
385385
return new \WP_Error(

lang/distributor.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# This file is distributed under the GPLv2 or later.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: Distributor 2.0.0-rc1\n"
5+
"Project-Id-Version: Distributor 2.0.0\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/distributor\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <LL@li.org>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2023-08-03T22:53:58+00:00\n"
12+
"POT-Creation-Date: 2023-09-05T23:46:21+00:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.8.1\n"
1515
"X-Domain: distributor\n"

0 commit comments

Comments
 (0)