updated user info shortcode to output author page and format date

This commit is contained in:
asus
2024-03-07 14:51:10 +01:00
parent b8fbd84d53
commit 60f46265c2
6 changed files with 189 additions and 23 deletions

View File

@@ -3,18 +3,20 @@
function restrict_author_page_CIPF() {
$can_access = false;
if (is_author())
$can_access = true;
else if (current_user_can('administrator'))
$can_access = true;
else if (current_user_can('editor'))
$can_access = true;
if ($can_access === false)
if (!is_author())
return;
$can_access = false;
if (current_user_can('administrator')) {
$can_access = true;
}
else if (current_user_can('editor')) {
$can_access = true;
}
if ($can_access === true)
return;
global $post;
$author_id = get_the_author_meta( 'ID' );
$current_user_id = get_current_user_id();