fix: prevent duplicate theme toggle
Co-authored-by: rafa <rcalvotorrejon@gmail.com> Signed-off-by: rafa <rcalvotorrejon@gmail.com>
This commit is contained in:
@@ -240,6 +240,10 @@ add_action('wp_footer', function () {
|
||||
?>
|
||||
<script>
|
||||
(function() {
|
||||
// El footer puede renderizarse más de una vez en algunos templates FSE.
|
||||
// Evitamos crear un segundo toggle en ese caso.
|
||||
if (document.getElementById('fea-theme-btn')) return;
|
||||
|
||||
var btn = document.createElement('button');
|
||||
btn.id = 'fea-theme-btn';
|
||||
btn.type = 'button';
|
||||
|
||||
Reference in New Issue
Block a user