<?php
/**
 * Output of the single player post.
 *
 * @package cyberpress/templates
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound

$player             = cyberpress()->get_the_player();
$player_gender      = $player->get_gender();
$player_age         = $player->get_age();
$player_country     = $player->get_country();
$player_site_url    = $player->get_site_url();
$player_youtube_url = $player->get_youtube_channel_url();
$player_twitch_url  = $player->get_twitch_channel_url();
?>

<?php do_action( 'cyberpress_before_single_player' ); ?>

<article id="post-<?php echo esc_attr( $player->get_id() ); ?>" <?php $player->player_classes(); ?>>

    <?php do_action( 'cyberpress_single_player_title' ); ?>

    <div class="entry-content">

        <?php if ( $player_country || $player_age || $player_gender || $player_site_url || $player_twitch_url || $player_youtube_url || $player->check_thumbnail() ) : ?>
            <div class="cyberpress-player">

                <?php do_action( 'cyberpress_single_player_thumbnail' ); ?>

                <?php do_action( 'cyberpress_single_player_info' ); ?>
            </div>
        <?php endif; ?>

        <?php do_action( 'cyberpress_single_player_content' ); ?>

        <?php do_action( 'cyberpress_single_player_games_stats' ); ?>

        <?php do_action( 'cyberpress_single_player_teams' ); ?>

        <?php do_action( 'cyberpress_single_player_twitch' ); ?>

        <?php do_action( 'cyberpress_single_player_social' ); ?>

    </div><!-- .entry-content -->

    <?php edit_post_link( esc_html__( 'Edit', 'cyberpress' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
</article><!-- #post-## -->

<?php do_action( 'cyberpress_after_single_player' ); ?>
