__( 'Main Menu', 'maxstore' ), ) ); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size(300,300, true); add_image_size( 'maxstore-single', 848, 400, true ); add_image_size( 'maxstore-home-top', 300, 300, true ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'woocommerce' ); // Display a admin notices add_action('admin_notices', 'maxstore_admin_notice'); function maxstore_admin_notice() { global $current_user; $user_id = $current_user->ID; /* Check that the user hasn't already clicked to ignore the message */ if ( ! get_user_meta($user_id, 'maxstore_ignore_notice') ) { echo '
'; printf(__('Like MaxStore theme? You will LOVE MaxStore PRO! ','maxstore').''.__('Click here for all the exciting features.','maxstore').'', '?maxstore_notice_ignore=0'); echo "
';
echo '';
}
}
endif;
////////////////////////////////////////////////////////////////////
// Enqueue Styles (normal style.css and bootstrap.css)
////////////////////////////////////////////////////////////////////
function maxstore_theme_stylesheets()
{
wp_enqueue_style('maxstore-bootstrap-css', get_template_directory_uri() . '/css/bootstrap.css', array(), '1', 'all' );
wp_enqueue_style( 'maxstore-stylesheet', get_stylesheet_uri(), array(), '1', 'all' );
// load Font Awesome css
wp_enqueue_style( 'maxstore-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', false );
}
add_action('wp_enqueue_scripts', 'maxstore_theme_stylesheets');
////////////////////////////////////////////////////////////////////
// Register Bootstrap JS with jquery
////////////////////////////////////////////////////////////////////
function maxstore_theme_js()
{
wp_enqueue_script('maxstore-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.js',array( 'jquery' ),true );
wp_enqueue_script('maxstore-theme-js', get_template_directory_uri() . '/js/customscript.js',array( 'jquery' ),true );
}
add_action('wp_enqueue_scripts', 'maxstore_theme_js');
////////////////////////////////////////////////////////////////////
// Register Custom Navigation Walker include custom menu widget to use walkerclass
////////////////////////////////////////////////////////////////////
require_once('lib/wp_bootstrap_navwalker.php');
////////////////////////////////////////////////////////////////////
// Register Widgets
////////////////////////////////////////////////////////////////////
add_action( 'widgets_init', 'maxstore_widgets_init' );
function maxstore_widgets_init() {
register_sidebar(
array(
'name' => __( 'Right Sidebar', 'maxstore' ),
'id' => 'maxstore-right-sidebar',
'before_widget' => '',
'before_title' => '