| 1 |
import { addFilter, applyFilters } from '@wordpress/hooks'; |
| 2 |
|
| 3 |
const aiPageTours = { |
| 4 |
'plugin-install.php': 'plugin-install-tour', |
| 5 |
'plugins.php': 'plugin-management-tour', |
| 6 |
'post-new.php?post_type=page': 'page-editor-tour', |
| 7 |
'post-new.php?post_type=post': 'library-tour', |
| 8 |
'users.php': 'users-screen-tour', |
| 9 |
'admin.php?page=extendify-assist': 'site-assistant-tour', |
| 10 |
}; |
| 11 |
|
| 12 |
addFilter( |
| 13 |
'extendify.ai-agent-suggestion-tours', |
| 14 |
'extendify/ai-agent-extra-tours', |
| 15 |
(aiPageTours) => { |
| 16 |
if (!window.extSharedData?.showAIPageCreation) return aiPageTours; |
| 17 |
return { |
| 18 |
...aiPageTours, |
| 19 |
'post-new.php?post_type=page': 'page-creator-tour', |
| 20 |
}; |
| 21 |
}, |
| 22 |
); |
| 23 |
|
| 24 |
export default applyFilters('extendify.ai-agent-suggestion-tours', aiPageTours); |
| 25 |
|