Comments (7)
Am I correct to use that Class? And is the WP_Site in the constructor the target site? Looking at the coding it does looks like it right?
@jmslbam Yes, you're right, you can use that class to distribute posts to sites in the network. Take a look at the following function for more inspiration on how to distribute posts programmatically.
distributor/includes/push-ui.php
Lines 224 to 374 in faadb68
from distributor.
@dleeward thanks for the input, interesting idea. What's the use case you're looking to solve for with this idea?
from distributor.
@dleeward whats the problem you're trying to solve with this cron-based solution?
from distributor.
@dleeward can you please provide some more insight into the problem you're trying to solve here?
from distributor.
I'm closing this issue due to inactivity, but please let me know if you're still having problems so I can try to help... thanks!
from distributor.
Hi @jeffpaul,
Before creating a new ticket, is it ok to jump in here because I have the same request which I need for my current project.
I'm importing events which need to be distributed to a subsite based on a taxonomy term. Noting more, nothing less.
As this is my first run with Distributer, I would like to double check my current view of the plugin / steps I will take.
- I map my subsite to a specific term.
- Loop over all posts with Term X.
- Push these posts to the subsite using
class NetworkSiteConnection extends Connection
Am I correct to use that Class? And is the WP_Site in the constructor the target site? Looking at the coding it does looks like it right? https://github.com/10up/distributor/blob/develop/includes/classes/InternalConnections/NetworkSiteConnection.php#L53
And then I'm not taking in account the whole configuration / setting up the network and allowing site A to push to site B. Defining that in code, would be great and maybe it can already be done, but I think that is out-of-scope of this issue.
Kinds regards,
Jaime Martinez
from distributor.
Thank you @dinhtungdu for the feedback, will proceed with those example. If I find some optimalisations to decouple some code I will drop it here! Will keep you posted!
from distributor.
Related Issues (20)
- E2E Tests: migrate TestLodge tests to Cypress
- Parent of a distributed page is not saved
- The plugin hasn't been tested with the latest version of WordPress HOT 1
- Update admin menu icon to have the same width & height HOT 2
- List formerly-linked posts in pull UI with option to reassociate HOT 6
- Distributor UI disappears HOT 5
- Feature request: Add filter to allow for arbitrary media to be included in push/pull
- Upgrade Cypress to version 13
- [Block themes] Pulled posts author details are not replaced as author is unset HOT 1
- Cannot pull posts after update HOT 5
- Featured image not distributed/pushed after update HOT 6
- Is there a way to stop the auto sync of linked posts?
- Unpublish ditributed post HOT 1
- Connection Issues HOT 7
- Variable products pull as simple products HOT 1
- webp images dont pull for woocommerce
- lost connections when update the WordPress in version 6.3.2
- The plugin hasn't been tested with the latest version of WordPress HOT 2
- Filter to allow push/pull of draft/scheduled posts in network/external connected sites HOT 3
- Limited connection established. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from distributor.