-
-
Save W3SS/b4cd5d97be8a9da23b38d9d010476d70 to your computer and use it in GitHub Desktop.
Post Type labels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Define Post Type labels. | |
* | |
* @return array Post Type labels. | |
*/ | |
protected function labels() { | |
$default = array( | |
'name' => sprintf( __( '%ss', 'odin' ), $this->name ), | |
'singular_name' => sprintf( __( '%s', 'odin' ), $this->name ), | |
'view_item' => sprintf( __( 'View %s', 'odin' ), $this->name ), | |
'edit_item' => sprintf( __( 'Edit %s', 'odin' ), $this->name ), | |
'search_items' => sprintf( __( 'Search %s', 'odin' ), $this->name ), | |
'update_item' => sprintf( __( 'Update %s', 'odin' ), $this->name ), | |
'parent_item_colon' => sprintf( __( 'Parent %s:', 'odin' ), $this->name ), | |
'menu_name' => sprintf( __( '%ss', 'odin' ), $this->name ), | |
'add_new' => __( 'Add New', 'odin' ), | |
'add_new_item' => sprintf( __( 'Add New %s', 'odin' ), $this->name ), | |
'new_item' => sprintf( __( 'New %s', 'odin' ), $this->name ), | |
'all_items' => sprintf( __( 'All %ss', 'odin' ), $this->name ), | |
'not_found' => sprintf( __( 'No %s found', 'odin' ), $this->name ), | |
'not_found_in_trash' => sprintf( __( 'No %s found in Trash', 'odin' ), $this->name ) | |
); | |
return array_merge( $default, $this->labels ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment