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'


Top ↑

Return Return

(string)


Top ↑

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 '';
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0 Unknown.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.