Changeset 34319
- Timestamp:
- 09/19/2015 05:48:30 AM (9 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-tag-form.php
r34202 r34319 122 122 * 123 123 * @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 ) : ''; 129 131 ?> 130 132 <td><input name="slug" id="slug" type="text" value="<?php echo esc_attr( $slug ); ?>" size="40" /> -
trunk/src/wp-admin/includes/class-wp-terms-list-table.php
r34265 r34319 374 374 375 375 /** This filter is documented in wp-admin/edit-tag-form.php */ 376 $out .= '<div class="slug">' . apply_filters( 'editable_slug', $qe_data->slug ) . '</div>';376 $out .= '<div class="slug">' . apply_filters( 'editable_slug', $qe_data->slug, $qe_data ) . '</div>'; 377 377 $out .= '<div class="parent">' . $qe_data->parent . '</div></div>'; 378 378 … … 472 472 public function column_slug( $tag ) { 473 473 /** This filter is documented in wp-admin/edit-tag-form.php */ 474 return apply_filters( 'editable_slug', $tag->slug );474 return apply_filters( 'editable_slug', $tag->slug, $tag ); 475 475 } 476 476 -
trunk/src/wp-admin/includes/meta-boxes.php
r34170 r34319 695 695 function post_slug_meta_box($post) { 696 696 /** 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 ); ?>" /> 699 700 <?php 700 701 } -
trunk/src/wp-admin/includes/post.php
r34309 r34319 1244 1244 1245 1245 /** 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 ); 1247 1247 if ( !empty($uri) ) 1248 1248 $uri .= '/'; … … 1251 1251 1252 1252 /** 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 ) ); 1254 1254 $post->post_status = $original_status; 1255 1255 $post->post_date = $original_date; -
trunk/src/wp-admin/includes/template-functions.php
r34241 r34319 274 274 echo ' 275 275 <div class="hidden" id="inline_' . $post->ID . '"> 276 <div class="post_title">' . $title . '</div> 277 <div class="post_name">' . apply_filters( 'editable_slug', $post->post_name ) . '</div> 276 <div class="post_title">' . $title . '</div>' . 277 /** This filter is documented in wp-admin/edit-tag-form.php */ 278 '<div class="post_name">' . apply_filters( 'editable_slug', $post->post_name, $post ) . '</div> 278 279 <div class="post_author">' . $post->post_author . '</div> 279 280 <div class="comment_status">' . esc_html( $post->comment_status ) . '</div>
Note: See TracChangeset
for help on using the changeset viewer.