From 9f86429a1252b45c95b7c62fbaa1b82de3723997 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 05 Jan 2026 18:16:07 +0000
Subject: [PATCH] =Complete TaxonomySelector.js and TaxonomyCreator.js refactor
---
inc/helpers/legacy.php | 114 +++++++++++++++++++++++++++++----------------------------
1 files changed, 58 insertions(+), 56 deletions(-)
diff --git a/inc/helpers/legacy.php b/inc/helpers/legacy.php
index 5e97337..79377ab 100644
--- a/inc/helpers/legacy.php
+++ b/inc/helpers/legacy.php
@@ -8,61 +8,63 @@
* Outputs a random link to Legacy Tattoo Removal
* @return string
*/
-if (!function_exists('jvbRandomFooterText')) {
- function jvbRandomFooterText():string
- {
- $aOpen = '<a href="https://legacytattooremoval.ca" title="Learn more about Legacy Tattoo Removal">';
- $options = array(
- [
- 'text' => 'Built with ♡ by '.$aOpen.'your friendly neighbourhood laser nerds</a>.',
- 'weight' => 25
- ],
- [
- 'text' => 'Built with ♡ by your friends at '.$aOpen.'Legacy Tattoo Removal</a>.',
- 'weight' => 15
- ],
- [
- 'text' => 'Your friendly '.$aOpen.'Edmonton tattoo removal</a> crew.',
- 'weight' => 15
- ],
- [
- 'text' => $aOpen.'tattoo removal with ♡</a>',
- 'weight' => 15
- ],
- [
- 'text' => 'From '.$aOpen.'cover ups to fresh starts</a> - we\'re the laser nerds with ♡.',
- 'weight' => 10
- ],
- [
- 'text' => $aOpen.'See the difference at Legacy Tattoo Removal</a>',
- 'weight' => 10
- ],
- [
- 'text' => 'Make space for your next tattoo at '.$aOpen.'Legacy Tattoo Removal</a>.',
- 'weight' => 10
- ],
- [
- 'text' => $aOpen.'We\'re your artist\'s secret weapon</a>.',
- 'weight' => 15
- ]
- );
- $totalWeight = 0;
- foreach ($options as $option) {
- $totalWeight += (int)$option['weight'];
- }
-
- $randomNumber = mt_rand(1, $totalWeight);
- $weightSum = 0;
-
- foreach ($options as $option) {
- $weightSum += (int)$option['weight'];
- if ($randomNumber <= $weightSum) {
- return '<p>'.$option['text'].'</p>';
- }
- }
-
- return '<p>'.$options[0]['text'].'</p>';
- }
+function jvbRandomFooterText():string
+{
+ $privacy = get_privacy_policy_url();
+ $privacy = ($privacy === '') ? '' : ' | <a href="'.$privacy.'">Privacy Policy</a>';
+ return apply_filters('jvbRandomFooterText', '<p class="font-small">©'.date('Y').' <a href="'.get_home_url().'">'.get_bloginfo('name').'</a>'.$privacy.'</p><p class="font-small">Built with ♡ by <a href="https://jakevan.ca">Jake Van</a></p>');
+//
+// $aOpen = '<a href="https://legacytattooremoval.ca" title="Learn more about Legacy Tattoo Removal">';
+// $options = array(
+// [
+// 'text' => 'Built with ♡ by '.$aOpen.'your friendly neighbourhood laser nerds</a>.',
+// 'weight' => 25
+// ],
+// [
+// 'text' => 'Built with ♡ by your friends at '.$aOpen.'Legacy Tattoo Removal</a>.',
+// 'weight' => 15
+// ],
+// [
+// 'text' => 'Your friendly '.$aOpen.'Edmonton tattoo removal</a> crew.',
+// 'weight' => 15
+// ],
+// [
+// 'text' => $aOpen.'tattoo removal with ♡</a>',
+// 'weight' => 15
+// ],
+// [
+// 'text' => 'From '.$aOpen.'cover ups to fresh starts</a> - we\'re the laser nerds with ♡.',
+// 'weight' => 10
+// ],
+// [
+// 'text' => $aOpen.'See the difference at Legacy Tattoo Removal</a>',
+// 'weight' => 10
+// ],
+// [
+// 'text' => 'Make space for your next tattoo at '.$aOpen.'Legacy Tattoo Removal</a>.',
+// 'weight' => 10
+// ],
+// [
+// 'text' => $aOpen.'We\'re your artist\'s secret weapon</a>.',
+// 'weight' => 15
+// ]
+// );
+//
+// $totalWeight = 0;
+// foreach ($options as $option) {
+// $totalWeight += (int)$option['weight'];
+// }
+//
+// $randomNumber = mt_rand(1, $totalWeight);
+// $weightSum = 0;
+//
+// foreach ($options as $option) {
+// $weightSum += (int)$option['weight'];
+// if ($randomNumber <= $weightSum) {
+// return '<p>'.$option['text'].'</p>';
+// }
+// }
+//
+// return '<p>'.$options[0]['text'].'</p>';
}
-
--
Gitblit v1.10.0