WP Branches For Post

Beschrijving

WP Branches For Post adds a Git-like editorial workflow to WordPress.

When a published page or post needs a larger edit, you do not have to change the live content directly. Create a private working branch, edit it in the normal WordPress editor, review the differences, and merge only when you are ready. The public original keeps its post ID, URL and publication identity throughout the workflow.

Version 2.1 adds a three-way merge review. The plugin remembers the original state at branch creation, compares the current original with the current branch, separates non-conflicting work from real conflicts, and helps you update or merge without silently overwriting newer changes.

De workflow in één oogopslag

  1. Open a published, private or scheduled post, page, or supported custom post type.
  2. Open het paneel Berichtbranch en kies “Branch maken”.
  3. WordPress opent een geïsoleerde conceptbranch. Het openbare origineel blijft ongewijzigd.
  4. Bewerk de branch zoals gewoonlijk. Bekijk een voorbeeld wanneer je die nodig hebt.
  5. Choose “Review changes”.
  6. Review branch changes, newer original changes, conflicts, and identity changes.
  7. If the original has newer non-conflicting edits, choose “Update branch from original” when you want the branch to include them before continuing.
  8. When the review is clean, choose “Save & merge into original”.
  9. If both sides changed the same value differently, review the conflict and use force merge only when you intentionally want the branch value for the listed conflict.
  10. Na een geslaagde samenvoeging blijft het origineel het openbare bericht en wordt de werkbranch naar de prullenbak verplaatst.

Functiegids met schermafbeeldingen

De schermafbeeldingen op de pluginpagina volgen dezelfde workflow als hieronder, zodat je kunt zien hoe elke bediening eruitziet voordat je ze gebruikt:

  • Schermafbeelding 1 — Begin veilig: open het paneel Berichtbranch op het origineel en kies “Branch maken”. Het live bericht wordt niet bewerkt.
  • Screenshot 2 — Work in isolation: the branch editor shows its relationship to the original, preview links, review state, and the actions available for that branch.
  • Screenshot 3 — Review before merging: “Review changes” opens the three-way comparison so you can inspect the baseline, current original, and branch values together.
  • Screenshot 4 — Bring in safe upstream work: when the original has newer non-conflicting changes, “Update branch from original” becomes available.
  • Screenshot 5 — Continue after updating: after the branch is refreshed from the original, the editor reloads with the rebased state and a fresh merge review.
  • Schermafbeelding 6 — Stop bij echte conflicten: wanneer zowel het origineel als de branch dezelfde samenvoegbare waarde verschillend hebben gewijzigd, wordt normaal samenvoegen geblokkeerd en worden de conflicterende paden getoond.
  • Screenshot 7 — Force only after review: force merge uses a separate destructive confirmation and prefers the branch value only for reviewed conflicts.
  • Screenshot 8 — Refuse stale reviews: if the branch or original changes after review, the merge is stopped and the current state must be reviewed again.
  • Schermafbeelding 9 — Verwijder expliciet: het opgeven van een branch vereist bevestiging en verplaatst alleen de branch naar de prullenbak; het openbare origineel blijft onaangeroerd.
  • Screenshot 10 — See active work from the original: the original post lists existing branches and their current review states.
  • Schermafbeelding 11 – Behoud de normale WordPress navigatie: branchstatus en snelle acties blijven beschikbaar vanuit de berichtenlijst.
  • Schermafbeelding 12 — Begrijp het bereik van gesynchroniseerde patronen: branches die naar gesynchroniseerde patronen verwijzen, tonen een waarschuwing omdat het bewerken van het gesynchroniseerde patroon zelf globaal is in WordPress.

Wat het paneel Berichtbranch je toont

Bij een origineel bericht toont het paneel of een branch kan worden gemaakt en geeft het actieve branches weer die je kunt bewerken.

Bij een branch toont het paneel:

  • Een link terug naar het origineel.
  • Voorbeeldlinks voor de branch en het origineel.
  • De maker van de branch.
  • The current review state.
  • Hoeveel branchwijzigingen en conflicten zijn gevonden.
  • “Review changes” to open the detailed merge review.
  • “Update branch from original” when newer original changes can be brought into the branch safely.
  • “Opslaan en samenvoegen met origineel” wanneer de branch normaal kan worden samengevoegd.
  • An explicit force-merge path for reviewed conflicts.
  • “Branch verwijderen” wanneer de werkbranch moet worden opgegeven.

