2015-09-17 01:26:48 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
2015-09-17 01:50:43 +02:00
|
|
|
* ascribe functions and definitions
|
2015-09-17 01:26:48 +02:00
|
|
|
*
|
2015-09-17 01:50:43 +02:00
|
|
|
* @package ascribe
|
2015-09-17 01:26:48 +02:00
|
|
|
* @since 0.1.0
|
|
|
|
*/
|
|
|
|
|
2015-09-18 02:13:03 +02:00
|
|
|
require "controller/controller.inc.php";
|
|
|
|
|
|
|
|
|
2015-09-17 01:26:48 +02:00
|
|
|
// Useful global constants
|
2015-09-17 02:17:28 +02:00
|
|
|
define( 'WPTHEME_VERSION', '0.1.0' );
|
|
|
|
define( 'WPTHEME_URL', get_stylesheet_directory_uri() );
|
|
|
|
define( 'WPTHEME_TEMPLATE_URL', get_template_directory_uri() );
|
|
|
|
define( 'WPTHEME_PATH', get_template_directory() . '/' );
|
2016-03-17 13:07:30 +01:00
|
|
|
define( 'WPTHEME_INC', WPTHEME_PATH . 'functions/' );
|
2015-09-17 01:26:48 +02:00
|
|
|
|
|
|
|
// Include compartmentalized functions
|
2016-03-07 20:10:05 +01:00
|
|
|
require_once WPTHEME_INC . 'core.php';
|
2016-03-17 14:17:12 +01:00
|
|
|
require_once WPTHEME_INC . 'blog.php';
|
2016-03-07 20:10:05 +01:00
|
|
|
require_once WPTHEME_INC . 'cpt-team.php';
|
|
|
|
require_once WPTHEME_INC . 'cpt-career.php';
|
|
|
|
require_once WPTHEME_INC . 'cpt-presscoverage.php';
|
|
|
|
require_once WPTHEME_INC . 'cpt-event.php';
|
2016-03-07 20:24:39 +01:00
|
|
|
require_once WPTHEME_INC . 'cpt-testimonial.php';
|
2015-09-17 01:26:48 +02:00
|
|
|
|
2015-09-19 00:03:57 +02:00
|
|
|
//remove emoji script
|
|
|
|
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
|
|
|
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
|
|
|
remove_action( 'wp_print_styles', 'print_emoji_styles' );
|
|
|
|
remove_action( 'admin_print_styles', 'print_emoji_styles' );
|
2015-09-21 21:29:57 +02:00
|
|
|
//
|
|
|
|
////ACF Collapser temp fix
|
2015-10-16 05:27:03 +02:00
|
|
|
//add_filter('acf/compatibility/field_wrapper_class', '__return_true');
|
2015-09-18 02:13:03 +02:00
|
|
|
|
|
|
|
// TURN ON ACF SETTINGS PAGE
|
|
|
|
if( function_exists('acf_add_options_page') ) {
|
2015-12-17 15:55:34 +01:00
|
|
|
acf_add_options_page(array(
|
|
|
|
'page_title' => 'Theme General Settings',
|
|
|
|
'menu_title' => 'Theme Settings',
|
|
|
|
'menu_slug' => 'theme-general-settings',
|
|
|
|
'capability' => 'edit_posts',
|
|
|
|
'redirect' => false
|
|
|
|
));
|
2015-09-18 02:13:03 +02:00
|
|
|
}
|
|
|
|
|
2015-09-19 00:03:57 +02:00
|
|
|
//Register Navigation
|
|
|
|
function register_primary_nav_menu() {
|
2015-12-17 15:55:34 +01:00
|
|
|
register_nav_menu('landing-menu',__( 'Product Tour Navigation Menu' ));
|
|
|
|
register_nav_menu('main-footer-menu',__( 'Main Footer Navigation Menu' ));
|
|
|
|
register_nav_menu('lower-footer-menu',__( 'Lower Footer Navigation Menu' ));
|
2015-09-19 00:03:57 +02:00
|
|
|
}
|
2015-09-22 01:02:29 +02:00
|
|
|
add_action( 'init', 'register_primary_nav_menu');
|
|
|
|
|
2015-11-02 11:18:22 +01:00
|
|
|
// ADD QUERY VAR FOR EVENT PAGINATION
|
|
|
|
add_filter('query_vars', 'add_my_var');
|
|
|
|
function add_my_var($public_query_vars) {
|
2015-12-17 15:55:34 +01:00
|
|
|
$public_query_vars[] = 'date';
|
|
|
|
return $public_query_vars;
|
|
|
|
}
|