GitHub - 10up/distributor: Share content between your websites.
source link: https://github.com/10up/distributor
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
Distributor
Download Latest Stable Version
Distributor is a WordPress plugin that makes it easy to syndicate 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.
Note: The latest stable version of the plugin is the stable branch. Download the stable branch if you are intending to use the plugin in production.
Requirements
- PHP 5.6+
- WordPress 4.7+
- External connections require HTTP Basic Authentication or WordPress.com OAuth2 (must be on VIP) be set up on the remote website. For Basic Auth, we recommend the Application Passwords plugin.
- For external connections, Distributor needs to be installed on BOTH sides of the connection.
Install
For production use, we recommend registering and downloading the plugin from DistributorPlugin.com – it's 100% free. You will be emailed a direct link to download the latest, production-ready build. Alternatively, you can download the latest master build from GitHub.
You can upload and install the archived (zip) plugin via the WordPress dashboard (Plugins > Add New -> Upload Plugin) or manually inside of the wp-content/plugins
directory, and activate on the Plugins dashboard.
Registration
To help inform our roadmap, keep adopters apprised of major updates and changes that could impact their websites, and solicit opportunities for beta testing and feedback, we’re asking for a little bit of information in exchange for a free key that unlocks update notifications and 1-click upgrades inside the WordPress dashboard. Your information is kept confidential. You can register here and input your key in Distributor settings in the dashboard (network dashboard for multisite users).
Plugin Usage
Distributor supports safe, SEO-friendly content reuse and sharing via "pushing" and "pulling".
While logged in and editing or viewing any single post (or custom post type) that can be distributed, a Distributor
admin bar item will appear, that will facilitate sharing ("pushing") that content to any connection
.
In the admin dashboard, a top level Distributor menu item links to the "pull" screen. Here, editors can share ("pull") content from any connection
into the current site.
There are two connection types: external
and internal
.
- Internal connections are other sites inside of the same multisite network. Any user logged into the network can distribute any content in the network to any other sites in the network where that user has permission to publish posts (assuming the site supports the same post type).
- External connections are external websites, connected by the JSON REST API. External connections can be added in the WordPress admin dashboard under Distributor > External Connections. Administrators can decide which user roles are allowed to distribute content to and from that connection (Editors and Administrators by default). All users with those roles will inherit the permissions of the user account used to establish the remote connection.
Gutenberg Support (Beta)
Distributor supports distributing Gutenberg posts but the functionality is currently in beta (as is Gutenberg itself). We expect this functionality to stabilize when Gutenberg is released into WordPress core.
Known Caveats/Issues
Remote Request Timeouts - With external connections, HTTP requests are sent back and forth - creating posts, transfering 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 here. 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 arbtirary 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 this hook. For internal connections, use this hook.
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.
External Connection Post Type Support - When pulling content from an external connection, only "Posts" (post type) content will appear. Pulling other post types from external connections is not currently supported. Internal connections (multisite) support multiple post types, and other post types can still be pushed to external connections that support the post type. This will be addressed in an upcoming release, including an improved interface for navigating available content by post types supported on both sides.
Changelog
-
1.2.3
- Fixed an issue that was hiding the "As Draft" checkbox on the push screen. We've introduced a new filter "dt_allow_as_draft_distribute" which can be set to false to disable the "as draft" checkbox.
-
1.2.2
- Fixed an issue where content pulled or skipped from an internal connection (in the Pull interface) would show up as "pulled" across all internal sites / connections. Backwards compatibility break: internal posts that were previously skipped or pulled will show as available for pull again in all internal sites.
- Don’t set Distributor meta data on REST API post creation unless post was created by Distributor
- Add helper function to return post statuses that are allowed to be distributed
- Utilize the og:url from Yoast for external connections
- Blacklist the
_wp_old_slug
and_wp_old_date
meta - Disable pull UI while switching between pull connections
- Add new filters for authorized sites for internal connections
- Documentation and formatting updates
-
1.2.1 - Gutenberg bug fixes; fix parent post bug.
-
1.2.0 - Gutenberg support, public release.
-
1.1.0 - Enable WordPress.com Oauth2 authentication.
-
1.0 - Initial closed release.
Developers
Testing
The plugin contains a standard test suite compatible with PHPUnit. If you want to test across multiple PHP versions, a Dockunit file is included.
Debugging
You can define a constant DISTRIBUTOR_DEBUG
to true
to increase the ease of debugging in Distributor. This will make all remote requests blocking and expose the subscription post type.
Work with us
Recommend
-
15
Coral updates: Project tutorials, a downloadable compiler, and a new dis...
-
2
The official Raspberry Pi accessory distributor conundrum Why isn’t the Norwegian keyboard layout variant of the official Raspberry Pi keyboard acc...
-
3
THIS WEEK'S SPONSOR: Concepts Sketch, Note, Draw
-
14
Renaming distributor_admin Bad IdeaSQL SERVER – Renaming distributor_admin Bad IdeaA client of Comprehensive Databas...
-
11
Thursday, 25 November 2021 09:52 Essity implements a customer-first distributor portal with FAIR Consulting Group By Essity COMPANY NEWS: Essity’s Australasian divis...
-
2
Thursday, 07 April 2022 16:39 Absolute Software appoints Orca Tech as distributor By Stephen Withers A...
-
1
Blog How we got grifted by a multi-billion dollar distributor and need to move 30,000 bags of coffee December 29, 2022Decemb...
-
2
Friday, 31 March 2023 11:39 BusiSoft AV appointed Australia, NZ distributor for Roon Labs Hardware By Gordon Peters
-
0
The authorized distributor for vivo in Poland is pulling out of the country Yesterday an unconfirmed report from Poland suggested that viv...
-
4
State Department Offers $5 Million for Information on Key Anom DistributorThe FBI secretly created its own encrypted phone company. Now the U.S. government wants help capturing Maximilian Rivkin, one of its alleged...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK