Fix author access for scheduled chapters
This commit is contained in:
parent
b5450f695c
commit
da1b854353
@ -1721,8 +1721,9 @@ function fictioneer_redirect_scheduled_chapter_404() {
|
||||
if ( isset( $wp_query->query_vars['p'] ) && ( $wp_query->query_vars['post_type'] ?? 0 ) === 'fcn_chapter' ) {
|
||||
$post_id = absint( $wp_query->query_vars['p'] );
|
||||
$user_id = get_current_user_id();
|
||||
$author_id = (int) get_post_field( 'post_author', $post_id );
|
||||
|
||||
if ( $user_id && $user_id === get_post_field( 'post_author', $post_id ) ) {
|
||||
if ( $user_id && $user_id === $author_id ) {
|
||||
return; // Default behavior
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user