| 1 |
<?php |
| 2 |
// Borrowed from Google Doc Embedder |
| 3 |
// http://wordpress.org/plugins/google-document-embedder/ |
| 4 |
|
| 5 |
// define custom path to wp-load.php (usually not necessary) |
| 6 |
$path = ''; |
| 7 |
|
| 8 |
// bootstrap for getting ABSPATH constant to wp-load.php outside the admin screen |
| 9 |
if ( ! defined('WP_LOAD_PATH') ) { |
| 10 |
$classic_root = dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) ) . '/'; |
| 11 |
if ( file_exists( $classic_root . 'wp-load.php' ) ) { |
| 12 |
define('WP_LOAD_PATH', $classic_root); |
| 13 |
} else { |
| 14 |
if ( file_exists( $path . 'wp-load.php' ) ) { |
| 15 |
define('WP_LOAD_PATH', $path); |
| 16 |
} else { |
| 17 |
exit( 'Could not find wp-load.php' ); |
| 18 |
} |
| 19 |
} |
| 20 |
} |
| 21 |
|
| 22 |
// load wp-load.php |
| 23 |
require_once( WP_LOAD_PATH . 'wp-load.php' ); |
| 24 |
|
| 25 |
define( 'DG_PERM_ERROR', '<p>'.__('You do not have sufficient permissions to access this page.').'</p>' ); |
| 26 |
|
| 27 |
?> |