Note that there are some explanatory texts on larger screens.

plurals
  1. POWordpress wp-load.php
    primarykey
    data
    text
    <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>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload