diff --git a/functions.php b/functions.php
index c1503a5..f56392c 100644
--- a/functions.php
+++ b/functions.php
@@ -115,24 +115,24 @@ function cs_widgets_init() {
*/
require get_template_directory() . '/inc/customizer.php';
-/**
+/**
* New nav walkers
*/
require get_template_directory() . '/inc/nav-walker.php';
require get_template_directory() . '/inc/nav-drop-multi-walker.php';
require get_template_directory() . '/inc/nav-tabs-walker.php';
-/**
+/**
* Bootstrap the comment form.
*/
require get_template_directory() . '/inc/bootstrap-forms.php';
-/**
+/**
* Custom site settings
*/
require get_template_directory() . '/inc/settings.php';
-/**
+/**
* Bootstrap Whitelist
*/
require get_template_directory() . '/inc/bootstrap-whitelist.php';
@@ -175,13 +175,13 @@ function hale_main_nav_fallback($args) {
} else {
echo '
';
}
-
+
}
$attributes = (!empty($args['menu_class'])?' class="'.$args['menu_class'].'"':'');
$attributes .= (!empty($args['menu_id'])?' id="'.$args['menu_id'].'"':'');
echo '
';
if($data->length > 0) {
- foreach($data as $item) {
+ foreach($data as $item) {
echo $item->ownerDocument->saveXML($item);//saveHTML wouldn't accept it as paramater.
}
}
@@ -193,9 +193,9 @@ function hale_main_nav_fallback($args) {
} else {
echo '
';
}
-
+
}
- }
+ }
return;
}
@@ -247,4 +247,21 @@ function ssi_add_widget_class( $classes ) {
return $classes;
}
+function uc_redirect_403() {
+ if( get_query_var( 'is_403' ) == true ){
+ global $wp_query;
+
+ status_header(403);
+ $wp_query->is_404=false;
+
+ add_filter( 'wp_title', function( $title='', $sep='' ){
+ return "Forbidden | ".get_bloginfo('name');
+ });
+ get_template_part('403');
+ exit;
+ }
+}
+
+add_action( 'template_redirect', 'uc_redirect_403' );
+
?>
\ No newline at end of file