src/Modules/Logger.php
public function send_log() {
		$environment                    = array();
		$theme                          = wp_get_theme();
		$environment['theme']           = array();
		$environment['theme']['name']   = $theme->get( 'Name' );
		$environment['theme']['author'] = $theme->get( 'Author' );
		$environment['plugins']         = get_option( 'active_plugins' );
		global $wp_version;
		wp_remote_post(
			self::TRACKING_ENDPOINT,
			array(
				'method'      => 'POST',
				'timeout'     => 3,
				'redirection' => 5,
				'headers'     => array(
					'X-ThemeIsle-Event' => 'log_site',
				),
				'body'        => array(
					'site'        => get_site_url(),
					'slug'        => $this->product->get_slug(),
					'version'     => $this->product->get_version(),
					'wp_version'  => $wp_version,
					'data'        => apply_filters( $this->product->get_key() . '_logger_data', array() ),
					'environment' => $environment,
					'license'     => apply_filters( $this->product->get_key() . '_license_status', '' ),
				),
			)
		);
	}
public function send_log() {
		$environment                    = array();
		$theme                          = wp_get_theme();
		$environment['theme']           = array();
		$environment['theme']['name']   = $theme->get( 'Name' );
		$environment['theme']['author'] = $theme->get( 'Author' );
		$environment['plugins']         = get_option( 'active_plugins' );
		global $wp_version;
		wp_remote_post(
			self::TRACKING_ENDPOINT,
			array(
				'method'      => 'POST',
				'timeout'     => 3,
				'redirection' => 5,
				'headers'     => array(
					'X-ThemeIsle-Event' => 'log_site',
				),
				'body'        => array(
					'site'        => get_site_url(),
					'slug'        => $this->product->get_slug(),
					'version'     => $this->product->get_version(),
					'wp_version'  => $wp_version,
					'data'        => apply_filters( $this->product->get_key() . '_logger_data', array() ),
					'environment' => $environment,
					'license'     => apply_filters( $this->product->get_key() . '_license_status', '' ),
				),
			)
		);
	}
public function send_log ( ) { $ environment = array ( ) ; $ theme = wp_get_theme ( ) ; $ environment [ 'theme' ] = array ( ) ; $ environment [ 'theme' ] [ 'name' ] = $ theme -> get ( 'Name' ) ; $ environment [ 'theme' ] [ 'author' ] = $ theme -> get ( 'Author' ) ; $ environment [ 'plugins' ] = get_option ( 'active_plugins' ) ; global $ wp_version ; wp_remote_post ( self :: TRACKING_ENDPOINT , array ( 'method' => 'POST' , 'timeout' => 3 , 'redirection' => 5 , 'headers' => array ( 'X-ThemeIsle-Event' => 'log_site' , ) , 'body' => array ( 'site' => get_site_url ( ) , 'slug' => $ this -> product -> get_slug ( ) , 'version' => $ this -> product -> get_version ( ) , 'wp_version' => $ wp_version , 'data' => apply_filters ( $ this -> product -> get_key ( ) . '_logger_data' , array ( ) ) , 'environment' => $ environment , 'license' => apply_filters ( $ this -> product -> get_key ( ) . '_license_status' , '' ) , ) , ) ) ; }
Send the statistics to the api endpoint.
Send the statistics to the api endpoint .