Prevent direct access

This commit is contained in:
IanDelMar 2018-09-10 23:59:04 +02:00
parent 613f16e462
commit 45c9d1adb7
51 changed files with 195 additions and 0 deletions

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );

View File

@ -7,6 +7,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
?> ?>

View File

@ -7,6 +7,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>

View File

@ -8,6 +8,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/* /*
* If the current post is protected by a password and * If the current post is protected by a password and
* the visitor has not yet entered the password we will * the visitor has not yet entered the password we will

View File

@ -7,6 +7,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/** /**
* Initialize theme default settings * Initialize theme default settings
*/ */

View File

@ -5,6 +5,9 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
<?php if ( is_active_sidebar( 'hero' ) || is_active_sidebar( 'statichero' ) || is_active_sidebar( 'herocanvas' ) ) : ?> <?php if ( is_active_sidebar( 'hero' ) || is_active_sidebar( 'statichero' ) || is_active_sidebar( 'herocanvas' ) ) : ?>

View File

@ -5,6 +5,9 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
<?php <?php

View File

@ -4,6 +4,10 @@
* *
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
</div><!-- #closing the primary container from /global-templates/left-sidebar-check.php --> </div><!-- #closing the primary container from /global-templates/left-sidebar-check.php -->

View File

@ -7,6 +7,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>
<!DOCTYPE html> <!DOCTYPE html>

View File

@ -5,6 +5,10 @@
* @package WP-Bootstrap-Navwalker * @package WP-Bootstrap-Navwalker
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/* /*
* Class Name: WP_Bootstrap_Navwalker * Class Name: WP_Bootstrap_Navwalker
* Plugin Name: WP Bootstrap Navwalker * Plugin Name: WP Bootstrap Navwalker

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// Comments form. // Comments form.
add_filter( 'comment_form_default_fields', 'understrap_bootstrap_comment_form_fields' ); add_filter( 'comment_form_default_fields', 'understrap_bootstrap_comment_form_fields' );

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
add_action( 'after_setup_theme', 'understrap_custom_header_setup' ); add_action( 'after_setup_theme', 'understrap_custom_header_setup' );
if ( ! function_exists ( 'understrap_custom_header_setup' ) ) { if ( ! function_exists ( 'understrap_custom_header_setup' ) ) {

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/** /**
* Add postMessage support for site title and description for the Theme Customizer. * Add postMessage support for site title and description for the Theme Customizer.
* *

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/** /**
* Registers an editor stylesheet for the theme. * Registers an editor stylesheet for the theme.
*/ */

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! function_exists( 'understrap_scripts' ) ) { if ( ! function_exists( 'understrap_scripts' ) ) {
/** /**
* Load theme's JavaScript and CSS sources. * Load theme's JavaScript and CSS sources.

View File

@ -7,6 +7,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
add_filter( 'body_class', 'understrap_body_classes' ); add_filter( 'body_class', 'understrap_body_classes' );
if ( ! function_exists( 'understrap_body_classes' ) ) { if ( ! function_exists( 'understrap_body_classes' ) ) {

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! function_exists( 'understrap_site_info' ) ) { if ( ! function_exists( 'understrap_site_info' ) ) {
/** /**
* Add site info hook to WP hook library. * Add site info hook to WP hook library.

View File

@ -7,6 +7,10 @@
* @package UnderStrap * @package UnderStrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/** /**
* Jetpack setup function. * Jetpack setup function.
* *

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! function_exists ( 'understrap_pagination' ) ) { if ( ! function_exists ( 'understrap_pagination' ) ) {
function understrap_pagination( $args = array(), $class = 'pagination' ) { function understrap_pagination( $args = array(), $class = 'pagination' ) {

View File

@ -5,6 +5,9 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// Set the content width based on the theme's design and stylesheet. // Set the content width based on the theme's design and stylesheet.
if ( ! isset( $content_width ) ) { if ( ! isset( $content_width ) ) {

View File

@ -7,6 +7,9 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/** /**
* Prints HTML with meta information for the current post-date/time and author. * Prints HTML with meta information for the current post-date/time and author.

View File

@ -6,6 +6,10 @@
* *
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! function_exists ( 'understrap_setup_theme_default_settings' ) ) { if ( ! function_exists ( 'understrap_setup_theme_default_settings' ) ) {
function understrap_setup_theme_default_settings() { function understrap_setup_theme_default_settings() {

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/** /**
* Count number of widgets in a sidebar * Count number of widgets in a sidebar
* Used to add classes to widget areas so widgets can be displayed one, two, three or four per row * Used to add classes to widget areas so widgets can be displayed one, two, three or four per row

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
add_action( 'after_setup_theme', 'understrap_woocommerce_support' ); add_action( 'after_setup_theme', 'understrap_woocommerce_support' );
if ( ! function_exists( 'understrap_woocommerce_support' ) ) { if ( ! function_exists( 'understrap_woocommerce_support' ) ) {
/** /**

View File

@ -7,6 +7,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/** /**
* Adds support for wp.com-specific theme functions. * Adds support for wp.com-specific theme functions.
* *

View File

@ -11,6 +11,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );

View File

@ -5,4 +5,8 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
the_content(); the_content();

View File

@ -5,4 +5,8 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
the_content(); the_content();

View File

@ -7,6 +7,9 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
<section class="no-results not-found"> <section class="no-results not-found">

View File

@ -5,7 +5,11 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>"> <article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<header class="entry-header"> <header class="entry-header">

View File

@ -5,7 +5,11 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>"> <article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<header class="entry-header"> <header class="entry-header">

View File

@ -5,7 +5,11 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>"> <article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<header class="entry-header"> <header class="entry-header">

View File

@ -5,6 +5,9 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>"> <article <?php post_class(); ?> id="post-<?php the_ID(); ?>">

View File

@ -7,6 +7,9 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html <?php language_attributes(); ?>> <html <?php language_attributes(); ?>>

View File

@ -7,6 +7,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>

View File

@ -8,6 +8,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
while ( have_posts() ) : the_post(); while ( have_posts() ) : the_post();

View File

@ -7,6 +7,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>

View File

@ -7,6 +7,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>

View File

@ -7,6 +7,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>

View File

@ -10,6 +10,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );

View File

@ -5,7 +5,11 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search"> <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
<label class="sr-only" for="s"><?php esc_html_e( 'Search', 'understrap' ); ?></label> <label class="sr-only" for="s"><?php esc_html_e( 'Search', 'understrap' ); ?></label>
<div class="input-group"> <div class="input-group">

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>

View File

@ -5,6 +5,9 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
<?php if ( is_active_sidebar( 'hero' ) ) : ?> <?php if ( is_active_sidebar( 'hero' ) ) : ?>

View File

@ -5,6 +5,9 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?> ?>
<?php if ( is_active_sidebar( 'herocanvas' ) ) : ?> <?php if ( is_active_sidebar( 'herocanvas' ) ) : ?>

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! is_active_sidebar( 'left-sidebar' ) ) { if ( ! is_active_sidebar( 'left-sidebar' ) ) {
return; return;
} }

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! is_active_sidebar( 'right-sidebar' ) ) { if ( ! is_active_sidebar( 'right-sidebar' ) ) {
return; return;
} }

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! is_active_sidebar( 'sidebar-1' ) ) { if ( ! is_active_sidebar( 'sidebar-1' ) ) {
return; return;
} }

View File

@ -5,6 +5,10 @@
* @package understrap * @package understrap
*/ */
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); get_header();
$container = get_theme_mod( 'understrap_container_type' ); $container = get_theme_mod( 'understrap_container_type' );
?> ?>