diff --git a/INSTALLATION.md b/INSTALLATION.md index 279e7df6..e30e2967 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -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. diff --git a/author.php b/author.php index 7a477f1c..aa6a2349 100644 --- a/author.php +++ b/author.php @@ -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(); diff --git a/functions.php b/functions.php index e02dde49..6f17a250 100644 --- a/functions.php +++ b/functions.php @@ -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 // =============================================================================