Guest User

Untitled

a guest
Nov 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. /**
  3. * Silence is golden, but I actually want people to view the website.
  4. */
  5. if ( ! defined( 'ABSPATH' ) ) {
  6. // Call dirname() 4 times as this file is in '/wp-contents/plugins/plugin-dir/' and wp-content.php is in '/'
  7. require_once dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/wp-config.php';
  8. // Permanent redirect home.
  9. wp_safe_redirect( home_url(), 301 );
  10. die;
  11. }
  12.  
  13. define( 'ABSPATH', $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/YOUR_PLUGIN_DIR/' );
  14. require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-config.php' );
Add Comment
Please, Sign In to add comment