| 1 |
import { hasPageCreatorEnabled } from '@help-center/lib/utils'; |
| 2 |
import libraryTour from '@help-center/tours/library-tour'; |
| 3 |
import pageCreator from '@help-center/tours/page-creator'; |
| 4 |
import pageEditor from '@help-center/tours/page-editor'; |
| 5 |
import pluginInstall from '@help-center/tours/plugin-install'; |
| 6 |
import pluginManagement from '@help-center/tours/plugin-management'; |
| 7 |
import siteAssistant from '@help-center/tours/site-assistant'; |
| 8 |
// import styleEditor from '@help-center/tours/style-editor.js'; |
| 9 |
import usersScreen from '@help-center/tours/users-screen.js'; |
| 10 |
import welcomeTour from '@help-center/tours/welcome.js'; |
| 11 |
import { addFilter, applyFilters } from '@wordpress/hooks'; |
| 12 |
|
| 13 |
const tours = { |
| 14 |
'welcome-tour': welcomeTour, |
| 15 |
'plugin-install-tour': pluginInstall, |
| 16 |
'plugin-management-tour': pluginManagement, |
| 17 |
'page-editor-tour': pageEditor, |
| 18 |
'library-tour': libraryTour, |
| 19 |
// 'style-editor-tour': styleEditor, |
| 20 |
'users-screen-tour': usersScreen, |
| 21 |
'site-assistant-tour': siteAssistant, |
| 22 |
}; |
| 23 |
|
| 24 |
addFilter('extendify.tours', 'extendify/extra-tours', (tours) => { |
| 25 |
if (!hasPageCreatorEnabled) return tours; |
| 26 |
return { ...tours, 'page-creator-tour': pageCreator }; |
| 27 |
}); |
| 28 |
|
| 29 |
export default applyFilters('extendify.tours', tours); |
| 30 |
|