pre_wp_unique_post_slug
apply_filters( ‘pre_wp_unique_post_slug’, string|null $…
apply_filters( ‘pre_wp_unique_post_slug’, string|null $override_slug, string $slug, int $post_ID, string $post_status, string $post_type, int $post_parent )
过滤钩:过滤后段塞,然后生成唯一的。
Filter Hook: Filters the post slug before it is generated to be unique.
过滤钩:过滤后段塞,然后生成唯一的。
Filter Hook: Filters the post slug before it is generated to be unique.
目录锚点:#说明#参数#源码
说明(Description)
返回非空值将使唯一的slug生成短路,而是返回传递的值。
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $override_slug | (string | null) | 短路返回值。 |
| $slug | (string) | 所需的slug(post_name)。 |
| $post_ID | (int) | 邮政编码。 |
| $post_status | (string) | 岗位状态。 |
| $post_type | (string) | 岗位类型。 |
| $post_parent | (int) | 发布父ID。 |
源码(Source)
| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 5.1.0 | wp-includes/post.php:4352 | 1 | 0 |
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。





还没有任何评论,赶紧来占个楼吧!