why would ABSPATH not get defined
why would ABSPATH not get defined
why would ABSPATH not get defined
You can access the blog ID you are on by global $blog_id; and then you can use that how you want it to work.
You can’t alter a constant once it is defined. That is how PHP works. Don’t fight it. The good news is that you should not be using a constant at all. Use options. // get your value // the second parameter is the default $enable_paypal = get_option(‘enable_paypal’,true); // set your value based on, I assume, … Read more
You should not put any defines in the end of the wp_config.php it is actually explicitly stated in it 😉 Every define you add should be above the line saying /* That’s all, stop editing! Happy blogging. */ Anything after that will have impact only after wordpress had finished to process the request
You can read up the source code of theme.php where get_stylesheet_directory_uri() is defined, inside you’ll see a str_replace() wich is consuming additional resources on each request. The best way to avoid this is to define a variable or constant that contains the path. In that case it is only called once. https://core.trac.wordpress.org/browser/tags/4.3.1/src/wp-includes/theme.php#L0
Defining constants on the global scope instead of using WordPress hooks, the first plugin loaded (See answer linked by Kero) will get the chance to define the constant. However, you could use some of the API hooks in your plugin, the earliest one possible is plugins_loaded, and then you can set priorities for the callbacks … Read more
These are not PHP global variables, they are constants that cannot be modified(hence the name). Trying to redefine them, using a define() will trigger a notice since they are already defined(and consequently keep the initial value assigned). To stay away from notices, you should check if they have been defined() before. Example: define(‘VARIABLE’, ‘hello’); define(‘VARIABLE’, … Read more
URL for images folder on Multisite
How can I change the language of automated Mails?
This appeared to be the result of (what I assume) was the User Role Editor plugin being updated, and then directly affecting the wp_user_role field on the options table of the database, which somehow led to DISALLOW_FILE_EDIT being ignored. I had to take several steps to fix this, as there were custom user roles I … Read more