Post_Types

Utilities for Posts Table Pro post type discovery.

Tags
author

Barn2 Plugins [email protected]

license

GPL-3.0

copyright

Barn2 Media Ltd

Table of Contents

NO_INDEXABLE_POST_TYPE  = 'ptp_no_indexable_type'
CORE_INTERNAL_POST_TYPES  = ['revision', 'nav_menu_item', 'custom_css', 'customize_changeset', 'oembed_cache', 'user_request', 'wp_block', 'wp_template', 'wp_template_part', 'wp_global_styles', 'wp_navigation', 'wp_font_family', 'wp_font_face']
PLUGIN_EXCLUDED_POST_TYPES  = ['acf-field', 'acf-field-group', '_pods_template']
get_allowed_post_type_slugs()  : array<string|int, string>
Get allowed post type slugs.
get_allowed_post_types()  : array<string, string>
Get post types allowed by Posts Table Pro.
get_automatic_post_type_slugs()  : array<string|int, string>
Get the post types used by completed editor-created tables.
get_dataviews_indexed_post_type_slugs()  : array<string|int, string>
Get the scope passed to DataViews, adapting the empty domain scope.
get_indexed_post_type_slugs()  : array<string|int, string>
Get the canonical domain post-type scope.
is_core_internal_post_type()  : bool
Check whether a slug is an internal WordPress post type.
is_plugin_excluded_post_type()  : bool
Check whether a slug is excluded by Posts Table Pro integrations.
is_allowed_selected_post_type()  : bool
Check whether a stored selection can contribute to the scope.
normalize_indexed_post_type()  : string
Normalize a post type for the canonical indexing scope.

Constants

NO_INDEXABLE_POST_TYPE

public mixed NO_INDEXABLE_POST_TYPE = 'ptp_no_indexable_type'
Tags

CORE_INTERNAL_POST_TYPES

private mixed CORE_INTERNAL_POST_TYPES = ['revision', 'nav_menu_item', 'custom_css', 'customize_changeset', 'oembed_cache', 'user_request', 'wp_block', 'wp_template', 'wp_template_part', 'wp_global_styles', 'wp_navigation', 'wp_font_family', 'wp_font_face']
Tags

PLUGIN_EXCLUDED_POST_TYPES

private mixed PLUGIN_EXCLUDED_POST_TYPES = ['acf-field', 'acf-field-group', '_pods_template']
Tags

Methods

get_allowed_post_type_slugs()

Get allowed post type slugs.

public static get_allowed_post_type_slugs() : array<string|int, string>
Tags
Return values
array<string|int, string> —

get_allowed_post_types()

Get post types allowed by Posts Table Pro.

public static get_allowed_post_types() : array<string, string>
Tags
Return values
array<string, string> —

Post type labels keyed by slug.

get_automatic_post_type_slugs()

Get the post types used by completed editor-created tables.

public static get_automatic_post_type_slugs() : array<string|int, string>
Tags
Return values
array<string|int, string> —

get_dataviews_indexed_post_type_slugs()

Get the scope passed to DataViews, adapting the empty domain scope.

public static get_dataviews_indexed_post_type_slugs() : array<string|int, string>
Tags
Return values
array<string|int, string> —

get_indexed_post_type_slugs()

Get the canonical domain post-type scope.

public static get_indexed_post_type_slugs() : array<string|int, string>
Tags
Return values
array<string|int, string> —

is_core_internal_post_type()

Check whether a slug is an internal WordPress post type.

public static is_core_internal_post_type(string $post_type) : bool
Parameters
$post_type : string

Post type slug.

Tags
Return values
bool —

is_plugin_excluded_post_type()

Check whether a slug is excluded by Posts Table Pro integrations.

public static is_plugin_excluded_post_type(string $post_type) : bool
Parameters
$post_type : string

Post type slug.

Tags
Return values
bool —

is_allowed_selected_post_type()

Check whether a stored selection can contribute to the scope.

private static is_allowed_selected_post_type(string $post_type) : bool
Parameters
$post_type : string

Post type slug.

Tags
Return values
bool —

normalize_indexed_post_type()

Normalize a post type for the canonical indexing scope.

private static normalize_indexed_post_type(mixed $post_type, array<string, bool> $automatic_post_type_map) : string
Parameters
$post_type : mixed

Post type slug.

$automatic_post_type_map : array<string, bool>

Automatically included post types.

Tags
Return values
string —

Search results