LLMS_Post_Model::get_post_type_label( string $label = 'singular_name' )
Retrieve a label from the post type data object’s labels object
Parameters Parameters
- $label
-
(string) (Optional) Key for the label.
Default value: 'singular_name'
Return Return
(string)
Source Source
File: includes/abstracts/abstract.llms.post.model.php
public function get_post_type_label( $label = 'singular_name' ) { $obj = $this->get_post_type_data(); if ( property_exists( $obj, 'labels' ) && property_exists( $obj->labels, $label ) ) { return $obj->labels->$label; } return ''; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.8.0 | Unknown. |
3.0.0 | Introduced. |