reset_default_labels example


function create_initial_taxonomies() {
    global $wp_rewrite;

    WP_Taxonomy::reset_default_labels();

    if ( ! did_action( 'init' ) ) {
        $rewrite = array(
            'category'    => false,
            'post_tag'    => false,
            'post_format' => false,
        );
    } else {

        /** * Filters the post formats rewrite base. * * @since 3.1.0 * * @param string $context Context of the rewrite base. Default 'type'. */
// Post Type registration. //
/** * Creates the initial post types when 'init' action is fired. * * See {@see 'init'}. * * @since 2.9.0 */
function create_initial_post_types() {
    WP_Post_Type::reset_default_labels();

    register_post_type(
        'post',
        array(
            'labels'                => array(
                'name_admin_bar' => _x( 'Post', 'add new from admin bar' ),
            ),
            'public'                => true,
            '_builtin'              => true, /* internal use only. don't use this when registering your own post type. */
            '_edit_link'            => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */
            'capability_type'       => 'post',
            
Home | Imprint | This part of the site doesn't use cookies.