title: Wordpress wp-load.php
body: <p>I'm trying to reverse-engineer a plugin : <a href="http://wordpress.org/extend/plugins/wordpress-social-login/">http://wordpress.org/extend/plugins/wordpress-social-login/</a></p>
  
  <p>In a part of it, there's this line:<br>
  (I'm having a hard time understanding the first one, the rest are simply there for reference if they have something to do it.)</p>
  
  <pre><code>require_once( dirname( dirname( dirname( dirname( __FILE__ )))) . '/wp-load.php' );
  
  define( 'WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL', plugins_url() . '/' . basename( dirname( __FILE__ ) ) ); 
  define( 'WORDPRESS_SOCIAL_LOGIN_HYBRIDAUTH_ENDPOINT_URL', WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL . '/hybridauth/' ); 
  </code></pre>
  
  <p>My question is... what exactly is in this <code>wp-load.php</code> file that it needs to be required by the code? By looking at it, all I understand is that it loads crucial core wordpress files for the site to be running correctly (<code>functions.php</code>, <code>wp-settings.php</code>, <code>wp-config.php</code> etc...)<br>
  Doesn't the fact that the plugin runs already means <code>wp-load.php</code> is loaded?<br>
  Also it's a complete waste of resources since it includes so many files that may include other files as well and it's like an endless loop of required files, each within another, which are being loaded twice.. (or even more if other plugins use this kind of method too)</p>
  
  <p>So what exactly does it do?</p>
  
  <p>P.S; All I found by Google-ing is HOW to include it correctly (since paths are change-able) - but that's not my problem/question.</p>