Skip to content

Instantly share code, notes, and snippets.

@castroalves
Created May 8, 2014 21:31
Show Gist options
  • Save castroalves/6f1f9b043cf1a48080d9 to your computer and use it in GitHub Desktop.
Save castroalves/6f1f9b043cf1a48080d9 to your computer and use it in GitHub Desktop.
Post Type labels
/**
* 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