HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/class-scorecard-scrolldepth.php.tar
includes/gutenberg/site-insights/templates/scorecard/class-scorecard-scrolldepth.php000064400000002242151552665450047133 0ustar00var/www/vhosts/uyarreklam.com.tr/httpdocs/wp-content/plugins/google-analytics-for-wordpress<?php
/**
 * Class that handles the output for the Scroll Depth scorecard.
 *
 * Class MonsterInsights_SiteInsights_Template_Scorecard_Scrolldepth
 */
class MonsterInsights_SiteInsights_Template_Scorecard_Scrolldepth extends MonsterInsights_SiteInsights_Metric_Template {

	protected $metric = 'scrolldepth';

	protected $type = 'scorecard';

	public function output(){
		$value = $this->get_options();

		if ( empty($value) ) {
			return null;
		}

		$format = '<div class="monsterinsights-scorecard-simple-card">
			<div class="monsterinsights-scorecard-simple-card-value">%2$s</div>
			<div class="monsterinsights-scorecard-simple-card-label">%1$s</div>
		</div>';

		return sprintf(
			$format,
			__( 'Average Scroll Depth', 'google-analytics-for-wordpress' ),
			$value . '%'
		);
	}

	/**
	 * Returns data needed for this block.
	 *
	 * @return array|false
	 */
	protected function get_options() {
		if ( !isset($this->data['scroll']) || empty($this->data['scroll']['average'])) {
			return false;
		}

		$primaryColor = $this->attributes['primaryColor'];
		$secondaryColor = $this->attributes['secondaryColor'];

		$data = $this->data['scroll'];

		return $data['average'];
	}
}