2015-09-17 01:26:48 +02:00
|
|
|
<?php
|
2015-09-17 02:17:28 +02:00
|
|
|
namespace TenUp\ascribe\Core;
|
2015-09-17 01:26:48 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set up theme defaults and register supported WordPress features.
|
|
|
|
*
|
|
|
|
* @since 0.1.0
|
|
|
|
*
|
|
|
|
* @uses add_action()
|
|
|
|
*
|
|
|
|
* @return void.
|
|
|
|
*/
|
|
|
|
function setup() {
|
|
|
|
$n = function( $function ) {
|
|
|
|
return __NAMESPACE__ . "\\$function";
|
|
|
|
};
|
|
|
|
|
|
|
|
add_action( 'wp_enqueue_scripts', $n( 'scripts' ) );
|
2015-11-02 11:18:22 +01:00
|
|
|
|
2015-09-17 01:26:48 +02:00
|
|
|
add_action( 'wp_enqueue_scripts', $n( 'styles' ) );
|
|
|
|
|
2015-11-02 11:18:22 +01:00
|
|
|
}
|
2015-09-17 01:26:48 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Enqueue scripts for front-end.
|
|
|
|
*
|
|
|
|
* @uses wp_enqueue_script() to load front end scripts.
|
|
|
|
*
|
|
|
|
* @since 0.1.0
|
|
|
|
*
|
|
|
|
* @return void.
|
|
|
|
*/
|
|
|
|
function scripts( $debug = false ) {
|
2015-11-02 11:18:22 +01:00
|
|
|
|
|
|
|
wp_deregister_script('jquery');
|
|
|
|
wp_register_script('jquery', ("https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"), false, '1.3.2',true);
|
|
|
|
wp_enqueue_script('jquery');
|
2015-09-17 01:26:48 +02:00
|
|
|
|
|
|
|
wp_enqueue_script(
|
2015-09-17 02:17:28 +02:00
|
|
|
'wptheme',
|
2015-11-02 11:18:22 +01:00
|
|
|
WPTHEME_TEMPLATE_URL . "/assets/js/ascribe.min.js",
|
2015-09-17 01:26:48 +02:00
|
|
|
array(),
|
2015-09-17 02:17:28 +02:00
|
|
|
WPTHEME_VERSION,
|
2015-09-17 01:26:48 +02:00
|
|
|
true
|
|
|
|
);
|
2015-09-25 07:55:31 +02:00
|
|
|
|
2015-11-02 11:18:22 +01:00
|
|
|
wp_enqueue_script(
|
|
|
|
'modernizr',
|
|
|
|
"https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js",
|
|
|
|
array(),
|
|
|
|
'2.8.3',
|
|
|
|
false
|
|
|
|
);
|
|
|
|
|
2015-09-25 07:55:31 +02:00
|
|
|
|
2015-09-17 01:26:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enqueue styles for front-end.
|
|
|
|
*
|
|
|
|
* @uses wp_enqueue_style() to load front end styles.
|
|
|
|
*
|
|
|
|
* @since 0.1.0
|
|
|
|
*
|
|
|
|
* @return void.
|
|
|
|
*/
|
|
|
|
function styles( $debug = false ) {
|
|
|
|
$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
|
|
|
|
|
|
|
wp_enqueue_style(
|
2015-09-17 02:17:28 +02:00
|
|
|
'wptheme',
|
|
|
|
WPTHEME_URL . "/assets/css/ascribe{$min}.css",
|
2015-09-17 01:26:48 +02:00
|
|
|
array(),
|
2015-09-17 02:17:28 +02:00
|
|
|
WPTHEME_VERSION
|
2015-09-17 01:26:48 +02:00
|
|
|
);
|
2015-11-02 11:18:22 +01:00
|
|
|
}
|