Make WordPress Core


Ignore:
Timestamp:
01/22/2025 02:04:34 PM (5 months ago)
Author:
audrasjb
Message:

General: Stop direct loading of files in /wp-admin that should only be included.

This changeset restricts direct access call in /wp-admin and its sub directories.

Follow-up to [11768].

Props deepakrohilla.
See #61314.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/admin-header.php

    r58997 r59678  
    66 * @subpackage Administration
    77 */
     8
     9// Don't load directly.
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( '-1' );
     12}
    813
    914header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
Note: See TracChangeset for help on using the changeset viewer.