-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
69 lines (52 loc) · 2.05 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
if (false) {
ini_set('display_errors', 'On');
error_reporting(E_ALL);
}
function getPageTemplate() {
get_template_directory().'index.php';
}
add_filter( "page_template", "getPageTemplate" );
function addNavigationController($controllers) {
$controllers[] = 'navigation';
return $controllers;
}
add_filter('json_api_controllers', addNavigationController);
function setNavigationControllerPath() {
return get_template_directory().'/php/api/navigationAPIController.php';
}
add_filter('json_api_navigation_controller_path', setNavigationControllerPath);
function addJQueryScript() {
wp_enqueue_script( 'jquery', get_template_directory_uri() .'/js/jquery-2.1.4', array(), '2.1.4', true);
}
function addBootstrapScript() {
wp_enqueue_script( 'bootstrapjs', get_template_directory_uri() .'/js/bootstrap.js', array(), '3.3.5', true);
}
function addAngularScripts() {
wp_enqueue_script( 'angularjs', get_template_directory_uri() .'/js/angular.js', array(), '1.4.7', true);
wp_enqueue_script( 'angularroutejs', get_template_directory_uri() .'/js/angular-route.js', array(), '1.4.7', true);
}
function addAppScripts() {
wp_enqueue_script( 'navjs', get_template_directory_uri() .'/js/nav.js', array(), '1.0.0', true);
wp_enqueue_script( 'appjs', get_template_directory_uri() .'/js/app.js', array(), '1.0.0', true);
}
function addBuiltScript() {
wp_enqueue_script( 'appjs', get_template_directory_uri() .'/build/js/app.js', array(), '1.0.0', true);
}
function addScripts() {
addJQueryScript();
addBootstrapScript();
addAngularScripts();
addAppScripts();
}
function register_my_menus() {
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'WP Mega Menu 1.0' ),
'sidebar' => __('Sidebar Menu', 'Sidebar manu'),
'footer' => __('Footer Navigation', 'Footer Navigation')
));
}
require_once( 'php/options.php' );
add_action( 'wp_enqueue_scripts', 'addScripts');
add_action( 'after_setup_theme', 'register_my_menus' );
?>