Skip to content

Commit

Permalink
Committing built version of e4c9e8e
Browse files Browse the repository at this point in the history
  • Loading branch information
10upbot on GitHub committed Sep 5, 2023
1 parent 9e10492 commit 4267320
Show file tree
Hide file tree
Showing 65 changed files with 1,499 additions and 2,511 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.wordpress-version-checker.json export-ignore

# Text files should have LF line endings.
* text eol=lf

# Binary files should not be modified.
*.mo binary
*.png binary
*.jpg binary
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
schedule:
- cron: '0 0 * * 1'

permissions:
issues: write

jobs:
wordpress-version-checker:
runs-on: ubuntu-latest
steps:
- name: WordPress version checker
uses: skaut/wordpress-version-checker@v1.2.0
uses: skaut/wordpress-version-checker@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 4 additions & 3 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 All @@ -30,12 +30,13 @@ _This entry was generated for the 2.0.0-rc1 release and will be updated during t
- 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)).
- 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)).
- Unified translator comments (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic) via [#949](https://github.com/10up/distributor/pull/949)).
- 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)).
- 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)).
- 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)).
- 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)).
- 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)).
- Update `dependency-review.yml` (props [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#1054](https://github.com/10up/distributor/pull/1054)).
- 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)).
- 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)).

### Deprecated
- `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)).
Expand Down Expand Up @@ -470,7 +471,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
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.1%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.3%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 @@ -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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"require": {
"php": ">=7.4",
"yahnis-elsts/plugin-update-checker": "4.13",
"yahnis-elsts/plugin-update-checker": "5.1",
"ext-json": "*"
},
"autoload": {
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
10 changes: 7 additions & 3 deletions includes/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

namespace Distributor;

use YahnisElsts\PluginUpdateChecker\v5\PucFactory;

/**
* PSR-4 autoloading
*/
Expand Down Expand Up @@ -130,7 +132,7 @@ function() {
}
);

if ( class_exists( '\\Puc_v4_Factory' ) ) {
if ( class_exists( '\\YahnisElsts\PluginUpdateChecker\v5\PucFactory' ) ) {
/**
* Enable updates if we have a valid license
*/
Expand All @@ -144,7 +146,7 @@ function() {

if ( $valid_license ) {
// @codingStandardsIgnoreStart
$updateChecker = \Puc_v4_Factory::buildUpdateChecker(
$updateChecker = PucFactory::buildUpdateChecker(
'https://github.com/10up/distributor/',
DT_PLUGIN_FULL_FILE,
'distributor'
Expand Down Expand Up @@ -174,7 +176,9 @@ function( $transient ) use ( $updateChecker ) {
$update = $updateChecker->getUpdateState()->getUpdate();
// Adding the plugin info to the `no_update` property is required
// for the enable/disable auto-updates links to correctly appear in UI.
$transient->no_update[ $update->filename ] = $update;
if ( $update ) {
$transient->no_update[ $update->filename ] = $update;
}
}

return $transient;
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 lang/distributor.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the GPLv2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Distributor 2.0.0-rc1\n"
"Project-Id-Version: Distributor 2.0.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/distributor\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2023-08-03T22:53:58+00:00\n"
"POT-Creation-Date: 2023-09-05T23:46:21+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.8.1\n"
"X-Domain: distributor\n"
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: 10up
Tags: content, distribution, syndication, management
Requires at least: 5.7
Tested up to: 6.2
Tested up to: 6.3
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
6 changes: 0 additions & 6 deletions vendor/yahnis-elsts/plugin-update-checker/Puc/v4/Factory.php

This file was deleted.

70 changes: 0 additions & 70 deletions vendor/yahnis-elsts/plugin-update-checker/Puc/v4p13/Autoloader.php

This file was deleted.

This file was deleted.

10 changes: 10 additions & 0 deletions vendor/yahnis-elsts/plugin-update-checker/Puc/v5/PucFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace YahnisElsts\PluginUpdateChecker\v5;

if ( !class_exists(PucFactory::class, false) ):

class PucFactory extends \YahnisElsts\PluginUpdateChecker\v5p1\PucFactory {
}

endif;
Loading

0 comments on commit 4267320

Please sign in to comment.