diff --git a/modules/feature-readingtime.php b/modules/feature-readingtime.php index 85deeeb..1ad4174 100644 --- a/modules/feature-readingtime.php +++ b/modules/feature-readingtime.php @@ -26,7 +26,12 @@ register_module([ $insert = "{$reading_time[0]} minute read"; // TODO: Create a canonical way to insert something just below the header - this might be tough though 'cause the that isn't handled by the page_renderer though - $parts["{content}"] = str_replace("", "
$insert
", $parts["{content}"]); + $replace_count = 1; // Without a temp variable we get "only variables can be passed by reference", ref PHP 7.4.6 + $parts["{content}"] = str_replace( + "", "$insert
", + $parts["{content}"], + $replace_count + ); }); } ]);