Understanding the review states

  • Schoon: geen nieuwere incompatibele wijziging verhindert normaal samenvoegen.
  • Update available: the original contains newer non-conflicting work. The plugin can update the branch while keeping branch-only edits.
  • Informational: the original changed identity-related data that the branch is not allowed to overwrite, such as slug or publication identity.
  • Conflict: the original and the branch changed the same mergeable data differently. Normal merge is blocked until you review the situation.
  • Legacy/unknown: an older branch does not have the full 2.1 baseline needed for an exact three-way review. Review it manually before any force merge.
  • Ontbreekt: het origineel kan niet langer veilig worden bepaald, waardoor samenvoegen niet beschikbaar is.

What the merge review contains

The review separates changes into four groups:

  • Branchwijzigingen: samenvoegbare waarden die in de werkbranch zijn gewijzigd.
  • Wijzigingen in het origineel sinds het maken van de branch: nieuwere wijzigingen die rechtstreeks in het origineel zijn aangebracht.
  • Conflicten: paden die aan beide kanten verschillend zijn gewijzigd.
  • Identiteitswijzigingen van het origineel die bij samenvoegen behouden blijven: wijzigingen die de plugin bewust niet overschrijft.

Voor controleerbare velden toont het paneel ook de basis, het huidige origineel en de branchwaarden, zodat je begrijpt waarom een item wordt vermeld.

Wat wordt gesynchroniseerd

A successful merge can synchronize normal editorial content, supported post meta, and taxonomies.

The plugin intentionally preserves the original post’s identity and publication state. In particular, the merge does not replace the original post ID, GUID, slug, author or publication dates. For hierarchical content, the branch cannot change the original parent relationship because that can change a public URL.

Media IDs already referenced by content and featured-image metadata remain usable. Attachments are not re-parented.

Bewerken terwijl iemand het origineel wijzigt

Versie 2.1 gebruikt de basis die bij het maken van de branch is vastgelegd om drie situaties te onderscheiden:

  • Alleen de branch heeft een waarde gewijzigd: de branchwaarde kan worden toegepast.
  • Alleen het origineel heeft een waarde gewijzigd: de nieuwere waarde van het origineel blijft behouden.
  • Beide hebben dezelfde waarde verschillend gewijzigd: de waarde is een conflict en normaal samenvoegen wordt geblokkeerd.

Daarom kan een branch vaak veilig worden samengevoegd, zelfs wanneer het origineel na het maken van de branch is gewijzigd.

Update branch from original

When the original has newer non-conflicting changes, “Update branch from original” rebases the working branch onto the newer original state.

Branch-only work is preserved, original-only work is imported into the branch, and a fresh baseline is recorded. If the operation cannot complete safely, the plugin attempts to restore the branch to its previous state instead of leaving a partial update.

Geforceerd samenvoegen

Geforceerd samenvoegen is bewust niet de standaardroute.

It is offered only after a conflict is detected and reviewed. For listed merge conflicts, force merge prefers the branch value. Non-conflicting newer work on the original is still preserved.

Extensions can further restrict who is allowed to force merge through the plugin’s capability/filter boundary.

Gesynchroniseerde patronen

A WordPress synced pattern is global content. Editing the synced pattern itself changes that pattern everywhere it is used and is not isolated by a post branch.

Wanneer een branch naar gesynchroniseerde patronen verwijst, waarschuwt WP Branches For Post je in het branchpaneel zodat globale patroonwijzigingen niet worden verward met geïsoleerde branchwijzigingen.

Veiligheid en foutafhandeling

  • Branches blijven niet-openbaar en normaal publiceren in WordPress wordt teruggezet naar concept.
  • Mutating operations repeat WordPress capability checks at the service layer.
  • Browseracties en REST-routes gebruiken de juiste nonce- en permissiebeveiliging.
  • Every 2.1 branch stores a full baseline snapshot for three-way review.
  • Normaal samenvoegen weigert onopgeloste conflicten.
  • Merge and rebase operations verify synchronized state, reject stale reviewed data, and attempt rollback after write failures.
  • If a merge cannot finish its branch cleanup, the original is restored instead of reporting a partial success.
  • Geslaagde samenvoegingen en verwijderde branches worden naar de prullenbak verplaatst in plaats van permanent verwijderd.
  • WordPress creates the normal revision history when the original is updated.
  • The plugin does not directly rewrite revisions or attachment parents with SQL.

