Skip to content

Commit 2c7698a

Browse files
do not print snippet if fathom url option is empty
1 parent d3d4d2c commit 2c7698a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fathom-analytics.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@
2525
const FATHOM_OPTION_NAME = 'fathom_url';
2626

2727
function fathom_print_js_snippet() {
28-
$fathom_url = get_option( FATHOM_OPTION_NAME );
28+
$fathom_url = get_option( FATHOM_OPTION_NAME, '' );
29+
30+
// don't print snippet if fathom URL is empty
31+
if( empty( $fathom_url ) ) {
32+
return;
33+
}
2934

3035
// trim trailing slash
3136
$fathom_url = rtrim( $fathom_url, '/' );

0 commit comments

Comments
 (0)