ap_assets()

Description #

AnsPress CSS and JS.

Source #

File: includes/theme.php

function ap_assets() {
	wp_register_script( 'selectize', ANSPRESS_URL . 'assets/js/lib/selectize.min.js', array( 'jquery' ), AP_VERSION, true );

	wp_register_script( 'anspress-common', ANSPRESS_URL . 'assets/js/common.js', array( 'jquery', 'jquery-form', 'underscore', 'backbone', 'selectize' ), AP_VERSION, true );
	wp_register_script( 'anspress-question', ANSPRESS_URL . 'assets/js/question.js', array( 'anspress-common' ), AP_VERSION, true );
	wp_register_script( 'anspress-ask', ANSPRESS_URL . 'assets/js/ask.js', array( 'anspress-common' ), AP_VERSION, true );
	wp_register_script( 'anspress-list', ANSPRESS_URL . 'assets/js/list.js', array( 'anspress-common' ), AP_VERSION, true );
	wp_register_script( 'anspress-notifications', ANSPRESS_URL . 'assets/js/notifications.js', array( 'anspress-common' ), AP_VERSION, true );
	wp_register_script( 'anspress-theme', ap_get_theme_url( 'js/theme.js', false, false ), array( 'anspress-common', 'anspress-question', 'anspress-ask', 'anspress-list', 'anspress-notifications' ), AP_VERSION, true );

	wp_register_style( 'anspress-fonts', ap_get_theme_url( 'css/fonts.css', false, false ), array(), AP_VERSION );
	wp_register_style( 'anspress-main', ap_get_theme_url( 'css/main.css', false, false ), array( 'anspress-fonts' ), AP_VERSION );
	wp_register_style( 'anspress-rtl', ap_get_theme_url( 'css/rtl.css', false, false ), array( 'anspress-main' ), AP_VERSION );

	return array();
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment