/libs/lib-bootstrap.php

  1. <?php 
  2.  
  3. // define custom path to wp-load.php (usually not necessary) 
  4. $path = ''; 
  5.  
  6. // bootstrap for getting ABSPATH constant to wp-load.php outside the admin screen 
  7. if ( ! defined( 'WP_LOAD_PATH' ) ) { 
  8. $classic_root = dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) ) . '/'; 
  9. if ( file_exists( $classic_root . 'wp-load.php' ) ) { 
  10. define( 'WP_LOAD_PATH', $classic_root ); 
  11. } else { 
  12. if ( file_exists( $path . 'wp-load.php' ) ) { 
  13. define( 'WP_LOAD_PATH', $path ); 
  14.  
  15. // standardize current working directory 
  16. @chdir( WP_LOAD_PATH );  
  17. } else { 
  18. exit( 'Could not find wp-load.php' ); 
  19.  
  20. // load wp-load.php 
  21. require_once( WP_LOAD_PATH . 'wp-load.php' ); 
  22.  
  23. ?> 
.