Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert "Add 403 redirect page"
This reverts commit 9f03b2d.
  • Loading branch information
szk11001 committed Jan 22, 2016
1 parent 9f03b2d commit a1890ee
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 78 deletions.
53 changes: 0 additions & 53 deletions 403.php

This file was deleted.

7 changes: 7 additions & 0 deletions 404.php
Expand Up @@ -5,6 +5,13 @@
* @package cornerstone
*/
get_header(); ?>
<?php
$private = get_post_meta(get_queried_object()->ID, 'uc-private', true);
if($private == 'admins' || $private == 'users' || $private == 'list' || $private == 'netids'){
$private = true;
echo 'This is a private page';
}
?>
<div id="error404">
<div class="row">
<div class="col-sm-12">
Expand Down
33 changes: 8 additions & 25 deletions functions.php
Expand Up @@ -115,24 +115,24 @@ require get_template_directory() . '/inc/extras.php';
*/
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';
Expand Down Expand Up @@ -175,13 +175,13 @@ function hale_main_nav_fallback($args) {
} else {
echo '<div'.$attributes.'>';
}

}
$attributes = (!empty($args['menu_class'])?' class="'.$args['menu_class'].'"':'');
$attributes .= (!empty($args['menu_id'])?' id="'.$args['menu_id'].'"':'');
echo '<ul'.$attributes.'>';
if($data->length > 0) {
foreach($data as $item) {
foreach($data as $item) {
echo $item->ownerDocument->saveXML($item);//saveHTML wouldn't accept it as paramater.
}
}
Expand All @@ -193,9 +193,9 @@ function hale_main_nav_fallback($args) {
} else {
echo '</div>';
}

}
}
}
return;
}

Expand Down Expand Up @@ -237,21 +237,4 @@ function cornerstone_show_people(){
};
add_action( 'admin_init', 'cornerstone_show_people' );

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' );

?>

0 comments on commit a1890ee

Please sign in to comment.