From 62493ff4defeaa54f0b7c7a93fbeea03009cbb3f Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:44:50 -0600 Subject: [PATCH 1/3] Prevent direct access to files --- .../boost-core/src/lib/class-wpcom-boost-api-client.php | 4 ++++ .../boost-speed-score/src/class-speed-score-request.php | 4 ++++ projects/packages/classic-theme-helper/src/class-main.php | 4 ++++ .../class-jetpack-testimonial-title-control.php | 4 ++++ .../packages/classic-theme-helper/src/site-breadcrumbs.php | 4 ++++ .../src/features/admin/external-media-import.php | 4 ++++ projects/packages/image-cdn/src/compatibility/activitypub.php | 4 ++++ .../masterbar/src/admin-menu/class-domain-only-admin-menu.php | 4 ++++ projects/packages/masterbar/src/admin-menu/load.php | 4 ++++ .../additional-css/class-css-nudge-customize-control.php | 4 ++++ projects/packages/masterbar/src/profile-edit/bootstrap.php | 4 ++++ projects/packages/masterbar/src/profile-edit/profile-edit.php | 4 ++++ projects/packages/masterbar/src/wp-posts-list/bootstrap.php | 4 ++++ projects/packages/protect-status/src/class-protect-status.php | 4 ++++ projects/packages/protect-status/src/class-scan-status.php | 4 ++++ projects/packages/videopress/src/utility-functions.php | 4 ++++ .../class-brute-force-protection-blocked-login-page.php | 4 ++++ .../extensions/blocks/sharing-buttons/sharing-buttons.php | 4 ++++ .../plugins/jetpack/extensions/blocks/top-posts/top-posts.php | 4 ++++ .../extended-blocks/videopress-video/videopress-video.php | 4 ++++ .../extensions/plugins/ai-content-lens/ai-content-lens.php | 4 ++++ 21 files changed, 84 insertions(+) diff --git a/projects/packages/boost-core/src/lib/class-wpcom-boost-api-client.php b/projects/packages/boost-core/src/lib/class-wpcom-boost-api-client.php index 0f13ab88fee4b..ebfb7b5a76e57 100644 --- a/projects/packages/boost-core/src/lib/class-wpcom-boost-api-client.php +++ b/projects/packages/boost-core/src/lib/class-wpcom-boost-api-client.php @@ -9,6 +9,10 @@ use Automattic\Jetpack\Boost_Core\Contracts\Boost_API_Client; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * A class that handles the Boost API client. * diff --git a/projects/packages/boost-speed-score/src/class-speed-score-request.php b/projects/packages/boost-speed-score/src/class-speed-score-request.php index a90ba3843240a..41042f112cde7 100644 --- a/projects/packages/boost-speed-score/src/class-speed-score-request.php +++ b/projects/packages/boost-speed-score/src/class-speed-score-request.php @@ -11,6 +11,10 @@ use Automattic\Jetpack\Boost_Core\Lib\Cacheable; use Automattic\Jetpack\Boost_Core\Lib\Url; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Class Speed_Score_Request */ diff --git a/projects/packages/classic-theme-helper/src/class-main.php b/projects/packages/classic-theme-helper/src/class-main.php index 9037e2ee01616..88c5e4fa3661f 100644 --- a/projects/packages/classic-theme-helper/src/class-main.php +++ b/projects/packages/classic-theme-helper/src/class-main.php @@ -9,6 +9,10 @@ use WP_Error; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Classic Theme Helper Loader. */ diff --git a/projects/packages/classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-title-control.php b/projects/packages/classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-title-control.php index 26fcae02562fe..0cbdf818ba9bf 100644 --- a/projects/packages/classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-title-control.php +++ b/projects/packages/classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-title-control.php @@ -7,6 +7,10 @@ namespace Automattic\Jetpack\Classic_Theme_Helper; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + if ( ! class_exists( __NAMESPACE__ . '\Jetpack_Testimonial_Title_Control' ) ) { /** * Extends the WP_Customize_Control class to clean the title parameter. diff --git a/projects/packages/classic-theme-helper/src/site-breadcrumbs.php b/projects/packages/classic-theme-helper/src/site-breadcrumbs.php index 655dafbb42af0..a0b243e2737a1 100644 --- a/projects/packages/classic-theme-helper/src/site-breadcrumbs.php +++ b/projects/packages/classic-theme-helper/src/site-breadcrumbs.php @@ -7,6 +7,10 @@ * @package automattic/jetpack-classic-theme-helper */ +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + $host = new Automattic\Jetpack\Status\Host(); if ( ! function_exists( 'jetpack_breadcrumbs' ) && ! $host->is_wpcom_simple() ) { /** diff --git a/projects/packages/external-media/src/features/admin/external-media-import.php b/projects/packages/external-media/src/features/admin/external-media-import.php index 89704ebd4dd78..69bfcfa1c7110 100644 --- a/projects/packages/external-media/src/features/admin/external-media-import.php +++ b/projects/packages/external-media/src/features/admin/external-media-import.php @@ -12,6 +12,10 @@ use Automattic\Jetpack\Assets; use Automattic\Jetpack\Connection\Manager as Connection_Manager; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Whether the current user is connected to WordPress.com. */ diff --git a/projects/packages/image-cdn/src/compatibility/activitypub.php b/projects/packages/image-cdn/src/compatibility/activitypub.php index 5f90a6be97b3e..a9e3f26a2aada 100644 --- a/projects/packages/image-cdn/src/compatibility/activitypub.php +++ b/projects/packages/image-cdn/src/compatibility/activitypub.php @@ -11,6 +11,10 @@ use Automattic\Jetpack\Image_CDN\Image_CDN; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Hook the compatibility functions into ActivityPub filters if necessary. * diff --git a/projects/packages/masterbar/src/admin-menu/class-domain-only-admin-menu.php b/projects/packages/masterbar/src/admin-menu/class-domain-only-admin-menu.php index 74adedef84605..37d488e1da5e0 100644 --- a/projects/packages/masterbar/src/admin-menu/class-domain-only-admin-menu.php +++ b/projects/packages/masterbar/src/admin-menu/class-domain-only-admin-menu.php @@ -7,6 +7,10 @@ namespace Automattic\Jetpack\Masterbar; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Class Domain_Only_Admin_Menu. */ diff --git a/projects/packages/masterbar/src/admin-menu/load.php b/projects/packages/masterbar/src/admin-menu/load.php index 2dbcfd7116db4..4d330e47a6de0 100644 --- a/projects/packages/masterbar/src/admin-menu/load.php +++ b/projects/packages/masterbar/src/admin-menu/load.php @@ -11,6 +11,10 @@ use Automattic\Jetpack\Status\Host; use Automattic\Jetpack\Tracking; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Checks whether the navigation customizations should be performed for the given class. * diff --git a/projects/packages/masterbar/src/nudges/additional-css/class-css-nudge-customize-control.php b/projects/packages/masterbar/src/nudges/additional-css/class-css-nudge-customize-control.php index f5d4acad169d8..811d547d47251 100644 --- a/projects/packages/masterbar/src/nudges/additional-css/class-css-nudge-customize-control.php +++ b/projects/packages/masterbar/src/nudges/additional-css/class-css-nudge-customize-control.php @@ -8,6 +8,10 @@ namespace Automattic\Jetpack\Masterbar; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Class CSS_Nudge_Customize_Control */ diff --git a/projects/packages/masterbar/src/profile-edit/bootstrap.php b/projects/packages/masterbar/src/profile-edit/bootstrap.php index 46ecee1904b85..ab78f3b3d6f30 100644 --- a/projects/packages/masterbar/src/profile-edit/bootstrap.php +++ b/projects/packages/masterbar/src/profile-edit/bootstrap.php @@ -9,6 +9,10 @@ use Automattic\Jetpack\Connection\Manager as Connection_Manager; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + require_once __DIR__ . '/class-wpcom-user-profile-fields-revert.php'; /** diff --git a/projects/packages/masterbar/src/profile-edit/profile-edit.php b/projects/packages/masterbar/src/profile-edit/profile-edit.php index 005c31c4dfaf4..c5ce02293eed9 100644 --- a/projects/packages/masterbar/src/profile-edit/profile-edit.php +++ b/projects/packages/masterbar/src/profile-edit/profile-edit.php @@ -10,6 +10,10 @@ use Automattic\Jetpack\Connection\Manager as Connection_Manager; use WP_User; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Hides profile fields for WordPress.com connected users. * diff --git a/projects/packages/masterbar/src/wp-posts-list/bootstrap.php b/projects/packages/masterbar/src/wp-posts-list/bootstrap.php index ffdd4c6ce2384..ebd3a7f293efd 100644 --- a/projects/packages/masterbar/src/wp-posts-list/bootstrap.php +++ b/projects/packages/masterbar/src/wp-posts-list/bootstrap.php @@ -7,6 +7,10 @@ namespace Automattic\Jetpack\Masterbar; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Load the Posts_List_Notification. */ diff --git a/projects/packages/protect-status/src/class-protect-status.php b/projects/packages/protect-status/src/class-protect-status.php index 08a64541a64cd..84603152e7631 100644 --- a/projects/packages/protect-status/src/class-protect-status.php +++ b/projects/packages/protect-status/src/class-protect-status.php @@ -20,6 +20,10 @@ use Jetpack_Options; use WP_Error; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Class that handles fetching and caching the Status of vulnerabilities check from the WPCOM servers */ diff --git a/projects/packages/protect-status/src/class-scan-status.php b/projects/packages/protect-status/src/class-scan-status.php index 13d8aa6f847df..a84f0da877a4c 100644 --- a/projects/packages/protect-status/src/class-scan-status.php +++ b/projects/packages/protect-status/src/class-scan-status.php @@ -19,6 +19,10 @@ use Jetpack_Options; use WP_Error; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Class that handles fetching of threats from the Scan API */ diff --git a/projects/packages/videopress/src/utility-functions.php b/projects/packages/videopress/src/utility-functions.php index be82d63c7c82f..d429c4b3e3ab3 100644 --- a/projects/packages/videopress/src/utility-functions.php +++ b/projects/packages/videopress/src/utility-functions.php @@ -2,6 +2,10 @@ use Automattic\Jetpack\Connection\Client; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + defined( 'VIDEOPRESS_MIN_WIDTH' ) || define( 'VIDEOPRESS_MIN_WIDTH', 60 ); defined( 'VIDEOPRESS_DEFAULT_WIDTH' ) || define( 'VIDEOPRESS_DEFAULT_WIDTH', 640 ); diff --git a/projects/packages/waf/src/brute-force-protection/class-brute-force-protection-blocked-login-page.php b/projects/packages/waf/src/brute-force-protection/class-brute-force-protection-blocked-login-page.php index 23b6344b28ce3..698b8be80088a 100644 --- a/projects/packages/waf/src/brute-force-protection/class-brute-force-protection-blocked-login-page.php +++ b/projects/packages/waf/src/brute-force-protection/class-brute-force-protection-blocked-login-page.php @@ -10,6 +10,10 @@ use Automattic\Jetpack\Redirect; use Automattic\Jetpack\Waf\Blocked_Login_Page; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Brute Force Protection Blocked Login Page class. */ diff --git a/projects/plugins/jetpack/extensions/blocks/sharing-buttons/sharing-buttons.php b/projects/plugins/jetpack/extensions/blocks/sharing-buttons/sharing-buttons.php index fd7325448314f..cdde22bdb0423 100644 --- a/projects/plugins/jetpack/extensions/blocks/sharing-buttons/sharing-buttons.php +++ b/projects/plugins/jetpack/extensions/blocks/sharing-buttons/sharing-buttons.php @@ -12,6 +12,10 @@ use Automattic\Jetpack\Blocks; use Automattic\Jetpack\Status\Request; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Registers the block for use in Gutenberg * This is done via an action so that we can disable diff --git a/projects/plugins/jetpack/extensions/blocks/top-posts/top-posts.php b/projects/plugins/jetpack/extensions/blocks/top-posts/top-posts.php index 06a51cadde61a..e4cbf2ce20d8d 100644 --- a/projects/plugins/jetpack/extensions/blocks/top-posts/top-posts.php +++ b/projects/plugins/jetpack/extensions/blocks/top-posts/top-posts.php @@ -18,6 +18,10 @@ use Jetpack_Gutenberg; use Jetpack_Top_Posts_Helper; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + if ( ! class_exists( 'Jetpack_Top_Posts_Helper' ) ) { require_once JETPACK__PLUGIN_DIR . '/_inc/lib/class-jetpack-top-posts-helper.php'; } diff --git a/projects/plugins/jetpack/extensions/extended-blocks/videopress-video/videopress-video.php b/projects/plugins/jetpack/extensions/extended-blocks/videopress-video/videopress-video.php index 876ba79716cc4..86c9d935ad128 100644 --- a/projects/plugins/jetpack/extensions/extended-blocks/videopress-video/videopress-video.php +++ b/projects/plugins/jetpack/extensions/extended-blocks/videopress-video/videopress-video.php @@ -9,6 +9,10 @@ use Automattic\Jetpack\VideoPress\Initializer as VideoPress_Pkg_Initializer; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + // Set the videopress/video block availability, depending on the site plan. add_action( 'jetpack_register_gutenberg_extensions', diff --git a/projects/plugins/jetpack/extensions/plugins/ai-content-lens/ai-content-lens.php b/projects/plugins/jetpack/extensions/plugins/ai-content-lens/ai-content-lens.php index 69b4b8589946a..03a966cb3c2c0 100644 --- a/projects/plugins/jetpack/extensions/plugins/ai-content-lens/ai-content-lens.php +++ b/projects/plugins/jetpack/extensions/plugins/ai-content-lens/ai-content-lens.php @@ -11,6 +11,10 @@ use Automattic\Jetpack\Status; use Automattic\Jetpack\Status\Host; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + // Feature name. const FEATURE_NAME = 'ai-content-lens'; From 1676544d8d6a76c7ccaeae2e996dea4fef5ceea2 Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:45:50 -0600 Subject: [PATCH 2/3] Add changelogs --- .../changelog/fix-jetpack-direct_access_fatals_part_9 | 5 +++++ .../changelog/fix-jetpack-direct_access_fatals_part_9 | 5 +++++ .../changelog/fix-jetpack-direct_access_fatals_part_9 | 5 +++++ .../changelog/fix-jetpack-direct_access_fatals_part_9 | 5 +++++ .../changelog/fix-jetpack-direct_access_fatals_part_9 | 5 +++++ .../changelog/fix-jetpack-direct_access_fatals_part_9 | 5 +++++ .../changelog/fix-jetpack-direct_access_fatals_part_9 | 5 +++++ .../changelog/fix-jetpack-direct_access_fatals_part_9 | 5 +++++ .../waf/changelog/fix-jetpack-direct_access_fatals_part_9 | 5 +++++ .../changelog/fix-jetpack-direct_access_fatals_part_9 | 5 +++++ 10 files changed, 50 insertions(+) create mode 100644 projects/packages/boost-core/changelog/fix-jetpack-direct_access_fatals_part_9 create mode 100644 projects/packages/boost-speed-score/changelog/fix-jetpack-direct_access_fatals_part_9 create mode 100644 projects/packages/classic-theme-helper/changelog/fix-jetpack-direct_access_fatals_part_9 create mode 100644 projects/packages/external-media/changelog/fix-jetpack-direct_access_fatals_part_9 create mode 100644 projects/packages/image-cdn/changelog/fix-jetpack-direct_access_fatals_part_9 create mode 100644 projects/packages/masterbar/changelog/fix-jetpack-direct_access_fatals_part_9 create mode 100644 projects/packages/protect-status/changelog/fix-jetpack-direct_access_fatals_part_9 create mode 100644 projects/packages/videopress/changelog/fix-jetpack-direct_access_fatals_part_9 create mode 100644 projects/packages/waf/changelog/fix-jetpack-direct_access_fatals_part_9 create mode 100644 projects/plugins/jetpack/changelog/fix-jetpack-direct_access_fatals_part_9 diff --git a/projects/packages/boost-core/changelog/fix-jetpack-direct_access_fatals_part_9 b/projects/packages/boost-core/changelog/fix-jetpack-direct_access_fatals_part_9 new file mode 100644 index 0000000000000..b01db6e0c4519 --- /dev/null +++ b/projects/packages/boost-core/changelog/fix-jetpack-direct_access_fatals_part_9 @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Prevent PHP errors by limiting direct access to files. + + diff --git a/projects/packages/boost-speed-score/changelog/fix-jetpack-direct_access_fatals_part_9 b/projects/packages/boost-speed-score/changelog/fix-jetpack-direct_access_fatals_part_9 new file mode 100644 index 0000000000000..b01db6e0c4519 --- /dev/null +++ b/projects/packages/boost-speed-score/changelog/fix-jetpack-direct_access_fatals_part_9 @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Prevent PHP errors by limiting direct access to files. + + diff --git a/projects/packages/classic-theme-helper/changelog/fix-jetpack-direct_access_fatals_part_9 b/projects/packages/classic-theme-helper/changelog/fix-jetpack-direct_access_fatals_part_9 new file mode 100644 index 0000000000000..b01db6e0c4519 --- /dev/null +++ b/projects/packages/classic-theme-helper/changelog/fix-jetpack-direct_access_fatals_part_9 @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Prevent PHP errors by limiting direct access to files. + + diff --git a/projects/packages/external-media/changelog/fix-jetpack-direct_access_fatals_part_9 b/projects/packages/external-media/changelog/fix-jetpack-direct_access_fatals_part_9 new file mode 100644 index 0000000000000..b01db6e0c4519 --- /dev/null +++ b/projects/packages/external-media/changelog/fix-jetpack-direct_access_fatals_part_9 @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Prevent PHP errors by limiting direct access to files. + + diff --git a/projects/packages/image-cdn/changelog/fix-jetpack-direct_access_fatals_part_9 b/projects/packages/image-cdn/changelog/fix-jetpack-direct_access_fatals_part_9 new file mode 100644 index 0000000000000..b01db6e0c4519 --- /dev/null +++ b/projects/packages/image-cdn/changelog/fix-jetpack-direct_access_fatals_part_9 @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Prevent PHP errors by limiting direct access to files. + + diff --git a/projects/packages/masterbar/changelog/fix-jetpack-direct_access_fatals_part_9 b/projects/packages/masterbar/changelog/fix-jetpack-direct_access_fatals_part_9 new file mode 100644 index 0000000000000..b01db6e0c4519 --- /dev/null +++ b/projects/packages/masterbar/changelog/fix-jetpack-direct_access_fatals_part_9 @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Prevent PHP errors by limiting direct access to files. + + diff --git a/projects/packages/protect-status/changelog/fix-jetpack-direct_access_fatals_part_9 b/projects/packages/protect-status/changelog/fix-jetpack-direct_access_fatals_part_9 new file mode 100644 index 0000000000000..b01db6e0c4519 --- /dev/null +++ b/projects/packages/protect-status/changelog/fix-jetpack-direct_access_fatals_part_9 @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Prevent PHP errors by limiting direct access to files. + + diff --git a/projects/packages/videopress/changelog/fix-jetpack-direct_access_fatals_part_9 b/projects/packages/videopress/changelog/fix-jetpack-direct_access_fatals_part_9 new file mode 100644 index 0000000000000..b01db6e0c4519 --- /dev/null +++ b/projects/packages/videopress/changelog/fix-jetpack-direct_access_fatals_part_9 @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Prevent PHP errors by limiting direct access to files. + + diff --git a/projects/packages/waf/changelog/fix-jetpack-direct_access_fatals_part_9 b/projects/packages/waf/changelog/fix-jetpack-direct_access_fatals_part_9 new file mode 100644 index 0000000000000..b01db6e0c4519 --- /dev/null +++ b/projects/packages/waf/changelog/fix-jetpack-direct_access_fatals_part_9 @@ -0,0 +1,5 @@ +Significance: patch +Type: fixed +Comment: Prevent PHP errors by limiting direct access to files. + + diff --git a/projects/plugins/jetpack/changelog/fix-jetpack-direct_access_fatals_part_9 b/projects/plugins/jetpack/changelog/fix-jetpack-direct_access_fatals_part_9 new file mode 100644 index 0000000000000..1582e22e97565 --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-jetpack-direct_access_fatals_part_9 @@ -0,0 +1,5 @@ +Significance: patch +Type: other +Comment: Prevent PHP errors by limiting direct access to files. + + From 38b4f4e7216ce482959cd274e46a8ff69d2dc6f7 Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Mon, 20 Oct 2025 06:42:50 -0600 Subject: [PATCH 3/3] Add a few more --- .../packages/classic-theme-helper/src/content-options.php | 4 ++++ .../classic-theme-helper/src/custom-content-types.php | 4 ++++ .../class-jetpack-testimonial-textarea-control.php | 4 ++++ projects/packages/classic-theme-helper/src/social-menu.php | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/projects/packages/classic-theme-helper/src/content-options.php b/projects/packages/classic-theme-helper/src/content-options.php index 8a14c3dc78912..4acc64a52c77c 100644 --- a/projects/packages/classic-theme-helper/src/content-options.php +++ b/projects/packages/classic-theme-helper/src/content-options.php @@ -6,6 +6,10 @@ * @package automattic/jetpack-classic-theme-helper */ +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + /** * Content Options. * diff --git a/projects/packages/classic-theme-helper/src/custom-content-types.php b/projects/packages/classic-theme-helper/src/custom-content-types.php index e088d7687df73..05c570906466e 100644 --- a/projects/packages/classic-theme-helper/src/custom-content-types.php +++ b/projects/packages/classic-theme-helper/src/custom-content-types.php @@ -18,6 +18,10 @@ use Automattic\Jetpack\Redirect; use Automattic\Jetpack\Status\Host; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + if ( ! function_exists( 'jetpack_load_custom_post_types' ) ) { /** * Load Portfolio, Testimonial, and Nova CPT. diff --git a/projects/packages/classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-textarea-control.php b/projects/packages/classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-textarea-control.php index 51fd2b5b603c6..0a0c7dc404e84 100644 --- a/projects/packages/classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-textarea-control.php +++ b/projects/packages/classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-textarea-control.php @@ -7,6 +7,10 @@ namespace Automattic\Jetpack\Classic_Theme_Helper; +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + if ( ! class_exists( __NAMESPACE__ . '\Jetpack_Testimonial_Textarea_Control' ) ) { /** * Extends the WP_Customize_Control class to clean the textarea content. diff --git a/projects/packages/classic-theme-helper/src/social-menu.php b/projects/packages/classic-theme-helper/src/social-menu.php index 2c3e6660ad7da..1d30264100676 100644 --- a/projects/packages/classic-theme-helper/src/social-menu.php +++ b/projects/packages/classic-theme-helper/src/social-menu.php @@ -11,6 +11,10 @@ * @package automattic/jetpack-classic-theme-helper */ +if ( ! defined( 'ABSPATH' ) ) { + exit( 0 ); +} + if ( ! function_exists( 'jetpack_social_menu_init' ) ) { /** * Activate the Social Menu plugin.