diff --git a/404.php b/404.php index 379f06a..2015b09 100644 --- a/404.php +++ b/404.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + get_header(); $container = get_theme_mod( 'understrap_container_type' ); diff --git a/archive.php b/archive.php index 68f009c..cd7854e 100644 --- a/archive.php +++ b/archive.php @@ -7,6 +7,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + get_header(); ?> diff --git a/author.php b/author.php index 8e60728..76ab557 100644 --- a/author.php +++ b/author.php @@ -7,6 +7,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + get_header(); $container = get_theme_mod( 'understrap_container_type' ); ?> diff --git a/comments.php b/comments.php index efecf87..f8500d7 100644 --- a/comments.php +++ b/comments.php @@ -8,6 +8,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + /* * If the current post is protected by a password and * the visitor has not yet entered the password we will diff --git a/footer.php b/footer.php index bcf0f64..92c7be0 100644 --- a/footer.php +++ b/footer.php @@ -7,6 +7,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + $container = get_theme_mod( 'understrap_container_type' ); ?> diff --git a/functions.php b/functions.php index 18b407f..a86173d 100644 --- a/functions.php +++ b/functions.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + /** * Initialize theme default settings */ diff --git a/global-templates/hero.php b/global-templates/hero.php index dbfae79..fb02503 100644 --- a/global-templates/hero.php +++ b/global-templates/hero.php @@ -5,6 +5,9 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} ?> diff --git a/global-templates/left-sidebar-check.php b/global-templates/left-sidebar-check.php index aa9afb1..a8e9669 100644 --- a/global-templates/left-sidebar-check.php +++ b/global-templates/left-sidebar-check.php @@ -5,6 +5,9 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} ?> diff --git a/header.php b/header.php index ec9ba0e..83cbb0d 100644 --- a/header.php +++ b/header.php @@ -7,6 +7,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + $container = get_theme_mod( 'understrap_container_type' ); ?> diff --git a/inc/class-wp-bootstrap-navwalker.php b/inc/class-wp-bootstrap-navwalker.php index 71b52d9..a343fcc 100644 --- a/inc/class-wp-bootstrap-navwalker.php +++ b/inc/class-wp-bootstrap-navwalker.php @@ -5,6 +5,10 @@ * @package WP-Bootstrap-Navwalker */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + /* * Class Name: WP_Bootstrap_Navwalker * Plugin Name: WP Bootstrap Navwalker diff --git a/inc/custom-comments.php b/inc/custom-comments.php index 70a4acc..d616cf6 100644 --- a/inc/custom-comments.php +++ b/inc/custom-comments.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + // Comments form. add_filter( 'comment_form_default_fields', 'understrap_bootstrap_comment_form_fields' ); diff --git a/inc/custom-header.php b/inc/custom-header.php index 7ee219a..b66a416 100644 --- a/inc/custom-header.php +++ b/inc/custom-header.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + add_action( 'after_setup_theme', 'understrap_custom_header_setup' ); if ( ! function_exists ( 'understrap_custom_header_setup' ) ) { diff --git a/inc/customizer.php b/inc/customizer.php index 2e0364f..6729d77 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + /** * Add postMessage support for site title and description for the Theme Customizer. * diff --git a/inc/editor.php b/inc/editor.php index 86aafb3..4b71ee9 100644 --- a/inc/editor.php +++ b/inc/editor.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + /** * Registers an editor stylesheet for the theme. */ diff --git a/inc/enqueue.php b/inc/enqueue.php index 07bf264..9748b81 100644 --- a/inc/enqueue.php +++ b/inc/enqueue.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + if ( ! function_exists( 'understrap_scripts' ) ) { /** * Load theme's JavaScript and CSS sources. diff --git a/inc/extras.php b/inc/extras.php index 4789cd7..404dfb7 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -7,6 +7,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + add_filter( 'body_class', 'understrap_body_classes' ); if ( ! function_exists( 'understrap_body_classes' ) ) { diff --git a/inc/hooks.php b/inc/hooks.php index e63a9d6..2de6401 100644 --- a/inc/hooks.php +++ b/inc/hooks.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + if ( ! function_exists( 'understrap_site_info' ) ) { /** * Add site info hook to WP hook library. diff --git a/inc/jetpack.php b/inc/jetpack.php index b0c46f1..1c2579c 100644 --- a/inc/jetpack.php +++ b/inc/jetpack.php @@ -7,6 +7,10 @@ * @package UnderStrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + /** * Jetpack setup function. * diff --git a/inc/pagination.php b/inc/pagination.php index b582f73..9a6ff79 100644 --- a/inc/pagination.php +++ b/inc/pagination.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + if ( ! function_exists ( 'understrap_pagination' ) ) { function understrap_pagination( $args = array(), $class = 'pagination' ) { diff --git a/inc/setup.php b/inc/setup.php index dc74ac5..69d0aab 100644 --- a/inc/setup.php +++ b/inc/setup.php @@ -5,6 +5,9 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} // Set the content width based on the theme's design and stylesheet. if ( ! isset( $content_width ) ) { diff --git a/inc/template-tags.php b/inc/template-tags.php index 7b3a0d2..5e2cc65 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -7,6 +7,9 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} /** * Prints HTML with meta information for the current post-date/time and author. diff --git a/inc/theme-settings.php b/inc/theme-settings.php index f91d8f1..9bee616 100755 --- a/inc/theme-settings.php +++ b/inc/theme-settings.php @@ -6,6 +6,10 @@ * */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + if ( ! function_exists ( 'understrap_setup_theme_default_settings' ) ) { function understrap_setup_theme_default_settings() { diff --git a/inc/widgets.php b/inc/widgets.php index 88ffb91..fdd6611 100644 --- a/inc/widgets.php +++ b/inc/widgets.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + /** * 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 diff --git a/inc/woocommerce.php b/inc/woocommerce.php index e1c800a..3cd8e9b 100644 --- a/inc/woocommerce.php +++ b/inc/woocommerce.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + add_action( 'after_setup_theme', 'understrap_woocommerce_support' ); if ( ! function_exists( 'understrap_woocommerce_support' ) ) { /** diff --git a/inc/wpcom.php b/inc/wpcom.php index 16b6dc0..ca42c38 100644 --- a/inc/wpcom.php +++ b/inc/wpcom.php @@ -7,6 +7,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + /** * Adds support for wp.com-specific theme functions. * diff --git a/index.php b/index.php index 53bd943..fddf5dd 100644 --- a/index.php +++ b/index.php @@ -11,6 +11,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + get_header(); $container = get_theme_mod( 'understrap_container_type' ); diff --git a/loop-templates/content-blank.php b/loop-templates/content-blank.php index c11985d..01ff3af 100644 --- a/loop-templates/content-blank.php +++ b/loop-templates/content-blank.php @@ -5,4 +5,8 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + the_content(); diff --git a/loop-templates/content-empty.php b/loop-templates/content-empty.php index a9e3f07..5681144 100644 --- a/loop-templates/content-empty.php +++ b/loop-templates/content-empty.php @@ -5,4 +5,8 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + the_content(); diff --git a/loop-templates/content-none.php b/loop-templates/content-none.php index 493a98b..250152a 100644 --- a/loop-templates/content-none.php +++ b/loop-templates/content-none.php @@ -7,6 +7,9 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} ?>
diff --git a/loop-templates/content-page.php b/loop-templates/content-page.php index 429d3e3..bb1fb2e 100644 --- a/loop-templates/content-page.php +++ b/loop-templates/content-page.php @@ -5,7 +5,11 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} ?> +
id="post-">
diff --git a/loop-templates/content-search.php b/loop-templates/content-search.php index ace9941..501cd92 100644 --- a/loop-templates/content-search.php +++ b/loop-templates/content-search.php @@ -5,7 +5,11 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} ?> +
id="post-">
diff --git a/loop-templates/content-single.php b/loop-templates/content-single.php index e57eae4..5f82da6 100644 --- a/loop-templates/content-single.php +++ b/loop-templates/content-single.php @@ -5,7 +5,11 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} ?> +
id="post-">
diff --git a/loop-templates/content.php b/loop-templates/content.php index 389fb33..3c0cb80 100644 --- a/loop-templates/content.php +++ b/loop-templates/content.php @@ -5,6 +5,9 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} ?>
id="post-"> diff --git a/page-templates/blank.php b/page-templates/blank.php index 1fe7a83..42210d3 100644 --- a/page-templates/blank.php +++ b/page-templates/blank.php @@ -7,6 +7,9 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} ?> > diff --git a/page-templates/both-sidebarspage.php b/page-templates/both-sidebarspage.php index eee340a..954be68 100644 --- a/page-templates/both-sidebarspage.php +++ b/page-templates/both-sidebarspage.php @@ -7,6 +7,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + get_header(); $container = get_theme_mod( 'understrap_container_type' ); ?> diff --git a/page-templates/empty.php b/page-templates/empty.php index da8f39e..2c11ff1 100644 --- a/page-templates/empty.php +++ b/page-templates/empty.php @@ -8,6 +8,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + get_header(); while ( have_posts() ) : the_post(); diff --git a/page-templates/fullwidthpage.php b/page-templates/fullwidthpage.php index 0f55bca..a028f6a 100644 --- a/page-templates/fullwidthpage.php +++ b/page-templates/fullwidthpage.php @@ -7,6 +7,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + get_header(); $container = get_theme_mod( 'understrap_container_type' ); ?> diff --git a/page-templates/left-sidebarpage.php b/page-templates/left-sidebarpage.php index 187592c..5b99dd1 100644 --- a/page-templates/left-sidebarpage.php +++ b/page-templates/left-sidebarpage.php @@ -7,6 +7,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + get_header(); $container = get_theme_mod( 'understrap_container_type' ); ?> diff --git a/page-templates/right-sidebarpage.php b/page-templates/right-sidebarpage.php index 6d4b8fc..bcd949e 100644 --- a/page-templates/right-sidebarpage.php +++ b/page-templates/right-sidebarpage.php @@ -7,6 +7,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + get_header(); $container = get_theme_mod( 'understrap_container_type' ); ?> diff --git a/page.php b/page.php index b721fe8..b7f0486 100644 --- a/page.php +++ b/page.php @@ -10,6 +10,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + get_header(); $container = get_theme_mod( 'understrap_container_type' ); diff --git a/search.php b/search.php index 536702d..09fe863 100644 --- a/search.php +++ b/search.php @@ -5,6 +5,10 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + get_header(); $container = get_theme_mod( 'understrap_container_type' ); diff --git a/searchform.php b/searchform.php index 48f8304..657e612 100644 --- a/searchform.php +++ b/searchform.php @@ -5,7 +5,11 @@ * @package understrap */ +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} ?> +