~mfru/wp-blue-infinity-blocker

7280a9f2ba4d5277b27d24acf604d5684627864c — Max Frühschütz 2 years ago 1968b49
avoid echoing variables
1 files changed, 7 insertions(+), 8 deletions(-)

M blue-infinity-blocker.php
M blue-infinity-blocker.php => blue-infinity-blocker.php +7 -8
@@ 33,17 33,17 @@
add_action('wp_head', 'blb_fake_tracker_available');
function blb_fake_tracker_available()  {
	// Let Meta think that their tracker is already installed
	$fake_tracker_1 = '<span id="iab-pcm-sdk"></span>';
	$fake_tracker_2 = '<span id="iab-autofill-sdk"></span>';

	echo $fake_tracker_1 . $fake_tracker_2;
}
	?> 
	
	<span id="iab-pcm-sdk"></span>
	<span id="iab-autofill-sdk"></span>
 <?php }

add_action('wp_footer', 'blb_stop_text_selection');
function blb_stop_text_selection() {
	// prevents Meta from tracking selected text
?>

	$block_text_selection_script = '
<script defer>
const originalEventListener = document.addEventListener
document.addEventListener = function(a, b) {


@@ 54,5 54,4 @@ document.addEventListener = function(a, b) {
}
</script>';

	echo $block_text_selection_script;
}
\ No newline at end of file
<?php }
\ No newline at end of file