Blok-editor, Klassieke editor en lijstschermen

The complete review experience is available in the Block Editor document sidebar.

Classic Editor, post-list row actions and the admin bar retain compatibility controls for creating/opening branches and performing supported branch actions. For the clearest conflict review, use the Block Editor panel.

Troubleshooting the branch controls

Als een actie niet beschikbaar is of de plugin een samenvoeging stopt, is dat normaal een veiligheidscontrole en geen verborgen instelling:

  • Create branch is disabled while the original has unsaved Block Editor changes. Save or discard those edits first so the branch baseline matches the saved original.
  • Create branch is available only for supported saved statuses such as published, private and scheduled content, and only when your WordPress capabilities allow the operation.
  • Update branch from original appears only when the original has newer changes that do not conflict with the branch. You do not have to run it before every merge.
  • Save & merge into original is not offered for an unresolved true conflict. Open Review changes and inspect the listed paths first.
  • If the branch or original changes after you reviewed it, the merge is stopped and the review is refreshed. Review the current state before trying again.
  • Force merge is shown only for a state that requires explicit conflict/legacy review and only when your account is allowed to force the merge.
  • Als het origineel ontbreekt of niet langer hetzelfde berichttype gebruikt als de branch, is samenvoegen niet beschikbaar.
  • The Block Editor provides the complete three-way review. Classic Editor and list screens keep compatibility actions, but conflict-heavy work is clearest in the Block Editor.

Compatibiliteit met oudere branches

Branches die met oudere pluginversies zijn gemaakt, blijven herkenbaar.

A 2.0-style branch with a compatible stored baseline hash can still merge normally when the original has not changed. Older branches without a full 2.1 snapshot cannot show the detailed three-way comparison, so the plugin treats them conservatively and requires explicit review when the state is uncertain.

Voor ontwikkelaars

Handige filters en acties zijn onder meer:

  • wbfp_branchable_post_statuses
  • wbfp_create_branch_post_data
  • wbfp_excluded_meta_keys
  • wbfp_mergeable_post_fields
  • wbfp_can_force_merge
  • wbfp_branch_created
  • wbfp_before_merge
  • wbfp_after_merge

Beveiligingskritieke invarianten blijven van kracht nadat extensiefilters zijn uitgevoerd. Een branch blijft een concept van hetzelfde berichttype, beschermde runtimemetadata blijven uitgesloten, samenvoegbare kernvelden blijven binnen de allowlist van de plugin en geforceerd samenvoegen blijft door de autorisatiegrens van de plugin gaan.

Zie ARCHITECTURE.md voor de gegevensstroom, SECURITY.md voor autorisatie- en synchronisatiegrenzen en TESTING.md voor de reproduceerbare volledige validatieomgeving die voor 2.1 is gebruikt.

De broncode van de blok-editor staat in src/index.js en wordt gebouwd met @wordpress/scripts.

Human-readable source code and build tooling are maintained at https://github.com/hsxk/WP-Branches-For-Post/.

Schermafbeeldingen

Installatie

  1. Install WP Branches For Post from the WordPress Plugins screen, or upload it to /wp-content/plugins/wp-branches-for-post.
  2. Activeer de plugin.
  3. Open een bestaand gepubliceerd, privé of gepland bericht of een pagina in de editor.
  4. Open het paneel berichtbranch in de zijbalk met instellingen van de editor.
  5. Kies “Branch maken” om met een veilige werkkopie te beginnen.

Voor de normale workflow is geen aparte instellingenpagina nodig.

FAQ

Is een branch openbaar?

Nee. Een branch is een geïsoleerd werkconcept. Een gewone WordPress-poging om te publiceren wordt teruggezet naar concept. Gebruik de samenvoegactie van de plugin wanneer het werk klaar is.

Verandert samenvoegen de oorspronkelijke URL of het bericht-ID?

No. The existing original post remains the public resource. Its post ID and identity are preserved, and identity-related values such as slug, author and publication dates are not taken from the branch.

Wat gebeurt er als iemand het origineel bewerkt terwijl ik eraan werk?

The plugin compares the original, the branch and the saved baseline. Original-only work can be preserved, non-conflicting work can be rebased, and overlapping divergent edits are reported as conflicts instead of being silently overwritten.

Do I have to update the branch before every merge?

No. If newer original changes do not conflict with the branch, the three-way merge can preserve them. Updating the branch first is useful when you want to continue editing on top of the newest original state.

Wat overschrijft geforceerd samenvoegen?

For conflicts you explicitly review, force merge prefers the branch value. Newer original work that does not conflict with the branch is still preserved.

Kan ik de branch vóór het samenvoegen bekijken als voorbeeld?

Ja. Het branchpaneel biedt een voorbeeldlink voor de branch en een link naar het huidige origineel, zodat je ze buiten de editor kunt vergelijken.

Wat gebeurt er wanneer ik een branch verwijder?

De branch wordt naar de prullenbak verplaatst. Het originele bericht wordt niet gewijzigd.

Wat gebeurt er na een geslaagde samenvoeging?

The original is updated through WordPress, keeping its identity, and the merged branch is moved to Trash.

Worden categorieën, tags en aangepaste taxonomieën meegenomen?

Supported taxonomies are synchronized as part of the branch workflow, including clearing a taxonomy when that is the reviewed branch state.

Worden berichtmetadata meegenomen?

Ondersteunde berichtmetadata worden gesynchroniseerd. Runtime-/pluginregistratiesleutels worden uitgesloten en extensies kunnen eigen uitsluitingen toevoegen.

Hoe zit het met uitgelichte afbeeldingen?

Metadata van de uitgelichte afbeelding maken deel uit van de normale gesynchroniseerde metadata. Het verwezen media-item behoudt zijn bestaande bijlage-identiteit.

Zijn gesynchroniseerde patronen geïsoleerd?

Nee. Gesynchroniseerde patronen zijn globale WordPress-entiteiten. De plugin detecteert verwijzingen en waarschuwt je, maar het bewerken van het gesynchroniseerde patroon zelf beïnvloedt elke plaats waar dat patroon wordt gebruikt.

Does it support custom post types?

Ja, wanneer het berichttype de normale WordPress-bewerkings-API’s gebruikt en de huidige gebruiker de vereiste rechten heeft.

Kan ik branches gebruiken die met oudere pluginversies zijn gemaakt?

Yes. Compatibility paths remain, but older branches may not have the full 2.1 baseline required for detailed three-way review and are therefore handled more conservatively.

Beoordelingen

Er zijn geen beoordelingen voor deze plugin.

Bijdragers & ontwikkelaars

“WP Branches For Post” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

“WP Branches For Post” is vertaald in 10 localen. Dank voor de vertalers voor hun bijdragen.

Vertaal “WP Branches For Post” in je eigen taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

2.1.1

  • Improved merge review with readable Base / Original / Branch values for menu order, comment status, ping status and password state.
  • Added readable taxonomy term names and featured-image identity with thumbnail previews to the three-way review.
  • Kept post passwords masked and arbitrary custom-meta values private in the REST review payload.
  • De kaarten Bestaande branches zijn uitgebreid met branch-ID, maker, wijzigingstijd, status, aantal wijzigingen en aantal conflicten.
  • Er zijn afzonderlijke weergaven voor bestaande branches toegevoegd aan de lijsttabellen van berichten en pagina’s, inclusief relaties van oudere branches.
  • Kept branch-list counts and filtering aligned with WordPress author capabilities so users without edit_others_posts see only their own branches.
  • Privétitels van het origineel worden niet langer blootgesteld in branchlijststatussen wanneer de huidige gebruiker het origineel niet kan lezen.
  • Localized readable Open / Closed review values through WordPress core translations.
  • De integratiedekking op een echte WordPress-installatie is uitgebreid tot 130 controles en de dekking in een echte Gutenberg-browser tot 42 controles, terwijl het semantische UI-/tutorialcontract met 35 gevallen behouden blijft.
  • De releaseboom en ZIP-opbouw zijn strenger opgeschoond zodat verborgen ontwikkelbestanden buiten de distribueerbare plugin blijven.

