Plugins: Restric direct access to Hello Dolly PHP file.

This changeset restricts direct access call to `/wp-content/plugins/hello.php`, and removes the "Uncaught exception Error" warning that shows when `WP_DEBUG` is enabled and when accessing the related file directly.

Props deepakrohilla, SergeyBiryukov, szepeviktor, audrasjb.
Fixes #61214.


Built from https://develop.svn.wordpress.org/trunk@59943


git-svn-id: http://core.svn.wordpress.org/trunk@59285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2025-03-06 00:18:28 +00:00
parent fbc4151874
commit ac459cf688
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,11 @@ Version: 1.7.2
Author URI: http://ma.tt/
*/
// Do not load directly.
if ( ! defined( 'ABSPATH' ) ) {
die();
}
function hello_dolly_get_lyric() {
/** These are the lyrics to Hello Dolly */
$lyrics = "Hello, Dolly

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-beta1-59942';
$wp_version = '6.8-beta1-59943';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.