<?php
/**
 * The template for displaying 404 pages (not found)
 *
 * @link https://codex.wordpress.org/Creating_an_Error_404_Page
 *
 * @package celebshine
 */

get_header();
?>

	<main id="primary" class="site-main">
		<div class="container">
			<div class="row">
				<div class="col-sm-12">
					<section class="error-404 not-found">
						<?php
						if( class_exists( 'ReduxFramework' ) ) {
							$celebshine_options = get_option( 'celebshine_options' );
							if( ! empty( $celebshine_options['404-image']['url'] ) ){
								printf( "<img src='%s' alt='%s'>", esc_url( $celebshine_options['404-image']['url'] ), esc_attr__( '404','celebshine' ) );
							} else {
								printf( "<h2>%s</h2>", esc_html__( '404','celebshine' ) );
							}
							if( ! empty( $celebshine_options['404-title'] ) ){
								printf( "<h3 class='page-title'>%s</h3>", esc_html( $celebshine_options['404-title'] ) );
							} else {
								printf( "<h3 class='page-title'>%s</h3>", esc_html__( 'Oops! That page can&rsquo;t be found.', 'celebshine' ) );
							}
							if( ! empty( $celebshine_options['404-description'] ) ){ ?>
								<div class="page-content">
									<?php printf( "<p>%s</p>", esc_html( $celebshine_options['404-description'] ) ); ?>
								</div><!-- .page-content -->
								<?php 
							}
						} else {
							printf( '<h2>%s</h2>', esc_html__( '404','celebshine' ) );
							printf( '<h3 class="page-title">%s</h3>', esc_html__( 'Oops! That page can&rsquo;t be found.', 'celebshine' ) );
							?>					
							<div class="page-content">
								<?php printf( '<p>%s</p>', esc_html__( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'celebshine' ) ); ?>
							</div><!-- .page-content -->
						<?php } ?>
						<div class="back-home-button">
							<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="btn btn-primary"><?php esc_html_e( 'Back To Home', 'celebshine' ); ?></a>
						</div>
					</section><!-- .error-404 -->
				</div>
			</div>
		</div>
	</main><!-- #main -->

<?php
get_footer();
