editable_slug

editable_slug

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('editable_slug') is found 7 times:

  • /wp-admin/edit-tag-form.php line 170
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
                 * @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 WP_Term|WP_Post $tag  Term or post object.
                 */
                $slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : '';
                ?>
                <td><input name="slug" id="slug" type="text" value="<?php echo esc_attr( $slug ); ?>" size="40" aria-describedby="slug-description" />
                <p class="description" id="slug-description"><?php echo $tax->labels->slug_field_description; ?></p></td>
            </tr>
    <?php if ( is_taxonomy_hierarchical( $taxonomy ) ) : ?>
            <tr class="form-field term-parent-wrap">
  • /wp-admin/includes/class-wp-terms-list-table.php line 437
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
            $output .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">';
            $output .= '<div class="name">' . $qe_data->name . '</div>';
     
            /** This filter is documented in wp-admin/edit-tag-form.php */
            $output .= '<div class="slug">' . apply_filters( 'editable_slug', $qe_data->slug, $qe_data ) . '</div>';
            $output .= '<div class="parent">' . $qe_data->parent . '</div></div>';
        }
     
        return $output;
    }
  • /wp-admin/includes/class-wp-terms-list-table.php line 590
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    * @return string
     */
    public function column_slug( $tag ) {
        /** This filter is documented in wp-admin/edit-tag-form.php */
        return apply_filters( 'editable_slug', $tag->slug, $tag );
    }
     
    /**
     * @param WP_Term $tag Term object.
     * @return string
     */
  • /wp-admin/includes/meta-boxes.php line 938
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    * @param WP_Post $post Current post object.
     */
    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 );
        ?>
    <label class="screen-reader-text" for="post_name">
        <?php
        /* translators: Hidden accessibility text. */
        _e( 'Slug' );
        ?>
  • /wp-admin/includes/post.php line 1498
    1494
    1495
    1496
    1497
    1498
    1499
    1500
    1501
    1502
    1503
            $uri = untrailingslashit( $uri );
        }
     
        /** This filter is documented in wp-admin/edit-tag-form.php */
        $uri = apply_filters( 'editable_slug', $uri, $post );
        if ( ! empty( $uri ) ) {
            $uri .= '/';
        }
        $permalink = str_replace( '%pagename%', "{$uri}%pagename%", $permalink );
    }
  • /wp-admin/includes/post.php line 1506
    1502
    1503
    1504
    1505
    1506
    1507
    1508
    1509
    1510
    1511
    1512
        $permalink = str_replace( '%pagename%', "{$uri}%pagename%", $permalink );
    }
     
    /** This filter is documented in wp-admin/edit-tag-form.php */
    $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;
    $post->filter      = $original_filter;
     
    /**
  • /wp-admin/includes/template.php line 323
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
        echo '
    <div class="hidden" id="inline_' . $post->ID . '">
        <div class="post_title">' . $title . '</div>' .
        /** This filter is documented in wp-admin/edit-tag-form.php */
        '<div class="post_name">' . apply_filters( 'editable_slug', $post->post_name, $post ) . '</div>
        <div class="post_author">' . $post->post_author . '</div>
        <div class="comment_status">' . esc_html( $post->comment_status ) . '</div>
        <div class="ping_status">' . esc_html( $post->ping_status ) . '</div>
        <div class="_status">' . esc_html( $post->post_status ) . '</div>
        <div class="jj">' . mysql2date( 'd', $post->post_date, false ) . '</div>
        <div class="mm">' . mysql2date( 'm', $post->post_date, false ) . '</div>