[wp-trac] [WordPress Trac] #21112: Add pre_wp_unique_post_slug to override post slug handling

WordPress Trac noreply at wordpress.org
Mon Oct 8 09:15:00 UTC 2018


#21112: Add pre_wp_unique_post_slug to override post slug handling
-------------------------+--------------------------
 Reporter:  coffee2code  |       Owner:  johnbillion
     Type:  enhancement  |      Status:  reviewing
 Priority:  normal       |   Milestone:  5.0
Component:  Permalinks   |     Version:  3.4
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+--------------------------

Comment (by swissspidy):

 Some notes on the patch and inline docs:

 * Third-person singular verbs should be used for the summary, describing
 what is being filtered.
   This should be more like "Filters the unique post slug..." than "Filter
 to allow setting the unique post slug..."
   See the example at https://make.wordpress.org/core/handbook/best-
 practices/inline-documentation-standards/php/#language.
 * Version should be using three digits, see
 https://make.wordpress.org/core/handbook/best-practices/inline-
 documentation-standards/php/#1-functions-class-methods.
   No need to change it right now because it can be adjusted before
 committing.
 * Missing period after `Post parent ID`
 * We usually use `null` for `pre_` filters like in this case and then
 explicitly check whether the variable is `null` or something else.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/21112#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list