How many files are in the WordPress core
My question is ... what exactly is in this file that the code needs?
All core functions of WordPress. This includes the design files, all files of the active plugins, etc., BUTWhen loading WordPress, the requested URL is not parsed and the WordPress query is not executed (by initializing the WP object nor the WP_Query objects).
All I understand is that it loads important core wordpress files in order for the website to run correctly (,, etc ...).
Yes, you got it right.
Doesn't that mean that the plugin is already running, that wp-load.php is loaded?
If the plugin code was called by WordPress (e.g. to display an administration page or was included in the originally loaded plugin file), this means that it has already been loaded.
However, sometimes plugins direct requests to individual files (for example) and not to a WordPress powered site (for example or).
Notice how the first URL points to a specific file in the plugins directory, and the second URL is directed to the home page of the website with a query argument added. In the third example, the referenced file is in the directory - here is a special file that makes it easy for plugins to make AJAX requests (this file also loads the WordPress core and triggers some action hooks).
In the case of the first reference, if the plugin wants to use some WordPress features (for referencing the database, editing posts, etc.) it has to load the core WordPress files by including.
It's also a complete waste of resources as it has so many files in it that other files can, and it's like an infinite loop of required files that each load twice (or even more if other plugins are using this.) of method too)
Notice the -part in - this tells PHP to use the file only to be included if not already included. Therefore, there are no conflicts and PHP does not use too much memory. Although - if you are in a context in which WordPress has already started, you should not call the function.
Basically, the author of the plugin expects some requirements to be placed on the plugin file in which you found this code. Since the author wants to use the WordPress functionality in this file, he calls the file to load the core functions.
I'm assuming this is done to reduce server load, although with a couple of hooks running on the action code and a custom parameter added to the home url, the result should still be pretty close.
I personally prefer the second option, but as I said, with becomes prevents WordPress from performing complex operations (URL analysis and database queries).
If there's anything else you don't fully understand, post a comment here and I'll try to explain further.
- What are the API keys used for?
- Why is everyone left on Quora
- Why doesn't my eyes go away
- Difference between orbit and orbitals 1
- How Mortgage Lenders Check Employment
- When is it okay to pray?
- What are the biggest misunderstandings about cafeteria
- Where's Mithila
- Why are premarital relationships increasing in India
- How do I fix a car
- Should I see the Serbian film
- Word games are grammatically incorrect
- We should pay attention to our intuition
- Can I learn to skateboard in one day?
- How do I buy Sovaldi 400mg online
- Where is the best view in Hungary
- What is a net electrical charge
- Are polyphenols in essential oils
- What is India's rank in coal production
- Do people have a religious instinct?
- Why is the Mendeleev Periodic Table useful
- Who named Game of Thrones
- What does cervix mean in anatomy
- Whick Bank launched their first ATM machine
- As a Christian, Jesus is evil
- Offers Discover a 16-digit card
- Is banana good for pregnancy
- Which trains run 24 hours
- Which subject is easy in a BSc?
- How does cyclothymia affect relationships
- How Jackson Pollock became famous
- What are the limits of a monarchy
- What are indicators of a market crash