fix a race condition (#501)
This commit is contained in:
parent
cd6061a472
commit
1ef984da6c
1 changed files with 13 additions and 17 deletions
|
@ -23,7 +23,6 @@ require_once __DIR__ . '/includes/functions.php';
|
|||
/**
|
||||
* Initialize the plugin constants.
|
||||
*/
|
||||
function define_constants() {
|
||||
\defined( 'ACTIVITYPUB_REST_NAMESPACE' ) || \define( 'ACTIVITYPUB_REST_NAMESPACE', 'activitypub/1.0' );
|
||||
\defined( 'ACTIVITYPUB_EXCERPT_LENGTH' ) || \define( 'ACTIVITYPUB_EXCERPT_LENGTH', 400 );
|
||||
\defined( 'ACTIVITYPUB_SHOW_PLUGIN_RECOMMENDATIONS' ) || \define( 'ACTIVITYPUB_SHOW_PLUGIN_RECOMMENDATIONS', true );
|
||||
|
@ -38,7 +37,6 @@ function define_constants() {
|
|||
\define( 'ACTIVITYPUB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
||||
\define( 'ACTIVITYPUB_PLUGIN_FILE', plugin_dir_path( __FILE__ ) . '/' . basename( __FILE__ ) );
|
||||
\define( 'ACTIVITYPUB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize REST routes.
|
||||
|
@ -64,8 +62,6 @@ function rest_init() {
|
|||
* Initialize plugin.
|
||||
*/
|
||||
function plugin_init() {
|
||||
define_constants();
|
||||
|
||||
\add_action( 'init', array( __NAMESPACE__ . '\Migration', 'init' ) );
|
||||
\add_action( 'init', array( __NAMESPACE__ . '\Activitypub', 'init' ) );
|
||||
\add_action( 'init', array( __NAMESPACE__ . '\Activity_Dispatcher', 'init' ) );
|
||||
|
|
Loading…
Reference in a new issue