Gutenberg: Remove permalink_template and generated_slug attributes from rest_prepare_{$post_type} hook. - Moved it to core.

Created on 8 Oct 2018  路  6Comments  路  Source: WordPress/gutenberg

We have moved permalink_template and generated_slug attributes to Posts controller in Core.
ref: https://core.trac.wordpress.org/ticket/45017 ( ready to commit and test )

Once this is merge to core we won't be needing this filter.
https://github.com/WordPress/gutenberg/blob/3e53873323fbb369016d9de785f8ef2c169c7f30/lib/rest-api.php#L287
https://github.com/WordPress/gutenberg/blob/3e53873323fbb369016d9de785f8ef2c169c7f30/lib/rest-api.php#L191-L217

Core REST API Task REST API Interaction [Type] Task

Most helpful comment

Before WordPress 5.0 ships, lib/rest-api.php will be removed entirely, so this issue will be taken care of with that.

However, once the patch in https://core.trac.wordpress.org/ticket/45017 lands, I'd like to update the filter in lib/rest-api.php to only fire on older versions of WordPress, such that Gutenberg uses the code in core for WordPress nightly builds and trunk.

All 6 comments

We can remove this filter, if Gutenberg requires WordPress >= 5.0. Maybe we should add a milestone?

We can remove this filters if Gutenberg requires WordPress >= 5.0. Maybe we should add a milestone?

sure, it just the core ticket is tagged to 5.0 Milestone.

Before WordPress 5.0 ships, lib/rest-api.php will be removed entirely, so this issue will be taken care of with that.

However, once the patch in https://core.trac.wordpress.org/ticket/45017 lands, I'd like to update the filter in lib/rest-api.php to only fire on older versions of WordPress, such that Gutenberg uses the code in core for WordPress nightly builds and trunk.

Raise this PR #10408 to test the code in the core for WordPress nightly builds and trunk.

test the code in the core for WordPress nightly builds and trunk.

Holding off on this for a few weeks: https://github.com/WordPress/gutenberg/pull/10408#issuecomment-427887896

Closing in favor of #10656

Was this page helpful?
0 / 5 - 0 ratings