Skip to content

Conversation

@pkevan
Copy link

@pkevan pkevan commented Oct 3, 2025

What?

By default we are only allowing post and page post types to be used for Collaborative editing - this doesn't account for people who use custom post types for their primary source of site data, and it's likely that it isn't just post

This allows users to change this easily.

How?

Adds callable filter.

@github-actions
Copy link

github-actions bot commented Oct 3, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: pkevan <[email protected]>
Co-authored-by: ingeniumed <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

* @param array $post_types Array of post type names.
* @return array Filtered array of post type names.
*/
$post_types = apply_filters( 'collaborative_editing_post_types', array( 'page', 'post' ) );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, we have instructions for this in the RTC plugin's README to do the following to bake in this support for other post types:

add_post_type_support( $post_type, 'collaborative-editing' )

That ties into how we have been relying on what the post supports to drive the collaboration related pieces.

Personally, I like that more and would instead push to update whatever docs we can to add the above instruction in. It'd be better to have it Gutenberg rather than in our RTC plugin.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I didn't intent this when suggesting it, it could also be used to remove support for either post or page but I can see the route here.

Perhaps we can remove this completely, but unsure how it would then default to work on a standard install, as you wouldn't want to force code to be written to use a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants