[wp-trac] [WordPress Trac] #11863: Trashed items interfere with page/post slug generation
WordPress Trac
noreply at wordpress.org
Mon Feb 8 15:55:43 UTC 2016
#11863: Trashed items interfere with page/post slug generation
-------------------------------------------------+-------------------------
Reporter: Denis-de-Bernardy | Owner: ericlewis
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.5
Component: Posts, Post Types | Version: 2.9
Severity: normal | Resolution:
Keywords: make-flow has-patch has-unit-tests | Focuses:
needs-testing |
-------------------------------------------------+-------------------------
Comment (by boonebgorges):
Awesome. Glad to see this moving forward. The flow feels good to me.
A couple thoughts about the patch:
* I think there's a general move away from introducing more underscore-
prefixed functions. I think it's fine to prefix them `wp_` but maybe
mention in the description that it's "used internally" or something like
that.
* Related: I think we use `@ignore` rather than `@access private` to make
the parser ignore functions. @DrewAPicture can verify.
* Running `wp_update_post()` causes update actions to be fired.
`'_modify_post_name_on_transition_post_status()` runs during
`'transition_post_status'`, which generally only happens during an update;
so in this case, the actions will be fired twice.
`_modify_post_name_on_transition_post_status()` runs during
`get_sample_permalink()`, when you wouldn't generally expect your post
content to be modified. In both cases, we are technically "updating" a
post, but it doesn't seem semantically right somehow. Are there cases
where a plugin author might be thrown off as a result of this? Is the
alternative (direct database update + manual cache invalidation) liable to
be just as confusing?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/11863#comment:105>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list