Differences

This shows you the differences between two versions of the page.

Link to this comparison view

programmieren:wordpress:download_protection_file [2024/04/28 10:05] – created jgehrkeprogrammieren:wordpress:download_protection_file [2024/04/29 08:57] (current) jgehrke
Line 25: Line 25:
  Require WP Functions  Require WP Functions
 \* ========================================================= */ \* ========================================================= */
-$wp_bootstrap_path = 'wp-load.php'; // inside wp root folder, but can be placed anywhere +$wp_bootstrap_path = 'wp-load.php';
-$is_path_correct   = ( file_exists( $wp_bootstrap_path ) ) ? true : false; +
-if( !$is_path_correct ){ +
- echo "<p><strong>Error:</strong> Required File not found.</p>"; +
- exit; +
-}+
 define( 'WP_USE_THEMES', false );  define( 'WP_USE_THEMES', false ); 
 require_once $wp_bootstrap_path; require_once $wp_bootstrap_path;

Page Tools