Make WordPress Core


Ignore:
Timestamp:
09/19/2015 05:48:30 AM (10 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/edit-tag-form.php

    r34202 r34319  
    122122             *
    123123             * @since 2.6.0
    124              *
    125              * @param string $slug The editable slug. Will be either a term slug or post URI depending
    126              *                     upon the context in which it is evaluated.
    127              */
    128             $slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug ) : '';
     124             * @since 4.4.0 The `$tag` parameter was added.
     125             *
     126             * @param string         $slug The editable slug. Will be either a term slug or post URI depending
     127             *                             upon the context in which it is evaluated.
     128             * @param object|WP_Post $tag  Term or WP_Post object.
     129             */
     130            $slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : '';
    129131            ?>
    130132            <td><input name="slug" id="slug" type="text" value="<?php echo esc_attr( $slug ); ?>" size="40" />
Note: See TracChangeset for help on using the changeset viewer.