2.1.0

  • Added a three-way branch/original/baseline review instead of treating every newer original edit as the same kind of conflict.
  • Added detailed branch changes, original changes, exact conflicts and preserved identity changes to the Block Editor merge review.
  • Added safe “Update branch from original” behavior for newer non-conflicting original work.
  • Selectief driewegsamenvoeggedrag is toegevoegd waarbij wijzigingen die alleen in het origineel bestaan behouden blijven en wijzigingen die alleen in de branch bestaan worden toegepast.
  • Added explicit reviewed force-merge handling for true overlapping conflicts.
  • Added rollback and post-write verification for merge and branch-update failures.
  • Added reviewed-state tokens and service-layer freshness checks so a merge is rejected if the branch or original changes after review.
  • Reloaded Gutenberg after Update branch from original so the editor always reflects the rebased server state.
  • Rollback is toegevoegd wanneer een correct geschreven samenvoeging de branch niet naar de prullenbak kan verplaatsen, zodat gedeeltelijke-successituaties worden voorkomen.
  • Aligned Classic Editor and post-list actions with 2.1 review states so safe non-conflicting updates do not require force merge.
  • Added verified baseline-metadata writes and rollback when a branch refresh cannot persist its new baseline.
  • Added stale-state checks before and after branch refresh writes so concurrent original/branch saves require a fresh review.
  • Preserved hierarchical post parents during merge to avoid unexpected public URL changes.
  • Voorbeeldlinks voor branch/origineel en waarschuwingen voor gesynchroniseerde patronen zijn toegevoegd.
  • Er is dekking toegevoegd voor integratietests op een echte WordPress 7.1 installatie en end-to-endtests in een echte Gutenberg browser voor de 2.1 workflow.
  • De WordPress.org-documentatie en schermafbeeldingen zijn uitgebreid om de volledige workflow uit te leggen.

2.0.1

  • De minimaal ondersteunde WordPress-versie is verhoogd naar 6.6 voor de huidige JSX-runtime van de blok-editor.
  • Added missing translator comments and refreshed the shipped block-editor build.
  • De dekking van Plugin Check en PHPCS is uitgebreid en de release-buildstructuur is op elkaar afgestemd.
  • Moved WordPress.org artwork into the standard .wordpress-org directory and added tag-driven SVN deployment.
  • Er is extra dekking toegevoegd voor beveiligingsverificatie op een echte WordPress installatie.
  • Bijzondere dank aan @miyanialkesh7 voor het werk via PR’s #2–#6: beveiligingsverificatie op een echte WordPress-installatie, verbeteringen aan Plugin Check en PHPCS, i18n-correcties en WordPress.org-releasetools.

2.0.0

  • De branchworkflow is opnieuw opgebouwd voor modern WordPress.
  • Integratie met de documentzijbalk van de blok-editor is toegevoegd.
  • Added REST endpoints with capability-based permission callbacks.
  • Conflictdetectie op basis van een momentopname van de basisversie is toegevoegd.
  • Samenvoegen bij publiceren is vervangen door expliciete samenvoegacties.
  • Er is voorkomen dat branchberichten openbaar kunnen worden.
  • De synchronisatie van berichtmetadata is herwerkt zodat sleutels met meerdere waarden en verwijderingen behouden blijven.
  • De synchronisatie van taxonomieën is herwerkt zodat ook leeggemaakte taxonomieën worden doorgegeven.
  • Removed direct SQL revision and attachment-parent manipulation.
  • Het bericht-ID, de URL, status, auteur, slug en publicatiedatums van het origineel blijven behouden tijdens het samenvoegen.
  • Samengevoegde of verwijderde branches worden naar de prullenbak verplaatst in plaats van permanent verwijderd.
  • Compatibiliteit met branches die met versie 1.x zijn gemaakt, is toegevoegd.
  • Moderne ontwikkeltools en CI-controles voor syntax en builds zijn toegevoegd.

1.3.0

  • Ontwikkelaarsfilters en codeopschoning zijn toegevoegd.

1.2.0

  • Vertalingen voor zh_CN, zh_TW en ja zijn toegevoegd.

1.1.0

  • Acties in de beheerbalk/lijsten en eerste ondersteuning voor de blok-editor zijn toegevoegd.

1.0.0

  • Eerste release.