-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfunctions.php
64 lines (58 loc) · 1.75 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
<?php
// Actions/filters definitions
function feat_image(){
add_theme_support('post-thumbnails');
}
function editor_style(){
add_editor_style();
}
function navigation(){
register_nav_menu( 'principale', 'Menu principale' );
}
function js_handling(){
wp_deregister_script('jquery');
wp_register_script('jquery', get_bloginfo('template_url') . "/bower_components/jquery/dist/jquery.min.js", false, "2.1.3", true);
wp_register_script('app', get_bloginfo('template_url') . "/js/appsterdam.js", array('jquery'), "1.0.0", true);
wp_enqueue_script('app');
}
function defineSidebars(){
register_sidebar(array(
'name' => 'Credits',
'description' => 'Appears below main navigation and/or footer',
'before_widget' => '<div class="widget credits">',
'after_widget' => '</div>'
));
}
function apps_login(){
?>
<style type="text/css">
body.login div#login h1 a {
background-image: url(<?php bloginfo('template_url'); ?>/img/logo_mi.svg);
width: 210px;
height: 174px;
background-size: 210px 174px;
}
body.login div#login{
padding: 4.5% 0 0;
}
</style>
<?php
}
function apps_favicon(){
$favicon_url = get_bloginfo('template_url') . '/img/logo_mi.png';
echo '<link rel="icon" type="image/png" href="' . $favicon_url . '" >';
}
function veespoCardCode(){
echo('<script src="http://production.veespo.com/js/veespo-cards"></script>');
}
// Actions/filters calls
add_action('init','feat_image');
add_action('init','editor_style');
add_action('init','navigation');
add_action('widgets_init','defineSidebars');
add_action('wp_enqueue_scripts','js_handling');
add_action('login_head', 'apps_login');
add_action('admin_head', 'apps_favicon');
// Includes
include('functions/post-types.php');
?>