get_all_post_type_supports() WordPress Function

The get_all_post_type_supports() function is a built-in function in WordPress that allows you to get an array of all the features that are supported by a given post type.

get_all_post_type_supports( string $post_type ) #

Get all the post type features


Parameters

$post_type

(string)(Required)The post type.


Top ↑

Return

(array) Post type supports list.


Top ↑

Source

File: wp-includes/post.php

function get_all_post_type_supports( $post_type ) {
	global $_wp_post_type_features;

	if ( isset( $_wp_post_type_features[ $post_type ] ) ) {
		return $_wp_post_type_features[ $post_type ];
	}

	return array();
}


Top ↑

Changelog

Changelog
VersionDescription
3.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More