-
Notifications
You must be signed in to change notification settings - Fork 7
/
functions.php
69 lines (50 loc) · 1.95 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
//get needed files
include_once('inc/cpt.php');
include_once('inc/general.php');
/**
* sq_theme_init()
*
* This is the primer for all the customizations in this theme. Don't like something in here? No worries, just make a
* child theme. In child's functions.php, copy/paste this function and only call the functions you want!
*
* Editing this file directly is not advised!
*/
if (!function_exists('sq_theme_init')) {
function sq_theme_init()
{
//enqueue all the things! (modernizr, jQuery, hoverIntent, SuperFish, comment-reply)
add_action('wp_enqueue_scripts', 'sq_scripts_method');
//add some helpers to poor old IE
add_action('wp_head', 'sq_add_ie_helpers');
//clean up the head
sq_remove_default_wp_actions();
//register those menus
sq_register_menus();
//set image max width
sq_set_max_image_width();
//add thumbnail support and set widths
sq_post_thumbnail_support();
//add post format support
sq_post_format_support();
// Link post thumbnail to post permalink
add_filter('post_thumbnail_html', 'sq_post_image_html', 10, 3);
//initialize the sq widget
add_action('init', 'sq_widgets_init');
// Remove width/height attribute on inserted images
add_filter('post_thumbnail_html', 'sq_remove_width_attribute', 10);
// Images are sized via CSS or inline style="" attribute by user.
add_filter('image_send_to_editor', 'sq_remove_width_attribute', 10);
//Enable custom menus
add_theme_support('menus');
// Remove the admin bar
show_admin_bar(false);
// automatic feeds
add_theme_support('automatic-feed-links');
// Add custom post types
add_action('init', 'sq_post_type_portfolio');
add_action('init', 'sq_post_type_socialpost');
}
//thumbs up, lets go!
sq_theme_init();
}//end sq_theme_init()