<?php
/**
 * Added dulcie Page.
*/

/**
 * Add a new page under Appearance
 */
function dulcie_menu() {
	add_theme_page( __( 'Dulcie Options', 'dulcie' ), __( 'Dulcie Options', 'dulcie' ), 'edit_theme_options', 'dulcie-theme', 'dulcie_page' );
}
add_action( 'admin_menu', 'dulcie_menu' );

/**
 * Enqueue styles for the help page.
 */
function dulcie_admin_scripts( $hook ) {
	if ( 'appearance_page_dulcie-theme' !== $hook ) {
		return;
	}
	wp_enqueue_style( 'dulcie-admin-style', get_template_directory_uri() . '/templatesell/about/about.css', array(), DULCIE_VERSION );
}
add_action( 'admin_enqueue_scripts', 'dulcie_admin_scripts' );

/**
 * Add the theme page
 */
function dulcie_page() {
	?>
	<div class="das-wrap">
		<div class="dulcie-panel">
			<div class="dulcie-logo">
				<img class="ts-logo" src="<?php echo esc_url( get_template_directory_uri() . '/templatesell/about/images/dulcie.jpg' ); ?>" alt="Logo">
			</div>
			<a href="https://www.templatesell.com/item/dulcie/" target="_blank" class="btn btn-success pull-right"><?php esc_html_e( 'Upgrade Pro $49', 'dulcie' ); ?></a>
			<p>
			<?php esc_html_e( 'A perfect theme for blog and magazine site. With masonry layout and multiple blog page layout, this theme is the awesome and minimal theme.', 'dulcie' ); ?></p>
			<a class="btn btn-primary" href="<?php echo esc_url (admin_url( '/customize.php?' ));
				?>"><?php esc_html_e( 'Theme Options - Click Here', 'dulcie' ); ?></a>
		</div>

		<div class="dulcie-panel">
			<div class="dulcie-panel-content">
				<div class="theme-title">
					<h3><?php esc_html_e( 'Looking for more blog themes?', 'dulcie' ); ?></h3>
				</div>
				<a href="https://www.templatesell.com/" target="_blank" class="btn btn-secondary"><?php esc_html_e( 'Click Here', 'dulcie' ); ?></a>
			</div>
		</div>
		<div class="dulcie-panel">
			<div class="dulcie-panel-content">
				<div class="theme-title">
					<h3><?php esc_html_e( 'If you like the theme, please leave a review', 'dulcie' ); ?></h3>
				</div>
				<a href="https://wordpress.org/support/theme/dulcie/reviews/#new-post" target="_blank" class="btn btn-secondary"><?php esc_html_e( 'Rate this theme', 'dulcie' ); ?></a>
			</div>
		</div>
	</div>
	<?php
}
