如何在Wordpress插件之前定义常量

I have the plugin which have constant defined, i will call this plugin PLUGIN A:

if ( ! defined('BLA')){
    define('BLA', 'http://google.com); 
}

I want to make another plugin PLUGIN B which will define constant BLA before PLUGIN A. Is that possible? I guess Wordpress needs to read PLUGIN B before PLUGIN A, but in which order Wordpress is reading plugins?

WordPress loads plugins in a specific order. I found this question/answer here on Stackoverflow: https://wordpress.stackexchange.com/questions/63141/in-what-order-does-wordpress-load-plugin-files

So, the order is:

  1. Must-use plugins (plugins in the optional mu-plugins folder)
  2. If you're running a multisite installation, it checks for plugins that are network-activated and loads those.
  3. Then it checks for all other active plugins by looking at the active_plugins entry of the wp_options database table, and loops through those. The plugins will be listed alphabetically.

Hope this helps!