<?php   
/**
 * @package Allrounder
 */
 require_once get_template_directory()."/all-rounder-theme-customization-settings.php";
 function all_rounder_styleneed()
 {
 	wp_enqueue_style( 'all-rounder-basic-style', get_stylesheet_uri() );
	wp_enqueue_style( 'all-rounder-responsive', get_template_directory_uri() .'/all-rounder-responsive.css');
	wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/bootstrap/css/bootstrap.css');
	wp_enqueue_style( 'font-awesome', get_template_directory_uri() .'/css/font-awesome.css');
	wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/bootstrap/js/bootstrap.js', array('jquery'));
	wp_enqueue_script( 'all-rounder-toggle', get_template_directory_uri() . '/js/all-rounder-toggle.js', array('jquery'));
 }
 add_action( 'wp_enqueue_scripts', 'all_rounder_styleneed' );

if ( ! function_exists( 'all_rounder_setup' ) ) :
function all_rounder_setup() {   
	add_theme_support( 'automatic-feed-links' );
	add_theme_support('woocommerce');
	add_theme_support( 'post-thumbnails' );
	add_theme_support( 'custom-header' );
	add_theme_support( 'title-tag' );
	register_nav_menus( array(
		'primary' => esc_html__( 'Primary Menu', 'all-rounder' ),
		'footer' => esc_html__( 'Footer Menu', 'all-rounder' ),
	) );
	add_theme_support( 'custom-background', array(
		'default-color' => 'ffffff'
	) );	

			$defaults = array(
			'default-image'          => get_template_directory_uri() .'/images/banner2.jpg',
			'width'                  => 1400,
			'height'                 => 500,
			'uploads'                => true,			
		);
		add_theme_support( 'custom-header', $defaults );
} 
endif; // all_rounder_setup
add_action( 'after_setup_theme', 'all_rounder_setup' );

function all_rounder_widgets_init() { 	
	
	register_sidebar( array(
		'name'          => esc_html__( 'Sidebar', 'all-rounder' ),
		'description'   => esc_html__( 'Appears on sidebar', 'all-rounder' ),
		'id'            => 'sidebar-1',
		'before_widget' => '',		
		'before_title'  => '<h3 class="widget-title">',
		'after_title'   => '</h3><aside id="%1$s" class="widget %2$s">',
		'after_widget'  => '</aside>',
	) );	
}
add_action( 'widgets_init', 'all_rounder_widgets_init' );
if ( ! isset( $content_width ) ) $content_width = 900;

add_action( 'admin_menu', 'all_rounder_pros');
function all_rounder_pros() {    	
	add_theme_page( esc_html__('Allrounder Details', 'all-rounder'), esc_html__('Allrounder Details', 'all-rounder'), 'edit_theme_options', 'all_rounder_pro', 'all_rounder_pro_details');   
} 

function all_rounder_pro_details() { 	
?>
<div class="wrap col-md-8">
<?php $proimage= "".get_template_directory_uri()."/images/themesbunch.jpg"; ?>
<div><a target="_blank" href="<?php echo esc_url( ALL_ROUNDER_PROURL ); ?>"><img src="<?php echo esc_url($proimage);?>"></a></div><br>
<div><a class="button button-primary button-large" href="<?php echo esc_url( ALL_ROUNDER_PROURL ); ?>" target="_blank"><?php esc_html_e('Upgrade To Pro', 'all-rounder'); ?></a></div><br>
<div><a class="button button-primary button-large" href="<?php echo esc_url( ALL_ROUNDER_DEMOURL ); ?>" target="_blank"><?php esc_html_e('Live Demo', 'all-rounder'); ?></a></div><br>
<div><a class="button button-primary button-large" href="<?php echo esc_url( ALL_ROUNDER_DOCURL ); ?>" target="_blank"><?php esc_html_e('Documentation', 'all-rounder'); ?></a></div>
 </div> 
<?php }?>