diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index 5c661e0b44..8b5c61b164 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -121,11 +121,13 @@ do_action( "{$taxonomy}_term_edit_form_tag" ); * post URIs and term slugs. * * @since 2.6.0 + * @since 4.4.0 The `$tag` parameter was added. * - * @param string $slug The editable slug. Will be either a term slug or post URI depending - * upon the context in which it is evaluated. + * @param string $slug The editable slug. Will be either a term slug or post URI depending + * upon the context in which it is evaluated. + * @param object|WP_Post $tag Term or WP_Post object. */ - $slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug ) : ''; + $slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : ''; ?>

diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php index 11bdb7a40e..a64728c620 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -373,7 +373,7 @@ class WP_Terms_List_Table extends WP_List_Table { $out .= '
' . $qe_data->name . '
'; /** This filter is documented in wp-admin/edit-tag-form.php */ - $out .= '
' . apply_filters( 'editable_slug', $qe_data->slug ) . '
'; + $out .= '
' . apply_filters( 'editable_slug', $qe_data->slug, $qe_data ) . '
'; $out .= '
' . $qe_data->parent . '
'; return $out; @@ -471,7 +471,7 @@ class WP_Terms_List_Table extends WP_List_Table { */ public function column_slug( $tag ) { /** This filter is documented in wp-admin/edit-tag-form.php */ - return apply_filters( 'editable_slug', $tag->slug ); + return apply_filters( 'editable_slug', $tag->slug, $tag ); } /** diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index cc4d0b2e1e..d26249d386 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -694,8 +694,9 @@ function post_comment_meta_box( $post ) { */ 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 ); ?> - + post_name ) ); + $permalink = array( $permalink, apply_filters( 'editable_slug', $post->post_name, $post ) ); $post->post_status = $original_status; $post->post_date = $original_date; $post->post_name = $original_name; diff --git a/wp-admin/includes/template-functions.php b/wp-admin/includes/template-functions.php index ca796ab9ff..82614ebe76 100644 --- a/wp-admin/includes/template-functions.php +++ b/wp-admin/includes/template-functions.php @@ -273,8 +273,9 @@ function get_inline_data($post) { /** This filter is documented in wp-admin/edit-tag-form.php */ echo '