Make WordPress Core


Ignore:
Timestamp:
09/19/2015 05:48:30 AM (9 years ago)
Author:
wonderboymusic
Message:

When applying the 'editable_slug' filter, add a second param that provides more context.

Props MikeSchinkel, jesin.
Fixes #31568.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r34170 r34319  
    695695function post_slug_meta_box($post) {
    696696/** This filter is documented in wp-admin/edit-tag-form.php */
    697 ?>
    698 <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( apply_filters( 'editable_slug', $post->post_name ) ); ?>" />
     697$editable_slug = apply_filters( 'editable_slug', $post->post_name, $post );
     698?>
     699<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 ); ?>" />
    699700<?php
    700701}
Note: See TracChangeset for help on using the changeset viewer.