显示slug表单字段。

原型

post_slug_meta_box( object $post )

参数

$post (object) (Required)

源文件

路径:wp-admin/includes/meta-boxes.php

<?php
...
function post_slug_meta_box($post) {
/** This filter is documented in wp-admin/edit-tag-form.php */
$editable_slug = apply_filters( 'editable_slug', $post->post_name, $post );
?>
<label class="screen-reader-text" for="post_name"><?php _e('Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo esc_attr( $editable_slug ); ?>" />
<?php
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/post_slug_meta_box/