<?php

/**
 * Accordion: Author Info.
 *
 * @link    https://aiopodcasting.com
 * @since   1.0.0
 *
 * @package AiO_Podcast_Studio
 */

// Exit if accessed directly
if ( ! defined( 'WPINC' ) ) {
	die;
}

$author_name = isset( $post_meta['author_name'] ) ? $post_meta['author_name'][0] : '';
?>
<div class="aiopod-form-controls">
	<div class="aiopod-notice aiopod-notice-info">
		<?php esc_html_e( 'Used in your RSS feed only. Overrides the podcast-level author for this individual episode. Leave blank to inherit the podcast author.', 'aio-podcast-studio' ); ?>
	</div>

	<!-- Field: Author Name -->
	<div id="aiopod-form-control-author_name" class="aiopod-form-control">
		<label for="aiopod-field-author_name" class="aiopod-form-label">
			<?php esc_html_e( 'Author Name', 'aio-podcast-studio' ); ?>
		</label>

		<div class="aiopod-form-field">
			<input type="text" name="author_name" id="aiopod-field-author_name" class="widefat" placeholder="<?php esc_attr_e( 'e.g. Jane Smith', 'aio-podcast-studio' ); ?>" value="<?php echo esc_attr( $author_name ); ?>" />
		</div>

		<p class="description">
			<?php esc_html_e( 'The author credited for this episode in Apple Podcasts, Spotify, and other directories. Used to attribute episodes to a different host or guest in multi-host shows.', 'aio-podcast-studio' ); ?>
		</p>
	</div>
</div>
