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
No related branches found
No related tags found
1 merge request!1WIP: Initial release
......@@ -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