updated user info shortcode to output author page and format date
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user