Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 83ce35b

Browse files
committed
Make it easier to extend base types
1 parent a700b6c commit 83ce35b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • packages/core-data/src/restrictions

packages/core-data/src/restrictions/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ export type EditorId = 'new' | number | undefined;
4646
* @see /includes/functions/install.php:get_default_restriction_settings()
4747
*/
4848
export interface RestrictionSettings {
49-
userStatus: 'logged_in' | 'logged_out';
49+
userStatus: 'logged_in' | 'logged_out' | string;
5050
roleMatch: 'any' | 'match' | 'exclude';
5151
userRoles: string[];
5252
protectionMethod: 'redirect' | 'replace' | string;
5353
redirectType: 'login' | 'home' | 'custom';
5454
redirectUrl: string;
55-
replacementType: 'page' | 'message';
55+
replacementType: 'page' | 'message' | 'wp_block' | string;
5656
replacementPage?: number;
5757
archiveHandling:
5858
| 'filter_post_content'
@@ -80,6 +80,7 @@ export interface BaseRestriction {
8080
settings: RestrictionSettings;
8181
[ key: string ]: any;
8282
}
83+
8384
export interface Restriction extends BaseRestriction {
8485
id: number;
8586
title: string;

0 commit comments

Comments
 (0)