' . esc_html__('Get Premium', 'wp-statistics') . '',
'' . esc_html__('Settings', 'wp-statistics') . '',
'' . esc_html__('Docs', 'wp-statistics') . '',
];
return array_merge($customLinks, $links);
}
/**
* Modifies the list of allowed protocols.
*
* @param array $protocols The list of allowed protocols.
*/
public function updateAllowedProtocols($defaultProtocols)
{
$customProtocols = [
'android-app'
];
$customProtocols = apply_filters('wp_statistics_allowed_protocols', $customProtocols);
return array_merge($defaultProtocols, $customProtocols);
}
/**
* Proxies requested asset files through PHP to serve them securely.
*
* @return void
*/
public function serveObfuscatedAsset()
{
$assetNameObfuscator = new AssetNameObfuscator();
$dynamicAssetKey = $assetNameObfuscator->getDynamicAssetKey();
if (isset($_GET[$dynamicAssetKey])) {
$asset = sanitize_text_field($_GET[$dynamicAssetKey]);
$assetNameObfuscator->serveAssetByHash($asset);
}
}
}