tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
*/
add_theme_support( 'post-thumbnails' );
// This theme uses wp_nav_menu() in one location.
register_nav_menus(
array(
'menu-1' => esc_html__( 'Primary', 'aimbot' ),
'footer-menu' => esc_html__( 'Footer', 'aimbot' ),
'social-menu' => esc_html__( 'Social', 'aimbot' ),
)
);
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support(
'html5',
array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
'style',
'script',
)
);
// Set up the WordPress core custom background feature.
add_theme_support(
'custom-background',
apply_filters(
'aimbot_custom_background_args',
array(
'default-color' => 'ffffff',
'default-image' => '',
)
)
);
// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
/**
* Add support for core custom logo.
*
* @link https://codex.wordpress.org/Theme_Logo
*/
add_theme_support(
'custom-logo',
array(
'height' => 250,
'width' => 250,
'flex-width' => true,
'flex-height' => true,
)
);
}
add_action( 'after_setup_theme', 'aimbot_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 aimbot_content_width() {
$GLOBALS['content_width'] = apply_filters( 'aimbot_content_width', 640 );
}
add_action( 'after_setup_theme', 'aimbot_content_width', 0 );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function aimbot_widgets_init() {
register_sidebar(
array(
'name' => esc_html__( 'Sidebar', 'aimbot' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'aimbot' ),
'before_widget' => '',
'before_title' => '
',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Additional Sidebar', 'aimbot' ),
'id' => 'sidebar-4',
'description' => esc_html__( 'Add widgets here.', 'aimbot' ),
'before_widget' => '',
'before_title' => '',
)
);
// registering second sidebar
register_sidebar(
array(
'name' => esc_html__( 'Footer-Widget-1', 'aimbot' ),
'id' => 'footer-widget-1',
'description' => esc_html__( 'Add widgets here.', 'aimbot' ),
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Footer-Widget-2', 'aimbot' ),
'id' => 'footer-widget-2',
'description' => esc_html__( 'Add widgets here.', 'aimbot' ),
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Footer-Widget-3', 'aimbot' ),
'id' => 'footer-widget-3',
'description' => esc_html__( 'Add widgets here.', 'aimbot' ),
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Footer-Widget-4', 'aimbot' ),
'id' => 'footer-widget-4',
'description' => esc_html__( 'Add widgets here.', 'aimbot' ),
'before_widget' => '',
'before_title' => '',
)
);
}
add_action( 'widgets_init', 'aimbot_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function aimbot_scripts() {
wp_enqueue_script('jquery');
wp_enqueue_style( 'aimbot-style', get_stylesheet_uri(), array(), aimbot );
wp_style_add_data( 'aimbot-style', 'rtl', 'replace' );
wp_enqueue_style('bootstrap-css','get_template_directory_uri'().'/design-assets/lib/bootstrap.css');
wp_enqueue_style('fontawesome-css', get_template_directory_uri() . '/design-assets/lib/font-awesome/css/all.css');
wp_enqueue_script('jquery');
wp_enqueue_style('aimbot-css','get_template_directory_uri'().'/design-assets/css/theme-ui.css');
wp_enqueue_style( 'aimbot-fonts', "https://fonts.googleapis.com/css2?family=Anton&family=Inter&family=Montserrat:ital@1&family=Oswald&family=Poppins:ital,wght@0,400;1,200&family=Roboto&family=Roboto+Condensed&family=Rubik&family=Source+Sans+Pro&family=Ubuntu&family=Yanone+Kaffeesatz&display=swap", true );
wp_enqueue_script( 'aimbot-navigation', get_template_directory_uri() . '/js/navigation.js', array(), aimbot, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'aimbot_scripts' );
//Change the Customizer color palette presets
add_action('customize_controls_print_footer_scripts', function () {
?>