diff --git a/CHANGELOG.md b/CHANGELOG.md index ce8aa1f56..4386e82d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] - TBD +## [2.0.6] - 2024-09-26 +### Changed +- Improved the management of pulled content both from the admin post list view and from the admin single post view, making it easier to see what content has been pulled and what content is linked or not linked, as well as making linking and unlinking clearer (props [@roshniahuja](https://github.com/roshniahuja), [@faisal-alvi](https://github.com/faisal-alvi), [@ravinderk](https://github.com/ravinderk), [@iamdharmesh](https://github.com/iamdharmesh), [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul), [@oszkarnagy](https://github.com/oszkarnagy) via [#1036](https://github.com/10up/distributor/pull/1036)). + +### Fixed +- Address creation of dynamic property warning in PHP 8.2+ (props [@kirtangajjar](https://github.com/kirtangajjar), [@Sidsector9](https://github.com/Sidsector9), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#1230](https://github.com/10up/distributor/pull/1230)). + +### Security +- Bump `axios` from 1.6.4 to 1.7.4 (props [@dependabot](https://github.com/apps/dependabot), [@iamdharmesh](https://github.com/iamdharmesh) via [#1260](https://github.com/10up/distributor/pull/1260)). +- Bump `webpack` from 5.89.0 to 5.94.0 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#1263](https://github.com/10up/distributor/pull/1263)). + +### Developer +- Bump `@wordpress/env` from 10.1.0 to 10.5.0 (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@faisal-alvi](https://github.com/faisal-alvi) via [#1236](https://github.com/10up/distributor/pull/1236)). +- Update the `README.md` file with proper repo badges, the plugin banner image and some minor text updates (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#1265](https://github.com/10up/distributor/pull/1265)). + ## [2.0.5] - 2024-08-15 **Note that Distributor now requires WordPress 6.4 or later.** @@ -564,6 +579,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.6]: https://github.com/10up/distributor/compare/2.0.5...2.0.6 [2.0.5]: https://github.com/10up/distributor/compare/2.0.4...2.0.5 [2.0.4]: https://github.com/10up/distributor/compare/2.0.3...2.0.4 [2.0.3]: https://github.com/10up/distributor/compare/2.0.2...2.0.3 diff --git a/README.md b/README.md index 32658fc5e..403f26f2b 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,17 @@ -Distributor icon - # Distributor -> 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. +![Distributor](https://github.com/10up/distributor/blob/develop/assets/img/banner-1544x500.png) -[![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.6%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) [![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.6%20tested-success.svg) [![License](https://img.shields.io/github/license/10up/distributor.svg)](https://github.com/10up/distributor/blob/develop/LICENSE.md) [![Dependency Review](https://github.com/10up/distributor/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/dependency-review.yml) +[![E2E Tests](https://github.com/10up/distributor/actions/workflows/cypress.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/cypress.yml) [![PHPUnit 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) + +> 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. *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/).* -_Note:_ The latest stable version of the plugin is the _stable_ branch. [Download the stable branch]((https://github.com/10up/distributor/archive/stable.zip)) if you are intending to use the plugin in a Production environment. - -## Table of Contents -* [Features](#features) -* [Requirements](#requirements) -* [Installation](#installation) - * [Registration](#registration) - * [Set Up External Connections](#set-up-external-connections) -* [How to Distribute Content](#how-to-distribute-content) - * [Pushing Content](#pushing-content) - * [Pulling Content](#pulling-content) -* [Known Caveats/Issues](#known-caveatsissues) -* [Developers](#developers) - * [Running Locally](#running-locally) - * [Testing](#testing) - * [Debugging](#debugging) - * [Application Passwords](#application-passwords-and-wordpress-56) -* [Changelog](#changelog) -* [Contributing](#contributing) - -## Features +*Note:* The latest stable version of the plugin is the *stable* branch. [Download the stable branch]((https://github.com/10up/distributor/archive/stable.zip)) if you are intending to use the plugin in a Production environment. + +## Overview Distributor supports safe, SEO-friendly content reuse and sharing via "pushing" and "pulling". @@ -126,33 +109,61 @@ You can navigate to the `Posts` > `All Posts` table list view to see all content ## Known Caveats/Issues -__Remote Request Timeouts__ - With external connections, HTTP requests are sent back and forth - creating posts, transferring images, syncing post updates, etc. In certain situations, mostly commonly when distributing posts with a large number of images (or very large file sizes), using poorly configured or saturated servers / hosts, or using plugins that add significant weight to post creation, Distributor requests can fail. Although we do some error handling, there are certain cases in which post distribution can fail silently. If distribution requests are taking a long time to load and/or failing, consider adjusting the timeout; you can filter the timeout for pushing external posts using the [`dt_push_post_timeout` filter](https://10up.github.io/distributor/dt_push_post_timeout.html). More advanced handling of large content requests, and improved error handling is on the road map for a future update. +### Remote Request Timeouts + +With external connections, HTTP requests are sent back and forth - creating posts, transferring images, syncing post updates, etc. In certain situations, mostly commonly when distributing posts with a large number of images (or very large file sizes), using poorly configured or saturated servers / hosts, or using plugins that add significant weight to post creation, Distributor requests can fail. Although we do some error handling, there are certain cases in which post distribution can fail silently. If distribution requests are taking a long time to load and/or failing, consider adjusting the timeout; you can filter the timeout for pushing external posts using the [`dt_push_post_timeout` filter](https://10up.github.io/distributor/dt_push_post_timeout.html). More advanced handling of large content requests, and improved error handling is on the road map for a future update. + +### Post Meta Associations + +A distributed post includes all of the post meta from the original version. Sometimes arbitrary post meta references an ID for another piece of content on the original site. Distributor _does not_ "bring along" the referenced content or update references for arbitrary post meta (it will take care of updating references in the case of core WordPress features, such as the featured image ID). This issue is very common when using field management plugins like Advanced Custom Fields (ACF). This can be addressed on a case by case basis by extending the plugin; for external connections, you can manually handle post meta associations using [the `dt_push_post` hook](https://github.com/10up/distributor/blob/f7b60740e679bce4671ccd69a670abadce4f2f93/includes/classes/ExternalConnections/WordPressExternalConnection.php#L646). For internal connections, use the [`dt_push_post` hook](https://10up.github.io/distributor/dt_push_post.html). Note that while named the same, these hooks accept different parameters. + +### Deleting Distributed Posts + +When a post that has been distributed is deleted, the distributed copies will become unlinked ("forked") from the original and thus become editable. Similarly, when a distributed post is unpublished, distributed copies will not be unpublished. More sophisticated "removal" workflow is on the road map for a future update. + +### Gutenberg Block Mismatch + +When distributing a Gutenberg post to another site that supports Gutenberg, if a block in the post does not exist on the receiving site, the block will be converted to a "Classic" HTML block. + +### Parent Posts + +Distributor does not "bring along" parent (or child posts). If your post (or custom post type) has a parent or a child, it will distribute it as if it's an orphan. + +### Custom Post Type Support + +Internal Connections (multisite) support multiple post types. In order for distribution to work with External Connections that have custom post type content, that post type needs to be registered with the argument `show_in_rest => true` on the external site. + +### Unable to Push to New Custom Post Types + +If new Custom Post Types are created after establishing an External Connection, you will only be able to `Pull` those from an External Connection. To ensure you are able to `Push` new Custom Post Types to an External Connection, you will need to update the External Connection by editing it and then clicking the `Update connection` button. + +### Backwards Compatibility -__Post Meta Associations__ - A distributed post includes all of the post meta from the original version. Sometimes arbitrary post meta references an ID for another piece of content on the original site. Distributor _does not_ "bring along" the referenced content or update references for arbitrary post meta (it will take care of updating references in the case of core WordPress features, such as the featured image ID). This issue is very common when using field management plugins like Advanced Custom Fields (ACF). This can be addressed on a case by case basis by extending the plugin; for external connections, you can manually handle post meta associations using [the `dt_push_post` hook](https://github.com/10up/distributor/blob/f7b60740e679bce4671ccd69a670abadce4f2f93/includes/classes/ExternalConnections/WordPressExternalConnection.php#L646). For internal connections, use the [`dt_push_post` hook](https://10up.github.io/distributor/dt_push_post.html). Note that while named the same, these hooks accept different parameters. +While we strive to be mindful of backwards compatibility much the same way WordPress itself is, we do not currently guarantee continued interoperability between different versions of Distributor. We assume the current userbase for this plugin has a high degree of control over any site that has been set up as an external connection and urge you to keep Distributor up to date. -__Deleting Distributed Posts__ - When a post that has been distributed is deleted, the distributed copies will become unlinked ("forked") from the original and thus become editable. Similarly, when a distributed post is unpublished, distributed copies will not be unpublished. More sophisticated "removal" workflow is on the road map for a future update. +### Distributing Post content -__Gutenberg Block Mismatch__ - When distributing a Gutenberg post to another site that supports Gutenberg, if a block in the post does not exist on the receiving site, the block will be converted to a "Classic" HTML block. +By default, post content is rendered before being copied. This means that shortcodes are expanded before being distributed and remote posts will not have the shortcode, but rather the expanded HTML content. -__Parent Posts__ - Distributor does not "bring along" parent (or child posts). If your post (or custom post type) has a parent or a child, it will distribute it as if it's an orphan. +### Distributing Authors -__Custom Post Type Support__ - Internal Connections (multisite) support multiple post types. In order for distribution to work with External Connections that have custom post type content, that post type needs to be registered with the argument `show_in_rest => true` on the external site. +By default, distributed posts reference the original site as the "author" with a link to it. This can be altered by extending Distributor with custom code to make it sync authors. -__Unable to Push to New Custom Post Types__ - If new Custom Post Types are created after establishing an External Connection, you will only be able to `Pull` those from an External Connection. To ensure you are able to `Push` new Custom Post Types to an External Connection, you will need to update the External Connection by editing it and then clicking the `Update connection` button. +### Distributing Post Date -__Backwards Compatibility__ - While we strive to be mindful of backwards compatibility much the same way WordPress itself is, we do not currently guarantee continued interoperability between different versions of Distributor. We assume the current userbase for this plugin has a high degree of control over any site that has been set up as an external connection and urge you to keep Distributor up to date. +By default, the "post date" on distributed posts is the date its published on the remote site, not the date published on the origin site. This can be overridden by extending Distributor with custom code to make it preserve the post date. -__Distributing Post content__ - By default, post content is rendered before being copied. This means that shortcodes are expanded before being distributed and remote posts will not have the shortcode, but rather the expanded HTML content. +### Distributing Canonical URL -__Distributing Authors__ - By default, distributed posts reference the original site as the "author" with a link to it. This can be altered by extending Distributor with custom code to make it sync authors. +By default, canonical URL of distributed post will point to original content, which corresponds to SEO best practices. This can be overridden by extending Distributor with custom code and removing Distributor's default front end canonical URL filtering (look for `'get_canonical_url'` and `'wpseo_canonical'`). -__Distributing Post Date__ - By default, the "post date" on distributed posts is the date its published on the remote site, not the date published on the origin site. This can be overridden by extending Distributor with custom code to make it preserve the post date. +### Drafts as Preferred Status -__Distributing Canonical URL__ - By default, canonical URL of distributed post will point to original content, which corresponds to SEO best practices. This can be overridden by extending Distributor with custom code and removing Distributor's default front end canonical URL filtering (look for `'get_canonical_url'` and `'wpseo_canonical'`). +By default, drafts are the preferred status and can't be changed at the source site. -__Drafts as Preferred Status__ - By default, drafts are the preferred status and can't be changed at the source site. +### Conflicts with Security plugins -__Conflicts with Security plugins__ - Oftentimes the communication Distributor attempts to make across sites using the REST API will be flagged by various security plugins and surreptitiously blocked. If you run into an issue like this, please reach out to the support for your security plugin and ask about getting Distributor unblocked ([here is an example for doing so with Wordfence](https://wordpress.org/support/topic/distributor-plugin-being-blocked/)). +Oftentimes the communication Distributor attempts to make across sites using the REST API will be flagged by various security plugins and surreptitiously blocked. If you run into an issue like this, please reach out to the support for your security plugin and ask about getting Distributor unblocked ([here is an example for doing so with Wordfence](https://wordpress.org/support/topic/distributor-plugin-being-blocked/)). ## Developers diff --git a/dist/css/admin.min.css b/dist/css/admin.min.css index 2a59f8ffe..b0380ef76 100644 --- a/dist/css/admin.min.css +++ b/dist/css/admin.min.css @@ -1 +1 @@ -.js-auth-app-card em,.js-auth-app-card kbd{display:none}.js-auth-app-card #app_name{border:none;box-shadow:none;width:380px}.js-auth-app-card label{font-size:14px;font-weight:700}@media (min-width:783px){body.is-showing-distributor.is-fullscreen-mode #wpadminbar{display:block}body.is-showing-distributor.is-fullscreen-mode .interface-interface-skeleton{top:32px}}.distributor-panel .components-panel__body-title svg{height:20px;width:20px}.distributor-toggle{margin-bottom:8px}.distributor-title--settings{align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;position:relative}.distributor-title--settings .distributor-title__text{flex:0 1 auto}.distributor-title--settings a.distributor-help-link{display:inline-block;flex:0 0 auto;line-height:0;margin-left:.5em;text-decoration:none}.distributor-title--settings a.distributor-help-link:not(:hover) span{color:#9ea3a8}.distributor-title--settings a.distributor-help-link .distributor-help-link__text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important} +.js-auth-app-card em,.js-auth-app-card kbd{display:none}.js-auth-app-card #app_name{border:none;box-shadow:none;width:380px}.js-auth-app-card label{font-size:14px;font-weight:700}@media (min-width:783px){body.is-showing-distributor.is-fullscreen-mode #wpadminbar{display:block}body.is-showing-distributor.is-fullscreen-mode .interface-interface-skeleton{top:32px}}.distributor-panel .components-panel__body-title svg{height:20px;width:20px}.distributor-panel span{display:inline-block;margin-bottom:15px}#distributed-unlink{margin:0}#distributed-unlink .dashicons-editor-unlink{color:#b50909;margin-right:7px;text-decoration:none}.distributed-modal-popup .components-modal__icon-container svg{width:25px}.distributed-modal-popup h1{margin-left:8px;margin-top:-3px}.distributed-modal-popup span{display:inline-block}.distributed-modal-popup .actions{margin-top:20px}body .distributed-modal-popup .button,body .distributed-modal-popup button{cursor:pointer;opacity:1;pointer-events:auto}.distributed-modal-popup .actions a{margin-right:10px}.distributed-modal-popup .actions a span{color:#b50909;display:inline-block;margin-right:5px;margin-top:5px}.distributed-modal-popup .actions a span.dashicons-admin-links{color:#046e04}.distributed-modal-popup .actions #close{margin-top:5px}.distributed-modal-popup{max-width:380px}.distributor-toggle{margin-bottom:8px}.distributor-title--settings{align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;position:relative}.distributor-title--settings .distributor-title__text{flex:0 1 auto}.distributor-title--settings a.distributor-help-link{display:inline-block;flex:0 0 auto;line-height:0;margin-left:.5em;text-decoration:none}.distributor-title--settings a.distributor-help-link:not(:hover) span{color:#9ea3a8}.distributor-title--settings a.distributor-help-link .distributor-help-link__text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important} diff --git a/dist/css/gutenberg-syndicated-post.min.css b/dist/css/gutenberg-syndicated-post.min.css index 9e33e4001..243c1382f 100644 --- a/dist/css/gutenberg-syndicated-post.min.css +++ b/dist/css/gutenberg-syndicated-post.min.css @@ -1 +1 @@ -body.dt-linked-post .button,body.dt-linked-post .components-form-token-field__input-container,body.dt-linked-post .edit-post-visual-editor,body.dt-linked-post .editor-post-excerpt__textarea,body.dt-linked-post button,body.dt-linked-post input,body.dt-linked-post label,body.dt-linked-post select,body.dt-linked-post textarea{cursor:default;opacity:.5;pointer-events:none}body.dt-linked-post .components-confirm-dialog button,body.dt-linked-post .components-menu-item__button,body.dt-linked-post .components-panel__body-toggle,body.dt-linked-post .components-panel__header .button,body.dt-linked-post .components-panel__header .components-form-token-field__input-container,body.dt-linked-post .components-panel__header button,body.dt-linked-post .components-panel__header input,body.dt-linked-post .components-panel__header label,body.dt-linked-post .components-panel__header select,body.dt-linked-post .components-panel__header textarea,body.dt-linked-post .components-time-picker .button,body.dt-linked-post .components-time-picker .components-form-token-field__input-container,body.dt-linked-post .components-time-picker button,body.dt-linked-post .components-time-picker input,body.dt-linked-post .components-time-picker label,body.dt-linked-post .components-time-picker select,body.dt-linked-post .components-time-picker textarea,body.dt-linked-post .edit-post-header__settings .button,body.dt-linked-post .edit-post-header__settings .components-form-token-field__input-container,body.dt-linked-post .edit-post-header__settings button,body.dt-linked-post .edit-post-header__settings input,body.dt-linked-post .edit-post-header__settings label,body.dt-linked-post .edit-post-header__settings select,body.dt-linked-post .edit-post-header__settings textarea,body.dt-linked-post .edit-post-post-schedule__toggle,body.dt-linked-post .edit-post-post-visibility__toggle,body.dt-linked-post .edit-post-welcome-guide .button,body.dt-linked-post .edit-post-welcome-guide .components-form-token-field__input-container,body.dt-linked-post .edit-post-welcome-guide button,body.dt-linked-post .edit-post-welcome-guide input,body.dt-linked-post .edit-post-welcome-guide label,body.dt-linked-post .edit-post-welcome-guide select,body.dt-linked-post .edit-post-welcome-guide textarea,body.dt-linked-post .editor-all-actions-button,body.dt-linked-post .editor-header__settings .button,body.dt-linked-post .editor-header__settings .components-form-token-field__input-container,body.dt-linked-post .editor-header__settings button,body.dt-linked-post .editor-header__settings input,body.dt-linked-post .editor-header__settings label,body.dt-linked-post .editor-header__settings select,body.dt-linked-post .editor-header__settings textarea,body.dt-linked-post .editor-post-publish-button,body.dt-linked-post .editor-post-publish-panel button,body.dt-linked-post .editor-post-status .button,body.dt-linked-post .editor-post-status .components-form-token-field__input-container,body.dt-linked-post .editor-post-status button,body.dt-linked-post .editor-post-status input,body.dt-linked-post .editor-post-status label,body.dt-linked-post .editor-post-status select,body.dt-linked-post .editor-post-status textarea,body.dt-linked-post .editor-post-switch-to-draft,body.dt-linked-post .editor-post-trash,body.dt-linked-post .react-datepicker .button,body.dt-linked-post .react-datepicker .components-form-token-field__input-container,body.dt-linked-post .react-datepicker button,body.dt-linked-post .react-datepicker input,body.dt-linked-post .react-datepicker label,body.dt-linked-post .react-datepicker select,body.dt-linked-post .react-datepicker textarea{cursor:pointer;opacity:1;pointer-events:auto}body.dt-linked-post #post-sticky-toggle-0{cursor:pointer;pointer-events:auto}body.dt-linked-post .edit-post-last-revision__panel{display:none}#distributed-from,#distributed-from a,#distributed-from strong{vertical-align:top} +body.dt-linked-post .button,body.dt-linked-post .components-form-token-field__input-container,body.dt-linked-post .edit-post-visual-editor,body.dt-linked-post .editor-post-excerpt__textarea,body.dt-linked-post button,body.dt-linked-post input,body.dt-linked-post label,body.dt-linked-post select,body.dt-linked-post textarea{cursor:default;opacity:.5;pointer-events:none}body.dt-linked-post .distributed-modal-popup *{opacity:1;pointer-events:auto}body.dt-linked-post .distributed-modal-popup a,body.dt-linked-post .distributed-modal-popup button{cursor:pointer}body.dt-linked-post .components-confirm-dialog button,body.dt-linked-post .components-menu-item__button,body.dt-linked-post .components-panel__body-toggle,body.dt-linked-post .components-panel__header .button,body.dt-linked-post .components-panel__header .components-form-token-field__input-container,body.dt-linked-post .components-panel__header button,body.dt-linked-post .components-panel__header input,body.dt-linked-post .components-panel__header label,body.dt-linked-post .components-panel__header select,body.dt-linked-post .components-panel__header textarea,body.dt-linked-post .components-time-picker .button,body.dt-linked-post .components-time-picker .components-form-token-field__input-container,body.dt-linked-post .components-time-picker button,body.dt-linked-post .components-time-picker input,body.dt-linked-post .components-time-picker label,body.dt-linked-post .components-time-picker select,body.dt-linked-post .components-time-picker textarea,body.dt-linked-post .edit-post-header__settings .button,body.dt-linked-post .edit-post-header__settings .components-form-token-field__input-container,body.dt-linked-post .edit-post-header__settings button,body.dt-linked-post .edit-post-header__settings input,body.dt-linked-post .edit-post-header__settings label,body.dt-linked-post .edit-post-header__settings select,body.dt-linked-post .edit-post-header__settings textarea,body.dt-linked-post .edit-post-post-schedule__toggle,body.dt-linked-post .edit-post-post-visibility__toggle,body.dt-linked-post .edit-post-welcome-guide .button,body.dt-linked-post .edit-post-welcome-guide .components-form-token-field__input-container,body.dt-linked-post .edit-post-welcome-guide button,body.dt-linked-post .edit-post-welcome-guide input,body.dt-linked-post .edit-post-welcome-guide label,body.dt-linked-post .edit-post-welcome-guide select,body.dt-linked-post .edit-post-welcome-guide textarea,body.dt-linked-post .editor-all-actions-button,body.dt-linked-post .editor-header__settings .button,body.dt-linked-post .editor-header__settings .components-form-token-field__input-container,body.dt-linked-post .editor-header__settings button,body.dt-linked-post .editor-header__settings input,body.dt-linked-post .editor-header__settings label,body.dt-linked-post .editor-header__settings select,body.dt-linked-post .editor-header__settings textarea,body.dt-linked-post .editor-post-publish-button,body.dt-linked-post .editor-post-publish-panel button,body.dt-linked-post .editor-post-status .button,body.dt-linked-post .editor-post-status .components-form-token-field__input-container,body.dt-linked-post .editor-post-status button,body.dt-linked-post .editor-post-status input,body.dt-linked-post .editor-post-status label,body.dt-linked-post .editor-post-status select,body.dt-linked-post .editor-post-status textarea,body.dt-linked-post .editor-post-switch-to-draft,body.dt-linked-post .editor-post-trash,body.dt-linked-post .react-datepicker .button,body.dt-linked-post .react-datepicker .components-form-token-field__input-container,body.dt-linked-post .react-datepicker button,body.dt-linked-post .react-datepicker input,body.dt-linked-post .react-datepicker label,body.dt-linked-post .react-datepicker select,body.dt-linked-post .react-datepicker textarea{cursor:pointer;opacity:1;pointer-events:auto}body.dt-linked-post #post-sticky-toggle-0{cursor:pointer;pointer-events:auto}body.dt-linked-post .edit-post-last-revision__panel{display:none}#distributed-from,#distributed-from a,#distributed-from strong{vertical-align:top} diff --git a/dist/js/admin-css.min.asset.php b/dist/js/admin-css.min.asset.php index f852929f4..253961f50 100644 --- a/dist/js/admin-css.min.asset.php +++ b/dist/js/admin-css.min.asset.php @@ -1 +1 @@ - array('wp-polyfill'), 'version' => '8220a935bcadeb95c3f2'); + array('wp-polyfill'), 'version' => 'c1617efcdf9512cab0ae'); diff --git a/dist/js/admin-external-connection.min.asset.php b/dist/js/admin-external-connection.min.asset.php index 01d6911aa..4ba29f4b8 100644 --- a/dist/js/admin-external-connection.min.asset.php +++ b/dist/js/admin-external-connection.min.asset.php @@ -1 +1 @@ - array('jquery', 'underscore', 'wp-a11y', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '8a2789fb0a0fc6da4bb3'); + array('jquery', 'underscore', 'wp-a11y', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'dabee3ebe0a6e2aaa7e9'); diff --git a/dist/js/gutenberg-plugin.min.asset.php b/dist/js/gutenberg-plugin.min.asset.php index 385cdcf6c..50df6c86f 100644 --- a/dist/js/gutenberg-plugin.min.asset.php +++ b/dist/js/gutenberg-plugin.min.asset.php @@ -1 +1 @@ - array('react', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '6567de62cc4c08dd730a'); + array('react', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '9c07052aef2738354368'); diff --git a/dist/js/gutenberg-plugin.min.js b/dist/js/gutenberg-plugin.min.js index 8ae42afe1..68dae8754 100644 --- a/dist/js/gutenberg-plugin.min.js +++ b/dist/js/gutenberg-plugin.min.js @@ -1 +1 @@ -(()=>{"use strict";const t=window.React,e=window.wp.primitives,i=(0,t.createElement)(e.SVG,{width:"20",height:"20",viewBox:"13.4 8.8 573.2 573.2",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)(e.Path,{d:"M195.113 411.033c45.835 46.692 119.124 58.488 178.387 24.273 70.262-40.566 94.371-130.544 53.806-200.806-40.566-70.262-130.544-94.371-200.806-53.806-19.873 11.474-36.055 26.899-48.124 44.715l64.722 33.186c22.201-25.593 59.796-33.782 91.279-17.639 37.002 18.973 51.64 64.418 32.667 101.421-18.973 37.002-64.418 51.64-101.421 32.667-31.483-16.143-46.776-51.45-38.951-84.415l-81.702-41.892c-8.838-4.532-12.335-15.367-7.814-24.211 15.514-30.346 39.658-56.715 71.344-75.009 87.469-50.5 199.482-20.486 249.983 66.983 50.5 87.469 20.486 199.482-66.983 249.983-75.235 43.437-168.63 27.307-225.419-33.717-17.809 3.778-36.797-4.055-46.387-20.666-11.922-20.648-4.837-47.091 15.812-59.012 20.648-11.922 47.091-4.836 59.012 15.812 7.77 13.458 7.466 29.377.595 42.133Z"}),(0,t.createElement)(e.Path,{d:"M262.237 72.985C148.8 91.101 62 189.494 62 308c0 131.356 106.644 238 238 238s238-106.644 238-238c0-34.059-7.168-66.458-20.08-95.766-15.121.99-30.323-6.014-39.137-19.626-12.959-20.014-7.231-46.783 12.783-59.742 20.014-12.958 46.783-7.231 59.742 12.783 10.095 15.592 8.849 35.284-1.657 49.352C565.288 229.461 574 267.721 574 308c0 151.225-122.775 274-274 274S26 459.225 26 308C26 170.539 127.443 56.584 259.487 36.98 265.594 20.533 281.438 8.8 300 8.8c23.843 0 43.2 19.357 43.2 43.2 0 23.843-19.357 43.2-43.2 43.2-16.229 0-30.38-8.968-37.763-22.215Z"})),n=window.wp.components,s=window.wp.data,r=window.wp.editPost,o=window.wp.i18n,l=window.wp.plugins,{document:c,dt:u,dtGutenberg:a,MouseEvent:d}=window,p=()=>{const e=c.body.classList;if(0!==parseInt(a.syndicationTime))return null;const i=c.querySelector("#wp-admin-bar-distributor"),n=c.querySelector("#wp-admin-bar-distributor > a");if(!i||!n)return(0,t.createElement)("div",{className:"distributor-toggle"},(0,t.createElement)("span",null,(0,o.__)("Refresh page to see distribution options","distributor")));const r=(0,s.select)("core/edit-post").isFeatureActive("fullscreenMode");return(0,t.createElement)("div",{className:"distributor-toggle"},(0,t.createElement)("button",{className:"components-button is-secondary",type:"button",onClick:()=>{const t=new d("mouseenter");r?e.add("is-showing-distributor"):e.remove("is-showing-distributor"),i.classList.toggle("hover"),n.dispatchEvent(t)}},(0,o.sprintf)((0,o.__)("Distribute %1$s","distributor"),a.postTypeSingular.toLowerCase()||(0,o._x)("content","generic term for post content","distributor"))))},m=()=>0!==parseInt(a.syndicationTime)?null:(0,t.createElement)("p",null,(0,o.__)("Distribution options available once published","distributor")),b=()=>0(0,t.createElement)("span",{id:"distributed-to"},(0,o.sprintf)((0,o._n)("Distributed to %1$s connection.","Distributed to %1$s connections.",1*a.syndicationCount,"distributor"),a.syndicationCount)),g=()=>(0,t.createElement)("span",{id:"distributed-from"},(0,o.sprintf)((0,o.__)("Distributed on: %1$s","distributor"),a.syndicationTime)),E=()=>(0,t.createElement)(n.Icon,{className:"components-panel__icon",icon:i,size:20});(0,l.registerPlugin)("distributor-plugin",{render:()=>{const e=(0,s.useSelect)((t=>t("core/editor").getCurrentPostType())),i=(0,s.useSelect)((t=>t("core/editor").getCurrentPostAttribute("status"))),n=c.querySelector("#wp-admin-bar-distributor"),l=(0,s.useSelect)((t=>t("core/editor").getCurrentPost()));return a.noPermissions&&1===parseInt(a.noPermissions)||a.supportedPostTypes&&void 0===a.supportedPostTypes[e]?null:(u.postTitle=l.title,u.postStatus=l.status,a.supportedPostStati&&!a.supportedPostStati.includes(i)?(n?.classList.add("hide"),(0,t.createElement)(r.PluginDocumentSettingPanel,{title:(0,o.__)("Distributor","distributor"),icon:E,className:"distributor-panel"},(0,t.createElement)(m,null),(0,t.createElement)(b,null))):(n?.classList.remove("hide"),(0,t.createElement)(r.PluginDocumentSettingPanel,{title:(0,o.__)("Distributor","distributor"),icon:E,className:"distributor-panel"},(0,t.createElement)(p,null),(0,t.createElement)(b,null))))}})})(); \ No newline at end of file +(()=>{"use strict";const e=window.React,t=window.wp.primitives,i=(0,e.createElement)(t.SVG,{width:"20",height:"20",viewBox:"13.4 8.8 573.2 573.2",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(t.Path,{d:"M195.113 411.033c45.835 46.692 119.124 58.488 178.387 24.273 70.262-40.566 94.371-130.544 53.806-200.806-40.566-70.262-130.544-94.371-200.806-53.806-19.873 11.474-36.055 26.899-48.124 44.715l64.722 33.186c22.201-25.593 59.796-33.782 91.279-17.639 37.002 18.973 51.64 64.418 32.667 101.421-18.973 37.002-64.418 51.64-101.421 32.667-31.483-16.143-46.776-51.45-38.951-84.415l-81.702-41.892c-8.838-4.532-12.335-15.367-7.814-24.211 15.514-30.346 39.658-56.715 71.344-75.009 87.469-50.5 199.482-20.486 249.983 66.983 50.5 87.469 20.486 199.482-66.983 249.983-75.235 43.437-168.63 27.307-225.419-33.717-17.809 3.778-36.797-4.055-46.387-20.666-11.922-20.648-4.837-47.091 15.812-59.012 20.648-11.922 47.091-4.836 59.012 15.812 7.77 13.458 7.466 29.377.595 42.133Z"}),(0,e.createElement)(t.Path,{d:"M262.237 72.985C148.8 91.101 62 189.494 62 308c0 131.356 106.644 238 238 238s238-106.644 238-238c0-34.059-7.168-66.458-20.08-95.766-15.121.99-30.323-6.014-39.137-19.626-12.959-20.014-7.231-46.783 12.783-59.742 20.014-12.958 46.783-7.231 59.742 12.783 10.095 15.592 8.849 35.284-1.657 49.352C565.288 229.461 574 267.721 574 308c0 151.225-122.775 274-274 274S26 459.225 26 308C26 170.539 127.443 56.584 259.487 36.98 265.594 20.533 281.438 8.8 300 8.8c23.843 0 43.2 19.357 43.2 43.2 0 23.843-19.357 43.2-43.2 43.2-16.229 0-30.38-8.968-37.763-22.215Z"})),n=window.wp.components,r=window.wp.data,s=window.wp.editPost,o=window.wp.i18n,a=window.wp.plugins,l=window.wp.element,{document:d,dt:c,dtGutenberg:u,MouseEvent:m}=window,p=()=>{const t=d.body.classList;if(0!==parseInt(u.syndicationTime))return null;const i=d.querySelector("#wp-admin-bar-distributor"),n=d.querySelector("#wp-admin-bar-distributor > a");if(!i||!n)return(0,e.createElement)("div",{className:"distributor-toggle"},(0,e.createElement)("span",null,(0,o.__)("Refresh page to see distribution options","distributor")));const s=(0,r.select)("core/edit-post").isFeatureActive("fullscreenMode");return(0,e.createElement)("div",{className:"distributor-toggle"},(0,e.createElement)("button",{className:"components-button is-secondary",type:"button",onClick:()=>{const e=new m("mouseenter");s?t.add("is-showing-distributor"):t.remove("is-showing-distributor"),i.classList.toggle("hover"),n.dispatchEvent(e)}},(0,o.sprintf)((0,o.__)("Distribute %1$s","distributor"),u.postTypeSingular.toLowerCase()||(0,o._x)("content","generic term for post content","distributor"))))},b=()=>0!==parseInt(u.syndicationTime)?null:(0,e.createElement)("p",null,(0,o.__)("Distribution options available once published","distributor")),E=()=>0(0,e.createElement)("span",{id:"distributed-to"},(0,o.sprintf)((0,o._n)("Distributed to %1$s connection.","Distributed to %1$s connections.",1*u.syndicationCount,"distributor"),u.syndicationCount)),g=()=>{const[t,r]=(0,l.useState)(!1),s=()=>r(!0),a=()=>r(!1);return parseInt(u.unlinked)?(0,e.createElement)("div",null,(0,e.createElement)("span",{id:"distributed-from"},(0,o.sprintf)((0,o.__)("Pulled on %1$s from %2$s","distributor"),u.syndicationTime,u.originalLocationName)),(0,e.createElement)("span",{id:"distributed-data"},(0,o.__)("This post has been unlinked from the ","distributor"),(0,e.createElement)("a",{href:u.postUrl},(0,o.__)("Original Content","distributor")),"."),(0,e.createElement)("span",{id:"distributed-restorelink",onClick:s}," ",(0,e.createElement)("span",{className:"dashicons dashicons-admin-links"}),(0,e.createElement)("a",{href:"javascript:void(0);"}," ",(0,o.__)("Restore link to Original","distributor"))),t&&(0,e.createElement)(n.Modal,{title:"Restore link to Original",icon:i,size:50,onRequestClose:a,className:"distributed-modal-popup",overlayClassName:"distributed-modal-overlay"},(0,e.createElement)("span",{id:"distributed-data"},(0,o.__)("Restoring the link to the ","distributor"),(0,e.createElement)("a",{href:u.postUrl},(0,o.__)("Original Content","distributor")),(0,o.__)(" will start updating this post automatically from the Original, overwriting current content.","distributor")),(0,e.createElement)("div",{className:"actions"},(0,e.createElement)("a",{href:u.linkNonceUrl,className:"button"},(0,e.createElement)("span",{className:"dashicons dashicons-admin-links"}),(0,o.__)("Restore link","distributor")),(0,e.createElement)("span",{id:"close",onClick:a,"aria-label":"Cancel"}," ",(0,e.createElement)("a",{href:"javascript:void(0);"}," ",(0,o.__)("Cancel","distributor")))))):(0,e.createElement)("div",null,(0,e.createElement)("span",{id:"distributed-from"},(0,o.sprintf)((0,o.__)("Pulled & linked on %1$s from %2$s","distributor"),u.syndicationTime,u.originalLocationName)),(0,e.createElement)("span",{id:"distributed-data"},(0,o.__)("Updating the ","distributor"),(0,e.createElement)("a",{href:u.postUrl},(0,o.__)("Original Content","distributor")),", ",(0,o.__)("will update this post automatically.","distributor")),(0,e.createElement)("span",{id:"distributed-unlink",onClick:s}," ",(0,e.createElement)("a",{href:"javascript:void(0);"}," ",(0,e.createElement)("span",{className:"dashicons dashicons-editor-unlink"}),(0,o.__)("Unlink from Original","distributor"))),t&&(0,e.createElement)(n.Modal,{title:"Unlink from Original",icon:i,size:50,onRequestClose:a,className:"distributed-modal-popup",overlayClassName:"distributed-modal-overlay"},(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:(0,o.sprintf)((0,o.__)("Unlinking from the %1$sOriginal Content%2$s will stop updating this post automatically.","distributor"),'',"")}}),(0,e.createElement)(n.Flex,{justify:"flex-start",className:"actions"},(0,e.createElement)(n.Button,{icon:(0,e.createElement)(n.Icon,{icon:"editor-unlink"}),variant:"secondary",href:u.unlinkNonceUrl},(0,o.__)("Unlink","distributor")),(0,e.createElement)(n.Button,{variant:"link",onClick:a},(0,o.__)("Cancel","distributor")))))},w=()=>(0,e.createElement)(n.Icon,{className:"components-panel__icon",icon:i,size:20}),h=0!==parseInt(u.unlinked),f=()=>h?(0,o.__)("Unlinked Content","distributor"):(0,o.__)("Pulled Content","distributor");(0,a.registerPlugin)("distributor-plugin",{render:()=>{const t=(0,r.useSelect)((e=>e("core/editor").getCurrentPostType())),i=(0,r.useSelect)((e=>e("core/editor").getCurrentPostAttribute("status"))),n=d.querySelector("#wp-admin-bar-distributor"),o=(0,r.useSelect)((e=>e("core/editor").getCurrentPost()));return u.noPermissions&&1===parseInt(u.noPermissions)||u.supportedPostTypes&&void 0===u.supportedPostTypes[t]?null:(c.postTitle=o.title,c.postStatus=o.status,u.supportedPostStati&&!u.supportedPostStati.includes(i)?(n?.classList.add("hide"),(0,e.createElement)(s.PluginDocumentSettingPanel,{title:(0,e.createElement)(f,null),icon:w,className:"distributor-panel"},(0,e.createElement)(b,null),(0,e.createElement)(E,null))):(n?.classList.remove("hide"),(0,e.createElement)(s.PluginDocumentSettingPanel,{title:(0,e.createElement)(f,null),icon:w,className:"distributor-panel"},(0,e.createElement)(p,null),(0,e.createElement)(E,null))))}})})(); \ No newline at end of file diff --git a/dist/js/gutenberg-syndicated-post-css.min.asset.php b/dist/js/gutenberg-syndicated-post-css.min.asset.php index 28654809f..08861c43c 100644 --- a/dist/js/gutenberg-syndicated-post-css.min.asset.php +++ b/dist/js/gutenberg-syndicated-post-css.min.asset.php @@ -1 +1 @@ - array('wp-polyfill'), 'version' => '9f5b50ce010d7afb686c'); + array('wp-polyfill'), 'version' => 'b19bac7e303413f43034'); diff --git a/dist/js/gutenberg-syndicated-post.min.asset.php b/dist/js/gutenberg-syndicated-post.min.asset.php index 687d1abd8..94a5c0d95 100644 --- a/dist/js/gutenberg-syndicated-post.min.asset.php +++ b/dist/js/gutenberg-syndicated-post.min.asset.php @@ -1 +1 @@ - array('wp-data', 'wp-i18n', 'wp-polyfill'), 'version' => 'cf540202133accb478e5'); + array('wp-data', 'wp-i18n', 'wp-polyfill'), 'version' => '50fe1b82b0c017a85ad5'); diff --git a/dist/js/push.min.asset.php b/dist/js/push.min.asset.php index 07dd590fc..58d82233b 100644 --- a/dist/js/push.min.asset.php +++ b/dist/js/push.min.asset.php @@ -1 +1 @@ - array('jquery', 'underscore', 'wp-i18n', 'wp-polyfill'), 'version' => '8e105779b5a1a7b6f9ee'); + array('jquery', 'underscore', 'wp-i18n', 'wp-polyfill'), 'version' => 'e404f5555dd15300c46b'); diff --git a/distributor.php b/distributor.php index b68ac2370..c26713484 100644 --- a/distributor.php +++ b/distributor.php @@ -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.5 + * Version: 2.0.6 * Requires at least: 6.4 * Requires PHP: 7.4 * Author: 10up Inc. @@ -28,7 +28,7 @@ exit; // Exit if accessed directly. } -define( 'DT_VERSION', '2.0.5' ); +define( 'DT_VERSION', '2.0.6' ); define( 'DT_PLUGIN_FILE', preg_replace( '#^.*plugins/(.*)$#i', '$1', __FILE__ ) ); define( 'DT_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); define( 'DT_PLUGIN_FULL_FILE', __FILE__ ); diff --git a/includes/classes/Authentications/WordPressBasicAuth.php b/includes/classes/Authentications/WordPressBasicAuth.php index 6854284ee..8dfff2613 100644 --- a/includes/classes/Authentications/WordPressBasicAuth.php +++ b/includes/classes/Authentications/WordPressBasicAuth.php @@ -34,6 +34,62 @@ class WordPressBasicAuth extends Authentication { */ public static $label = 'Username/Password'; + /** + * Site URL + * + * @var string + */ + public $site_url; + + /** + * Username + * + * @var string + */ + public $username; + + /** + * Password + * + * @var string + */ + public $password; + + /** + * API Key + * + * @var string + */ + public $client_id; + + /** + * API Secret + * + * @var string + */ + public $client_secret; + + /** + * Redirect URI + * + * @var string + */ + public $redirect_uri; + + /** + * Access Token + * + * @var string + */ + public $base64_encoded; + + /** + * Created Post ID + * + * @var string + */ + public $dt_created_post_id; + /** * Setup class * diff --git a/includes/syndicated-post-ui.php b/includes/syndicated-post-ui.php index 43c8d66e5..f0bf76b4a 100644 --- a/includes/syndicated-post-ui.php +++ b/includes/syndicated-post-ui.php @@ -79,18 +79,23 @@ function output_distributor_column( $column_name, $post_id ) { $original_blog_id = get_post_meta( $post_id, 'dt_original_blog_id', true ); $original_source_id = get_post_meta( $post_id, 'dt_original_source_id', true ); $original_deleted = (bool) get_post_meta( $post_id, 'dt_original_post_deleted', true ); + $connection_map = get_post_meta( $post_id, 'dt_connection_map', true ); - if ( ( empty( $original_blog_id ) && empty( $original_source_id ) ) || $original_deleted ) { - echo '—'; + if ( ( ( empty( $original_blog_id ) && empty( $original_source_id ) ) || $original_deleted ) && ! $connection_map ) { + echo ''; } else { - $unlinked = (bool) get_post_meta( $post_id, 'dt_unlinked', true ); - $post_type_object = get_post_type_object( get_post_type( $post_id ) ); - $post_url = get_post_meta( $post_id, 'dt_original_post_url', true ); - - if ( $unlinked ) { - echo '' . esc_attr__( 'Unlinked', 'distributor' ) . ''; + if ( $connection_map ) { + // When a post is pushed from current site or pulled by other sites. + echo ''; } else { - echo '' . esc_attr__( 'Linked', 'distributor' ) . ''; + $unlinked = (bool) get_post_meta( $post_id, 'dt_unlinked', true ); + $post_url = get_post_meta( $post_id, 'dt_original_post_url', true ); + + if ( $unlinked ) { + echo ''; + } else { + echo ''; + } } } } @@ -373,12 +378,12 @@ function link() { if ( ! empty( $update ) ) { wp_update_post( - [ + array( 'ID' => $post_id, 'post_title' => $update['post_title'], 'post_content' => $update['post_content'], 'post_excerpt' => $update['post_excerpt'], - ] + ) ); if ( null !== $update['meta'] ) { @@ -640,7 +645,7 @@ function enqueue_gutenberg_edit_scripts() { 'gutenberg-syndicated-post.min' ); - $localize_data = [ + $localize_data = array( 'originalBlogId' => (int) $original_blog_id, 'originalPostId' => (int) $original_post_id, 'originalSourceId' => (int) $original_source_id, @@ -658,7 +663,7 @@ function enqueue_gutenberg_edit_scripts() { 'supportedPostStati' => \Distributor\Utils\distributable_post_statuses(), // Filter documented in includes/push-ui.php. 'noPermissions' => ! is_user_logged_in() || ! current_user_can( apply_filters( 'dt_syndicatable_capabilities', 'edit_posts' ) ), - ]; + ); $gutenberg_syndicated_post_script ->load_in_footer() diff --git a/lang/distributor.pot b/lang/distributor.pot index 388c9f767..f4436d8e8 100644 --- a/lang/distributor.pot +++ b/lang/distributor.pot @@ -2,21 +2,20 @@ # This file is distributed under the GPLv2 or later. msgid "" msgstr "" -"Project-Id-Version: Distributor 2.0.5\n" +"Project-Id-Version: Distributor 2.0.6\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/distributor\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-08-15T16:57:47+00:00\n" +"POT-Creation-Date: 2024-09-26T15:13:23+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: distributor\n" #. Plugin Name of the plugin #: distributor.php -#: dist/js/gutenberg-plugin.min.js:4 #: release/dist/js/gutenberg-plugin.min.js:1 msgid "Distributor" msgstr "" @@ -161,73 +160,73 @@ msgstr "" msgid "Authorization error:" msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:66 +#: includes/classes/Authentications/WordPressBasicAuth.php:122 #: release/includes/classes/Authentications/WordPressBasicAuth.php:66 msgid "Remote Connection Wizard" msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:68 +#: includes/classes/Authentications/WordPressBasicAuth.php:124 #: release/includes/classes/Authentications/WordPressBasicAuth.php:68 msgid "Enter the URL of a site that also has the latest version of Distributor installed and the wizard will attempt to generate an application-specific password and fill in the rest of the connection details for you." msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:71 +#: includes/classes/Authentications/WordPressBasicAuth.php:127 #: release/includes/classes/Authentications/WordPressBasicAuth.php:71 msgid "If you are not already logged in to the other site, you will be prompted to log in before continuing. The login details you enter will not be stored on this site." msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:73 +#: includes/classes/Authentications/WordPressBasicAuth.php:129 #: release/includes/classes/Authentications/WordPressBasicAuth.php:73 msgid "External Site URL" msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:77 +#: includes/classes/Authentications/WordPressBasicAuth.php:133 #: release/includes/classes/Authentications/WordPressBasicAuth.php:77 msgid "Authorize Connection" msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:80 +#: includes/classes/Authentications/WordPressBasicAuth.php:136 #: release/includes/classes/Authentications/WordPressBasicAuth.php:80 msgid "Manually Set Up Connection" msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:84 +#: includes/classes/Authentications/WordPressBasicAuth.php:140 #: release/includes/classes/Authentications/WordPressBasicAuth.php:84 msgid "Checking the connection..." msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:90 +#: includes/classes/Authentications/WordPressBasicAuth.php:146 #: release/includes/classes/Authentications/WordPressBasicAuth.php:90 msgid "Note: the remote site must also be running Distributor version 1.6.0 or higher to use this wizard. If not, please manually set up the connection." msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:95 +#: includes/classes/Authentications/WordPressBasicAuth.php:151 #: release/includes/classes/Authentications/WordPressBasicAuth.php:95 msgid "Edit configuration" msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:97 +#: includes/classes/Authentications/WordPressBasicAuth.php:153 #: release/includes/classes/Authentications/WordPressBasicAuth.php:97 msgid "Username" msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:100 +#: includes/classes/Authentications/WordPressBasicAuth.php:156 #: release/includes/classes/Authentications/WordPressBasicAuth.php:100 msgid "A username from the external WordPress site to connect with. For full functionality, this needs to be a user with an administrator role." msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:103 +#: includes/classes/Authentications/WordPressBasicAuth.php:159 #: release/includes/classes/Authentications/WordPressBasicAuth.php:103 msgid "Password" msgstr "" -#: includes/classes/Authentications/WordPressBasicAuth.php:106 +#: includes/classes/Authentications/WordPressBasicAuth.php:162 #: release/includes/classes/Authentications/WordPressBasicAuth.php:106 msgid "(Change)" msgstr "" #. translators: %s: Application Passwords documentation URL -#: includes/classes/Authentications/WordPressBasicAuth.php:121 +#: includes/classes/Authentications/WordPressBasicAuth.php:177 #: release/includes/classes/Authentications/WordPressBasicAuth.php:121 msgid "Important: We strongly recommend using the Application Passwords feature on the site you are connecting to in order to create a unique password for this connection. This helps limit the use of your primary password and will allow you to revoke access in the future if needed." msgstr "" @@ -531,7 +530,7 @@ msgstr "" #: includes/classes/PullListTable.php:643 #: release/includes/classes/PullListTable.php:342 #: release/includes/classes/PullListTable.php:358 -#: release/includes/classes/PullListTable.php:645 +#: release/includes/classes/PullListTable.php:643 #: dist/js/admin-pull.min.js:1 #: release/dist/js/admin-pull.min.js:1 msgid "Pull as draft" @@ -592,12 +591,12 @@ msgid "Bulk Actions" msgstr "" #: includes/classes/PullListTable.php:625 -#: release/includes/classes/PullListTable.php:626 +#: release/includes/classes/PullListTable.php:625 msgid "View all" msgstr "" #: includes/classes/PullListTable.php:633 -#: release/includes/classes/PullListTable.php:635 +#: release/includes/classes/PullListTable.php:633 msgid "Filter" msgstr "" @@ -653,6 +652,8 @@ msgid "Please enter a valid URL, including the HTTP(S)." msgstr "" #: dist/js/admin-external-connection.min.js:2 +#: dist/js/gutenberg-plugin.min.js:4 +#: dist/js/gutenberg-plugin.min.js:6 #: release/dist/js/admin-external-connection.min.js:1 msgid "Cancel" msgstr "" @@ -699,8 +700,66 @@ msgstr[1] "" #. translators: 1: Syndication date and time. #: dist/js/gutenberg-plugin.min.js:4 -#: release/dist/js/gutenberg-plugin.min.js:1 -msgid "Distributed on: %1$s" +msgid "Pulled on %1$s from %2$s" +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:4 +msgid "This post has been unlinked from the " +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:4 +#: dist/js/gutenberg-plugin.min.js:5 +msgid "Original Content" +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:4 +msgid "Restore link to Original" +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:4 +msgid "Restoring the link to the " +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:4 +msgid " will start updating this post automatically from the Original, overwriting current content." +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:4 +msgid "Restore link" +msgstr "" + +#. translators: 1: Syndication date and time. +#: dist/js/gutenberg-plugin.min.js:5 +msgid "Pulled & linked on %1$s from %2$s" +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:5 +msgid "Updating the " +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:5 +msgid "will update this post automatically." +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:5 +msgid "Unlink from Original" +msgstr "" + +#. translators: %1$s: Original Content URL Opening Tag, %2$s: Original Content URL Closing Tag +#: dist/js/gutenberg-plugin.min.js:6 +msgid "Unlinking from the %1$sOriginal Content%2$s will stop updating this post automatically." +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:6 +msgid "Unlink" +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:6 +msgid "Unlinked Content" +msgstr "" + +#: dist/js/gutenberg-plugin.min.js:6 +msgid "Pulled Content" msgstr "" #. translators: 1) Source of content, 2) Distributor post type singular name. @@ -755,3 +814,7 @@ msgid "Selected connection (%d)" msgid_plural "Selected connections (%d)" msgstr[0] "" msgstr[1] "" + +#: release/dist/js/gutenberg-plugin.min.js:1 +msgid "Distributed on: %1$s" +msgstr "" diff --git a/readme.txt b/readme.txt index 02c3b7ada..c268ccf68 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: 10up Tags: content, distribution, syndication, management Tested up to: 6.6 -Stable tag: 2.0.5 +Stable tag: 2.0.6 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html