Add FICTIONEER_ENABLE_ALL_AUTHOR_PROFILES
This commit is contained in:
parent
431966fc00
commit
f80278b459
@ -1579,4 +1579,5 @@ define( 'CONSTANT_NAME', value );
|
||||
| FICTIONEER_ENABLE_ASYNC_ONLOAD_PATTERN | boolean | Whether the [onload pattern](https://www.filamentgroup.com/lab/load-css-simpler/) for asynchronous CSS loading is used. Default `true`.
|
||||
| FICTIONEER_SHOW_LATEST_CHAPTERS_ON_STORY_CARDS | boolean | Whether to show the latest instead of the first chapters on story cards. Default `false`.
|
||||
| FICTIONEER_LIST_SCHEDULED_CHAPTERS | boolean | Whether to show scheduled chapters in lists. Default `false`.
|
||||
| FICTIONEER_ENABLE_ALL_AUTHOR_PROFILES | boolean | Whether to enable all author profile pages. Default `false`.
|
||||
| FICTIONEER_EXAMPLE_CHAPTER_ICONS | array | Collection of example Font Awesome icon class strings.
|
||||
|
@ -15,8 +15,11 @@ $author = get_userdata( $author_id );
|
||||
|
||||
// Return home if not a valid author
|
||||
if (
|
||||
! fictioneer_is_author( $author_id ) ||
|
||||
count_user_posts( $author_id, ['fcn_story', 'fcn_chapter'] ) < 1
|
||||
! FICTIONEER_ENABLE_ALL_AUTHOR_PROFILES &&
|
||||
(
|
||||
! fictioneer_is_author( $author_id ) ||
|
||||
count_user_posts( $author_id, ['fcn_story', 'fcn_chapter'] ) < 1
|
||||
)
|
||||
) {
|
||||
wp_redirect( home_url() );
|
||||
exit();
|
||||
|
@ -444,6 +444,11 @@ if ( ! defined( 'FICTIONEER_LIST_SCHEDULED_CHAPTERS' ) ) {
|
||||
define( 'FICTIONEER_LIST_SCHEDULED_CHAPTERS', false );
|
||||
}
|
||||
|
||||
// Boolean: Whether to enable all author profile pages
|
||||
if ( ! defined( 'FICTIONEER_ENABLE_ALL_AUTHOR_PROFILES' ) ) {
|
||||
define( 'FICTIONEER_ENABLE_ALL_AUTHOR_PROFILES', false );
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// GLOBAL
|
||||
// =============================================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user