v 0.1.4.2 temporary deactivate anchors
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user