2015-09-17 01:26:48 +02:00
|
|
|
<?php
|
|
|
|
|
2016-03-17 13:21:58 +01:00
|
|
|
/*
|
2015-09-17 01:26:48 +02:00
|
|
|
*
|
2016-03-17 13:21:58 +01:00
|
|
|
* Theme setup
|
2015-09-17 01:26:48 +02:00
|
|
|
*
|
|
|
|
*/
|
2016-03-17 13:21:58 +01:00
|
|
|
function ascribe_setup() {
|
|
|
|
add_theme_support('post-thumbnails');
|
|
|
|
add_theme_support('html5', ['caption']);
|
2015-09-17 01:26:48 +02:00
|
|
|
|
2016-03-17 14:17:12 +01:00
|
|
|
// Full column content images for blog, 720px wide, auto height
|
|
|
|
add_image_size( 'blog-full-column', 720 );
|
|
|
|
|
|
|
|
// Blog teaser images, cropped to 720px x 420px
|
|
|
|
add_image_size( 'blog-teaser', 720, 420, true );
|
|
|
|
|
2016-03-17 17:11:30 +01:00
|
|
|
add_image_size( 'blog-feature-crop', 400, 230, true ); //(cropped)
|
2015-09-17 01:26:48 +02:00
|
|
|
|
2016-03-17 13:21:58 +01:00
|
|
|
// Add default posts and comments RSS feed links to head.
|
|
|
|
add_theme_support( 'automatic-feed-links' );
|
2015-11-02 11:18:22 +01:00
|
|
|
}
|
2016-03-17 13:21:58 +01:00
|
|
|
add_action('after_setup_theme', 'ascribe_setup');
|
2015-09-17 01:26:48 +02:00
|
|
|
|
2016-03-17 13:21:58 +01:00
|
|
|
|
|
|
|
/*
|
2015-09-17 01:26:48 +02:00
|
|
|
*
|
2016-03-17 13:21:58 +01:00
|
|
|
* Theme Assets
|
2015-09-17 01:26:48 +02:00
|
|
|
*
|
|
|
|
*/
|
2016-03-17 13:21:58 +01:00
|
|
|
function ascribe_assets() {
|
|
|
|
|
|
|
|
// Styles
|
|
|
|
wp_enqueue_style(
|
|
|
|
'wptheme',
|
|
|
|
WPTHEME_URL . "/assets/dist/css/ascribe.min.css",
|
|
|
|
array(),
|
|
|
|
WPTHEME_VERSION
|
|
|
|
);
|
2015-11-02 11:18:22 +01:00
|
|
|
|
2016-03-17 13:21:58 +01:00
|
|
|
// Scripts
|
2016-01-16 20:58:40 +01:00
|
|
|
if (!is_admin()) {
|
|
|
|
wp_deregister_script('jquery');
|
|
|
|
wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js', false, '2.2.0', true);
|
|
|
|
wp_enqueue_script('jquery');
|
|
|
|
}
|
2015-09-17 01:26:48 +02:00
|
|
|
|
2015-12-17 15:55:34 +01:00
|
|
|
wp_enqueue_script(
|
|
|
|
'wptheme',
|
2016-01-16 21:26:38 +01:00
|
|
|
WPTHEME_TEMPLATE_URL . "/assets/dist/js/ascribe.min.js",
|
2016-01-16 20:58:40 +01:00
|
|
|
array('jquery'),
|
2015-12-17 15:55:34 +01:00
|
|
|
WPTHEME_VERSION,
|
|
|
|
true
|
|
|
|
);
|
2015-09-17 01:26:48 +02:00
|
|
|
}
|
2016-03-17 13:21:58 +01:00
|
|
|
add_action( 'wp_enqueue_scripts', 'ascribe_assets' );
|
2015-09-17 01:26:48 +02:00
|
|
|
|
2016-03-17 13:21:58 +01:00
|
|
|
?>
|