diff --git a/src/wp-includes/class-IXR.php b/src/wp-includes/class-IXR.php index 0cd72df20e895..35657c7c7378f 100644 --- a/src/wp-includes/class-IXR.php +++ b/src/wp-includes/class-IXR.php @@ -39,6 +39,11 @@ * @license http://www.opensource.org/licenses/bsd-license.php BSD */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + require_once ABSPATH . WPINC . '/IXR/class-IXR-server.php'; require_once ABSPATH . WPINC . '/IXR/class-IXR-base64.php'; diff --git a/src/wp-includes/class-wp-customize-control.php b/src/wp-includes/class-wp-customize-control.php index 048c2afaf0c06..c85322fd9114b 100644 --- a/src/wp-includes/class-wp-customize-control.php +++ b/src/wp-includes/class-wp-customize-control.php @@ -7,6 +7,11 @@ * @since 3.4.0 */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + /** * Customize Control class. * diff --git a/src/wp-includes/class-wp-customize-panel.php b/src/wp-includes/class-wp-customize-panel.php index ec15ac8e665e2..4f2cb05b3c362 100644 --- a/src/wp-includes/class-wp-customize-panel.php +++ b/src/wp-includes/class-wp-customize-panel.php @@ -7,6 +7,11 @@ * @since 4.0.0 */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + /** * Customize Panel class. * diff --git a/src/wp-includes/class-wp-customize-setting.php b/src/wp-includes/class-wp-customize-setting.php index 99d0d2e51f199..95f6b26972682 100644 --- a/src/wp-includes/class-wp-customize-setting.php +++ b/src/wp-includes/class-wp-customize-setting.php @@ -7,6 +7,11 @@ * @since 3.4.0 */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + /** * Customize Setting class. * diff --git a/src/wp-includes/class-wp-http.php b/src/wp-includes/class-wp-http.php index fde0f4355de12..d901b1abde7d5 100644 --- a/src/wp-includes/class-wp-http.php +++ b/src/wp-includes/class-wp-http.php @@ -7,6 +7,11 @@ * @since 2.7.0 */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + if ( ! class_exists( 'WpOrg\Requests\Autoload' ) ) { require ABSPATH . WPINC . '/Requests/src/Autoload.php'; diff --git a/src/wp-includes/class-wp-simplepie-sanitize-kses.php b/src/wp-includes/class-wp-simplepie-sanitize-kses.php index d45df1c3e8156..9f0a2279f9647 100644 --- a/src/wp-includes/class-wp-simplepie-sanitize-kses.php +++ b/src/wp-includes/class-wp-simplepie-sanitize-kses.php @@ -7,6 +7,11 @@ * @since 4.7.0 */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + /** * Core class used to implement SimplePie feed sanitization. * diff --git a/src/wp-includes/class-wp-text-diff-renderer-table.php b/src/wp-includes/class-wp-text-diff-renderer-table.php index 4fa3d414d2401..25272265e261b 100644 --- a/src/wp-includes/class-wp-text-diff-renderer-table.php +++ b/src/wp-includes/class-wp-text-diff-renderer-table.php @@ -7,6 +7,11 @@ * @since 4.7.0 */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + /** * Table renderer to display the diff lines. * diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index 575e8a91758f1..0468797ee236c 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -23,6 +23,11 @@ * @package WordPress */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + // Strip, trim, kses, special chars for string saves. foreach ( array( 'pre_term_name', 'pre_comment_author_name', 'pre_link_name', 'pre_link_target', 'pre_link_rel', 'pre_user_display_name', 'pre_user_first_name', 'pre_user_last_name', 'pre_user_nickname' ) as $filter ) { add_filter( $filter, 'sanitize_text_field' ); diff --git a/src/wp-includes/default-widgets.php b/src/wp-includes/default-widgets.php index f8f3c4d141535..cbb25de8f0a4e 100644 --- a/src/wp-includes/default-widgets.php +++ b/src/wp-includes/default-widgets.php @@ -7,6 +7,11 @@ * @since 2.8.0 */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + /** WP_Widget_Pages class */ require_once ABSPATH . WPINC . '/widgets/class-wp-widget-pages.php'; diff --git a/src/wp-includes/feed-atom.php b/src/wp-includes/feed-atom.php index e9e3f49528065..9ee70f895a4c9 100644 --- a/src/wp-includes/feed-atom.php +++ b/src/wp-includes/feed-atom.php @@ -5,6 +5,11 @@ * @package WordPress */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + header( 'Content-Type: ' . feed_content_type( 'atom' ) . '; charset=' . get_option( 'blog_charset' ), true ); $more = 1; diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 7e46dd53cab2d..6e1d97677d03c 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -5,6 +5,11 @@ * @package WordPress */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + require ABSPATH . WPINC . '/option.php'; /** diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index 2f280a58790c9..805691ad93e70 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -6,6 +6,11 @@ * @subpackage Media */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + /** * Retrieves additional image sizes. * diff --git a/src/wp-includes/ms-blogs.php b/src/wp-includes/ms-blogs.php index 724c4ad7d2255..0be865fd87f13 100644 --- a/src/wp-includes/ms-blogs.php +++ b/src/wp-includes/ms-blogs.php @@ -8,6 +8,11 @@ * @since MU (3.0.0) */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + require_once ABSPATH . WPINC . '/ms-site.php'; require_once ABSPATH . WPINC . '/ms-network.php'; diff --git a/src/wp-includes/ms-settings.php b/src/wp-includes/ms-settings.php index 27dc1337f5fd0..c665da17e3aeb 100644 --- a/src/wp-includes/ms-settings.php +++ b/src/wp-includes/ms-settings.php @@ -10,6 +10,11 @@ * @since 3.0.0 */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + /** * Objects representing the current network and current site. * diff --git a/src/wp-includes/nav-menu-template.php b/src/wp-includes/nav-menu-template.php index 860efa92d3377..d90fdfa8061ab 100644 --- a/src/wp-includes/nav-menu-template.php +++ b/src/wp-includes/nav-menu-template.php @@ -7,6 +7,11 @@ * @since 3.0.0 */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + /** Walker_Nav_Menu class */ require_once ABSPATH . WPINC . '/class-walker-nav-menu.php'; diff --git a/src/wp-includes/update.php b/src/wp-includes/update.php index 572f7ee4c6bc0..8dba379ad31de 100644 --- a/src/wp-includes/update.php +++ b/src/wp-includes/update.php @@ -6,6 +6,11 @@ * @since 2.3.0 */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + /** * Checks WordPress version against the newest version. * diff --git a/src/wp-includes/vars.php b/src/wp-includes/vars.php index b719b48d2e87f..22496330c33ff 100644 --- a/src/wp-includes/vars.php +++ b/src/wp-includes/vars.php @@ -15,6 +15,11 @@ * @package WordPress */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + global $pagenow, $is_lynx, $is_gecko, $is_winIE, $is_macIE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $is_IE, $is_edge, $is_apache, $is_IIS, $is_iis7, $is_nginx, $is_caddy; diff --git a/src/wp-includes/wp-diff.php b/src/wp-includes/wp-diff.php index 4f4c2c6a159e1..e99a001ecb233 100644 --- a/src/wp-includes/wp-diff.php +++ b/src/wp-includes/wp-diff.php @@ -8,6 +8,11 @@ * @subpackage Diff */ +// Don't load directly. +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + if ( ! class_exists( 'Text_Diff', false ) ) { /** Text_Diff class */ require ABSPATH . WPINC . '/Text/Diff.php';