at path:
ROOT
/
wp-content
/
plugins
/
wordpress-seo
/
inc
/
class-post-type.php
run:
R
W
Run
exceptions
DIR
2026-04-15 05:43:04
R
W
Run
options
DIR
2026-04-15 05:43:04
R
W
Run
sitemaps
DIR
2026-04-15 05:43:04
R
W
Run
class-addon-manager.php
26.54 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-my-yoast-api-request.php
5.39 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-post-type.php
3.89 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-rewrite.php
7.58 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-upgrade-history.php
3.04 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-upgrade.php
55.3 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-admin-bar-menu.php
28.16 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-content-images.php
2.59 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-custom-fields.php
1.73 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-custom-taxonomies.php
1.59 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-image-utils.php
15.03 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-installation.php
1.17 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-meta.php
34.17 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-primary-term.php
1.7 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-rank.php
7.38 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-replace-vars.php
51.46 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-replacement-variable.php
1.34 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-shortlinker.php
1.11 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-statistics.php
1.41 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-wpseo-utils.php
28.45 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
class-yoast-dynamic-rewrites.php
5.24 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
date-helper.php
1.71 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
index.php
38 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
interface-wpseo-wordpress-ajax-integration.php
294 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
interface-wpseo-wordpress-integration.php
348 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
language-utils.php
1.28 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
wpseo-functions-deprecated.php
68 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
wpseo-functions.php
9 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
wpseo-non-ajax-functions.php
1.56 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
error_log
up
📄
class-post-type.php
Save
<?php /** * WPSEO plugin file. * * @package WPSEO\Inc */ /** * Represents the post type utils. */ class WPSEO_Post_Type { /** * Returns an array with the accessible post types. * * An accessible post type is a post type that is public and isn't set as no-index (robots). * * @return array Array with all the accessible post_types. */ public static function get_accessible_post_types() { return YoastSEO()->helpers->post_type->get_accessible_post_types(); } /** * Returns whether the passed post type is considered accessible. * * @param string $post_type The post type to check. * * @return bool Whether or not the post type is considered accessible. */ public static function is_post_type_accessible( $post_type ) { return in_array( $post_type, self::get_accessible_post_types(), true ); } /** * Checks if the request post type is public and indexable. * * @param string $post_type_name The name of the post type to lookup. * * @return bool True when post type is set to index. */ public static function is_post_type_indexable( $post_type_name ) { return YoastSEO()->helpers->post_type->is_indexable( $post_type_name ); } /** * Filters the attachment post type from an array with post_types. * * @param array $post_types The array to filter the attachment post type from. * * @return array The filtered array. */ public static function filter_attachment_post_type( array $post_types ) { if ( WPSEO_Options::get( 'disable-attachment' ) === true ) { unset( $post_types['attachment'] ); } return $post_types; } /** * Checks if the post type is enabled in the REST API. * * @param string $post_type The post type to check. * * @return bool Whether or not the post type is available in the REST API. */ public static function is_rest_enabled( $post_type ) { $post_type_object = get_post_type_object( $post_type ); if ( $post_type_object === null ) { return false; } return $post_type_object->show_in_rest === true; } /** * Checks if the current post type has an archive. * * Context: The has_archive value can be a string or a boolean. In most case it will be a boolean, * but it can be defined as a string. When it is a string the archive_slug will be overwritten to * define another endpoint. * * @param WP_Post_Type $post_type The post type object. * * @return bool True whether the post type has an archive. */ public static function has_archive( $post_type ) { return YoastSEO()->helpers->post_type->has_archive( $post_type ); } /** * Checks if the Yoast Metabox has been enabled for the post type. * * @param string $post_type The post type name. * * @return bool True whether the metabox is enabled. */ public static function has_metabox_enabled( $post_type ) { return WPSEO_Options::get( 'display-metabox-pt-' . $post_type, false ); } /* ********************* DEPRECATED METHODS ********************* */ /** * Removes the notification related to the post types which have been made public. * * @deprecated 20.10 * @codeCoverageIgnore * * @return void */ public static function remove_post_types_made_public_notification() { _deprecated_function( __METHOD__, 'Yoast SEO 20.10', 'Content_Type_Visibility_Dismiss_Notifications::dismiss_notifications' ); $notification_center = Yoast_Notification_Center::get(); $notification_center->remove_notification_by_id( 'post-types-made-public' ); } /** * Removes the notification related to the taxonomies which have been made public. * * @deprecated 20.10 * @codeCoverageIgnore * * @return void */ public static function remove_taxonomies_made_public_notification() { _deprecated_function( __METHOD__, 'Yoast SEO 20.10', 'Content_Type_Visibility_Dismiss_Notifications::dismiss_notifications' ); $notification_center = Yoast_Notification_Center::get(); $notification_center->remove_notification_by_id( 'taxonomies-made-public' ); } }