Make WordPress Core


Ignore:
Timestamp:
09/19/2015 05:48:30 AM (11 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/post.php

    r34309 r34319  
    12441244
    12451245                /** This filter is documented in wp-admin/edit-tag-form.php */
    1246                 $uri = apply_filters( 'editable_slug', $uri );
     1246                $uri = apply_filters( 'editable_slug', $uri, $post );
    12471247                if ( !empty($uri) )
    12481248                        $uri .= '/';
     
    12511251
    12521252        /** This filter is documented in wp-admin/edit-tag-form.php */
    1253         $permalink = array( $permalink, apply_filters( 'editable_slug', $post->post_name ) );
     1253        $permalink = array( $permalink, apply_filters( 'editable_slug', $post->post_name, $post ) );
    12541254        $post->post_status = $original_status;
    12551255        $post->post_date = $original_date;
Note: See TracChangeset for help on using the changeset viewer.