HEX
Server: Apache/2.4.65 (Debian)
System: Linux 88f31f35b0b8 6.1.0-38-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.147-1 (2025-08-02) x86_64
User: www-data (33)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/wordpress-seo-premium/classes/premium-orphaned-content-support.php
<?php
/**
 * WPSEO Premium plugin file.
 *
 * @package WPSEO\Premium
 */

/**
 * Represents the functionality for the orphaned content support.
 */
class WPSEO_Premium_Orphaned_Content_Support {

	/**
	 * Returns an array with the supported post types.
	 *
	 * @return array The supported post types.
	 */
	public function get_supported_post_types() {
		/**
		 * Filter: 'Yoast\WP\SEO\orphaned_post_types' - Allows changes for the accessible post types.
		 *
		 * Note: This is a Premium plugin-only hook.
		 *
		 * @since 12.9.0
		 *
		 * @param array $post_types The accessible post types.
		 */
		$orphaned_post_types = apply_filters( 'Yoast\WP\SEO\orphaned_post_types', WPSEO_Post_Type::get_accessible_post_types() );

		if ( ! is_array( $orphaned_post_types ) || empty( $orphaned_post_types ) ) {
			$orphaned_post_types = [];
		}

		return $orphaned_post_types;
	}

	/**
	 * Checks if the post type is supported.
	 *
	 * @param string $post_type The post type to look up.
	 *
	 * @return bool True when post type is supported.
	 */
	public function is_post_type_supported( $post_type ) {
		return in_array( $post_type, $this->get_supported_post_types(), true );
	}
}