On this page
post_slug_meta_box( WP_Post $post )
Displays slug form fields.
Parameters
$postWP_Post Required-
Current post object.
Source
File: wp-admin/includes/meta-boxes.php. View all references
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
}
Hooks
- apply_filters( 'editable_slug',
string $slug ,WP_Term|WP_Post $tag ) -
Filters the editable slug for a post or term.
Related
Uses
| Uses | Description |
|---|---|
| _e() wp-includes/l10n.php | Displays translated text. |
| esc_attr() wp-includes/formatting.php | Escaping for HTML attributes. |
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Changelog
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/post_slug_meta_box