'ffffff',
'default-image' => '',
)
)
);
// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
// Add support for core custom logo.
add_theme_support(
'custom-logo',
array(
'height' => 250,
'width' => 250,
'flex-width' => true,
'flex-height' => true,
)
);
add_theme_support(
'html5',
array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
'style',
'script',
)
);
// add_image_size( 'featured-image', 1200 , 628, true ); // Hard crop left top
/**
* Register Nav Menus
*/
register_nav_menus(
array(
'primary_menu' => esc_html__( 'Primary', 'blog-max-lite' ),
)
);
}
endif;
add_action( 'after_setup_theme', 'blog_max_lite_setup' );
/**
* Set the content width in pixels, based on the theme's design and stylesheet.
*
* Priority 0 to make it available to lower priority callbacks.
*
* @global int $content_width
*/
function blog_max_lite_content_width() {
$GLOBALS['content_width'] = apply_filters( 'blog_max_lite_content_width', 640 );
}
add_action( 'after_setup_theme', 'blog_max_lite_content_width', 0 );
/**
* Register widget area.
*
*/
function blog_max_lite_widgets_init() {
register_sidebar(
array(
'name' => esc_html__( 'Primary Sidebar', 'blog-max-lite' ),
'id' => 'primary_sidebar',
'description' => esc_html__( 'Add widgets here.', 'blog-max-lite' ),
'before_widget' => '',
'before_title' => '
',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Footer Widgets', 'blog-max-lite' ),
'id' => 'footer_widgets',
'description' => esc_html__( 'Add widgets here.', 'blog-max-lite' ),
'before_widget' => '',
'before_title' => '',
)
);
}
add_action( 'widgets_init', 'blog_max_lite_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function blog_max_lite_scripts() {
wp_enqueue_style( 'google-font-1', '//fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,300;1,400;1,500;1,700;1,900&display=swap', array(), false, 'all' );
wp_enqueue_style( 'blog-max-lite-style', get_stylesheet_uri(), array(), _S_VERSION );
wp_style_add_data( 'blog-max-lite-style', 'rtl', 'replace' );
wp_enqueue_style( 'bootstrap', get_template_directory_uri().'/inc/assets/css/bootstrap.min.css', array(), '4.5.3', 'all' );
wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/inc/assets/css/font-awesome.min.css', array(), '4.7.0', 'all' );
wp_enqueue_style( 'blog-max-lite', get_template_directory_uri().'/inc/assets/css/blog-max-lite.css', array(), time(), 'all' );
wp_enqueue_style( 'blog-max-lite-responsive', get_template_directory_uri().'/inc/assets/css/responsive.css', array(), time(), 'all' );
wp_enqueue_script( 'blog-max-lite', get_template_directory_uri().'/inc/assets/js/blog-max-lite.js', array( 'jquery' ), time(), true );
wp_enqueue_style( 'blm-inline-style', get_template_directory_uri().'/inc/assets/css/inline-style.css', array(), time(), 'all' );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'blog_max_lite_scripts' );
/**
* Admin Assets
*/
function blog_max_lite_admin_scripts( $screen ){
if ( $screen === 'widgets.php' ) {
wp_enqueue_style( 'admin-customizer', get_template_directory_uri().'/admin/css/admin.customizer.css', array(), time(), 'all' );
}
}
add_action( 'admin_enqueue_scripts', 'blog_max_lite_admin_scripts' );
/**
* Customizer Framework
*/
require_once get_template_directory() . '/lib/tgm/core-plugin.php';
// customizer part
require get_template_directory() . '/inc/parts/customizer/sections-settings.php';
// customizer css
require get_template_directory() . '/inc/parts/customizer/customizer-style.php';
// remove default customizer panel
add_action('customize_register','blog_max_lite_customize_register');
function blog_max_lite_customize_register( $wp_customize ) {
// $wp_customize->remove_panel();
$wp_customize->remove_section('colors');
$wp_customize->remove_section('background_image');
}
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Functions which enhance the theme by hooking into WordPress.
*/
require get_template_directory() . '/inc/template-functions.php';