-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
69 lines (62 loc) · 2.74 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* infectionNet functions and definitions
*
* @package infectionNet
* @since infectionNet 0.1
*/
/**
* Set the content width based on the theme's design and stylesheet.
*
* @since infectionNet 0.1
*/
//if ( ! isset( $content_width ) )
// $content_width = 654; /* pixels */
define( 'INET_THEME_URL', get_bloginfo( 'stylesheet_directory' ) . '/' );
define( 'INET_CSS_URL', INET_THEME_URL . 'scss/' );
define( 'INET_JS_URL', INET_THEME_URL . 'js/' );
define( 'INET_IMAGES_URL', INET_THEME_URL . 'img/' );
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which runs
* before the init hook. The init hook is too late for some features, such as indicating
* support for post thumbnails.
*
* @since infectionNet 0.1
*/
function inet_setup() {
require 'functions/menus.php';
require 'functions/widgets.php';
require 'functions/template-tags.php';
require 'functions/tweaks.php';
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' ) );
add_theme_support( 'post-thumbnails', array( 'post', 'page', 'case', 'note', 'question', 'therapy_guideline' ) );
add_theme_support( 'custom-header',
array (
'flex-width' => true,
'flex-height' => true,
'width' => '800',
'height' => '200',
'default-image' => get_template_directory_uri() . '/img/header-image-clinical-resources.jpg',
'uploads' => true
)
);
// support custom background, custom header?
// set custom thumbnail dimensions
set_post_thumbnail_size( 100, 100, true );
add_action( 'widgets_init', 'inet_widgets_init' );
add_action( 'init', 'inet_register_menus' );
add_action( 'wp_enqueue_scripts', 'inet_enqueue_scripts_styles' );
add_action( 'p2p_init', 'inet_connection_types' );
} // inet_setup
add_action( 'after_setup_theme', 'inet_setup' );
function inet_enqueue_scripts_styles() {
wp_enqueue_style( 'stylebase', get_template_directory_uri() . '/style.css', array(), null, 'all');
wp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.css', array(), null, 'all');
wp_enqueue_style( 'tweaks', get_template_directory_uri() . '/css/tweaks.css', array('style'), null, 'all');
wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/vendor/custom.modernizr.js', array(), false, true);
wp_enqueue_script( 'jquery-details', get_template_directory_uri() . '/js/jquery.details.min.js', array('jquery'), false, true);
wp_enqueue_script( 'foundation', get_template_directory_uri() . '/js/foundation/foundation.js', array('jquery'), false, true);
} // inet_enqueue_scripts_styles