` so it survives the AMP validator. * * @since 7.0.0 Refactored to BeyondWords namespace with snake_case methods. */ class Amp extends Base { /** * Whether the AMP renderer applies to this request. * * @param \WP_Post $post Post object. */ public static function check( \WP_Post $post ): bool { if ( ! \BeyondWords\Core\Utils::is_amp() ) { return false; } return parent::check( $post ); } /** * Render the AMP player HTML. * * @param \WP_Post $post Post object. * @param string $context Rendering context: 'auto' or 'shortcode'. */ public static function render( \WP_Post $post, string $context = 'shortcode' ): string { $project_id = \BeyondWords\Post\Meta::get_project_id( $post->ID ); $content_id = \BeyondWords\Post\Meta::get_content_id( $post->ID, true ); $src = sprintf( \BeyondWords\Core\Urls::get_amp_player_url(), $project_id, $content_id ); ob_start(); ?>