Skip to content
Snippets Groups Projects
Commit 1387f972 authored by Erick Hitter's avatar Erick Hitter
Browse files

Improve how plugin is conditionally loaded

parent 3bc7439b
Branches
No related tags found
1 merge request!1WIP: Initial release
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
......@@ -61,11 +61,18 @@ class ETH_AMP_Analytics_WP {
private $options = null;
/**
* Register actions and filters
* Defer plugin action loading until all plugins are loaded
*
* @return null
*/
private function __construct() {
add_action( 'plugins_loaded', array( $this, 'action_plugins_loaded' ) );
}
/**
* Register actions and filters
*/
public function action_plugins_loaded() {
if ( ! defined( 'AMP__FILE__' ) ) {
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment