Astra_Posts_Structures_Configs::astra_get_dynamic_section_title( object|null $post_type_obj, string $label )

Function to get formatted dynamic cpt section title.


Description


Parameters

$post_type_obj

(object|null) (Required) WP_Post_Type object.

$label

(string) (Required) fallback label.


Return

(string) formatted label.


Source

File: inc/modules/posts-structures/customizer/class-astra-posts-structures-configs.php

	public static function astra_get_dynamic_section_title( $post_type_obj, $label ) {
		return is_object( $post_type_obj ) && isset( $post_type_obj->labels->name ) ? $post_type_obj->labels->name : ucfirst( $label );
	}

Changelog

Changelog
Version Description
4.0.2 Introduced.


User Contributed Notes

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