BSF_Analytics::__construct( array $args, string $analytics_path, float $analytics_version )
Setup actions, load files.
Description
Parameters
- $args
-
(array) (Required) entity data for analytics.
- $analytics_path
-
(string) (Required) directory path to analytics library.
- $analytics_version
-
(float) (Required) analytics library version.
Source
File: admin/bsf-analytics/class-bsf-analytics.php
public function __construct( $args, $analytics_path, $analytics_version ) { // Bail when no analytics entities are registered. if ( empty( $args ) ) { return; } $this->entities = $args; define( 'BSF_ANALYTICS_VERSION', $analytics_version ); define( 'BSF_ANALYTICS_URI', $this->get_analytics_url( $analytics_path ) ); add_action( 'admin_init', array( $this, 'handle_optin_optout' ) ); add_action( 'admin_init', array( $this, 'option_notice' ) ); add_action( 'init', array( $this, 'maybe_track_analytics' ), 99 ); $this->set_actions(); add_action( 'admin_init', array( $this, 'register_usage_tracking_setting' ) ); $this->includes(); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |