widgetWindow.ts
23 lines
| 1 | /** |
| 2 | * @since 3.13.0 |
| 3 | */ |
| 4 | |
| 5 | type windowData = { |
| 6 | apiRoot: string; |
| 7 | apiNonce: string; |
| 8 | banner: { |
| 9 | id: string; |
| 10 | header: string; |
| 11 | actionText: string; |
| 12 | actionUrl: string; |
| 13 | }; |
| 14 | }; |
| 15 | |
| 16 | declare const window: { |
| 17 | giveReportsWidget: windowData; |
| 18 | } & Window; |
| 19 | |
| 20 | export function getWidgetWindowData(): windowData { |
| 21 | return window.giveReportsWidget; |
| 22 | } |
| 23 |