From cabee4db30752a7933bd25b15cf7ec80480ddbe0 Mon Sep 17 00:00:00 2001 From: asus Date: Tue, 19 Mar 2024 07:11:45 +0100 Subject: [PATCH] v 0.1.4.2 temporary deactivate anchors --- plugins/custer/change_id.php | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/plugins/custer/change_id.php b/plugins/custer/change_id.php index 14295e5..a29462f 100644 --- a/plugins/custer/change_id.php +++ b/plugins/custer/change_id.php @@ -18,10 +18,12 @@ if (!defined('ABSPATH')) { * -> there is no sens in forcing the logged_in, because it's already the default * * [custer_author_id] -> give current user the id of author -* [custer_author_id set_anchor='anchor_name'] -> create anchor for author user -* [custer_author_id anchor='anchor_name'] -> give current user the id stored in the anchor_name * [custer_author_id off] -> reset to logged_in * +* ! anchors not workink for the moment +* //[custer_author_id set_anchor='anchor_name'] -> create anchor for author user +* //[custer_author_id anchor='anchor_name'] -> give current user the id stored in the anchor_name +* */ function shortcode_author_id($options) { $anchor_name = ''; @@ -39,25 +41,25 @@ function shortcode_author_id($options) { } if (isset($options['set_anchor'])) { $option = 'author'; - $is_set_anchor = true; - $anchor_name = $options['set_anchor']; - if (empty($anchor_name)) { - return; - } +// $is_set_anchor = true; +// $anchor_name = $options['set_anchor']; +// if (empty($anchor_name)) { +// return; +// } unset($options['set_anchor']); } if (isset($options['anchor'])) { - if ($is_set_anchor) { - return; - } - $option = 'anchor'; - $anchor_name = $options['anchor']; - if (empty($anchor_name)) { - return; - } +// if ($is_set_anchor) { +// return; +// } +// $option = 'anchor'; +// $anchor_name = $options['anchor']; +// if (empty($anchor_name)) { +// return; +// } unset($options['anchor']); } - if (in_array('off', $options)) { + if (is_array($options) && in_array('off', $options)) { $option = 'off'; }