feat(configuration): #64 add configuration to disable plausible.io calls

Closes: #64
This commit is contained in:
grandeljay 2023-03-12 11:50:51 +01:00
parent 642b3f4a98
commit c5dd5be571
3 changed files with 39 additions and 6 deletions

View file

@ -376,12 +376,14 @@ class Page
} }
/** plausible */ /** plausible */
?> if (defined('PLAUSIBLE') && true === PLAUSIBLE) {
<script defer ?>
data-domain="<?= $_SERVER['HTTP_HOST'] ?>" <script defer
src="https://plausible.io/js/plausible.js"> data-domain="<?= $_SERVER['HTTP_HOST'] ?>"
</script> src="https://plausible.io/js/plausible.js">
<?php </script>
<?php
}
/** AdSense */ /** AdSense */
$wishthis_hosts = array( $wishthis_hosts = array(

View file

@ -44,3 +44,10 @@ define(
), ),
) )
); );
/**
* plausible
*
* Whether to make calls to plausible.io.
*/
define('PLAUSIBLE', false);

View file

@ -23,6 +23,7 @@ $page->navigation();
<div class="four wide column"> <div class="four wide column">
<div class="ui vertical pointing fluid menu profile"> <div class="ui vertical pointing fluid menu profile">
<a class="item" data-tab="roadmap"><?= __('Roadmap') ?></a> <a class="item" data-tab="roadmap"><?= __('Roadmap') ?></a>
<a class="item" data-tab="1-1-0"><?= __('1.1.0') ?></a>
<a class="item" data-tab="1-0-0"><?= __('1.0.0') ?></a> <a class="item" data-tab="1-0-0"><?= __('1.0.0') ?></a>
<a class="item" data-tab="0-7-3"><?= __('0.7.3') ?></a> <a class="item" data-tab="0-7-3"><?= __('0.7.3') ?></a>
<a class="item" data-tab="0-7-2"><?= __('0.7.2') ?></a> <a class="item" data-tab="0-7-2"><?= __('0.7.2') ?></a>
@ -99,6 +100,29 @@ $page->navigation();
</div> </div>
</div> </div>
<div class="ui tab" data-tab="1-1-0">
<div class="ui segments">
<div class="ui segment">
<h2 class="ui header"><?= __('1.1.0') ?></h2>
</div>
<div class="ui segment">
<h3 class="ui header"><?= __('Added') ?></h3>
<ul>
<li>
<?php
/** TRANSLATORS: Changelog: Added */
echo __('Configuration flag to disable plausible.io calls');
?>
<a href="https://github.com/grandeljay/wishthis/issues/64" target="_blank">#64</a>
</li>
</ul>
</div>
</div>
</div>
<div class="ui tab" data-tab="1-0-0"> <div class="ui tab" data-tab="1-0-0">
<div class="ui segments"> <div class="ui segments">