None. Escaping should happen late, on output. This is just registering the strings for later use, so it’s too early to escape. All the places in WordPress where the post type label is used automatically, WordPress should already be escaping it.
If you’re outputting any of the labels yourself, you would probably use esc_html()
:
$post_type_object = get_post_type_object( 'book' );
$post_type_labels = get_post_type_labels( $post_type_object );
echo esc_html( $post_type_labels->singular_name );
Related Posts:
- Change the text on the Publish button
- Theme localization of “slugs” (custom post types, taxonomies)
- Best way to filter featured image text for a custom post type?
- Internationalize / translate custom post types & taxonomies
- Fetch ID’s associated with a custom post type when translated with WPML?
- Fixed values for same post translations
- Display 1 Post per taxonomy with polylang
- Translate website without duplicate custom post
- Custom post type translation
- How to internationalize the sub menu name “categories” in Custom post type?
- Change the text on the Publish button
- Dealing with variables with gettext function
- Custom post type slug localization
- How To Display A List Of CPT Posts In A Meta Box On Menus Page?
- Control content before and after custom post type loop
- Custom Post Types Archives and Single Pages not showing custom taxonomy data
- Custom post doesn’t show featured image
- Showing custom post type categories in the menu
- Displaying custom post types by category
- How to setup a single post page for my custom post type?
- Disable custom taxonomy on admin bar
- Conflict between Capabilities and Menu Visibility with Custom Post Types
- Custom Post not working as expected
- How to use a variable as a function name?
- What do the numbers mean at the end of add_action(‘save_post’)…?
- How to use next_posts_link/previous_posts_link for custom post types paginate?
- Getting WordPress Flexslider Item Number
- Designing a custom post type with a minimum number of meta fields
- Why does my taxonomy have a category style div id?
- Sorting posts by custom field value in array
- Custom post type paging 404 error
- Targeting categories in custom fields
- Display Only Certain Category In a Custom Page Template
- Saving Meta Data within Custom Post Type
- A meta box (in a custom post type) with two different type of fields
- Redirect to first child on Custom Post Type (without template)
- Assign CPT archive page attributes
- Move content between custom post types
- Custom post types problem
- How to get postname in custom page?
- Query custom post type based on post id and custom field value
- Pods CMS: How to add custom column to Adnvanced Content Type
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- Creating Sections for Post Types
- Give each post type label a different color?
- page not found for single-type.php file
- Show list of custom posts with respective attachments?
- How to output an image or icon for selected check box in a custom post
- Check IF single OR multiple custom data has been entered
- Set a hard-coded page-template (post-type-archive) as home/front-page of my wordpress blog?
- How To Get Custom Post Type Category Title
- populate array with posts
- Displaying tags associated with posts in Custom Post Type
- Display custom posts randomly in custom taxonomy archive
- Using custom post type as taxonomy
- Transferring data to the end of a transaction with the Shopp Plugin
- Listing custom post types on archive page with array
- get_pagination not working on a custom post type query (using WP_Query)
- Show Posts to Author Only
- How to Make infinite loop of post
- Get custom post type categories to show up in menus
- WP_Query parameter conflict
- Create a comments template for custom post types
- Is it possible to add posts and images (auto resize) for custom post types with a script?
- wysiwyg editor don´t export paragraph
- Add custom attributes to a post
- Custom Type add Transitions
- How to make a meta box?
- Retrieving meta-box from a custom-post-type
- Cannot save Custom Post Type meta data
- Custom taxonomy page returns 404
- Custom post type permalink sends to 404.php
- Running a wordpress action when a custom post type term (taxonomy category) is changed
- Custom post types with categories in template
- portfolio custom type tags support
- Custom Post Type conflicting with page?
- How to check if post/page or taxonomy post is published by admin
- How can I create an automatic drop down menu with my tags?
- Custom database table question
- previous_post_link in same taxonomy in custom post type
- Getting all ID’s matching a title in a custom post type
- show current item in custom menu, when inside a custom post type
- How do I get the custom category URL from the custom post type?
- Associate all Custom Post Types with Taxonomy
- current-menu-item not added on page showing custom post type (rendered with archive template)
- How to define a term for custom taxonomy
- Saving fields in a drop-down in WordPress
- How to move a post to different post type with all meta data?
- Custom taxonomy or custom page templates?
- Make (custom) post type accessible only by custom query
- Assign post type to many users
- Custom taxonomies to define versions of a product
- WP_Query with custom post type ID
- why is the current page title being output?
- Adding guestbook to my wordpress site
- Meta box values not displaying in Post Edit Screen after save
- Exclude posts with custom taxonomy
- Forms and WordPress Nonce
- Invalid Taxonomy
- List custom taxonomy as navigation – taxonomy pages with all it’s posts?