| 1 |
import { __ } from '@wordpress/i18n'; |
| 2 |
|
| 3 |
export default { |
| 4 |
id: 'add-to-menu', |
| 5 |
follows: ['update-post-status'], |
| 6 |
// translators: Title of a card in the AI Agent chat, shown after the user published a page or post. |
| 7 |
title: __('Add it to your menu', 'extendify-local'), |
| 8 |
// translators: Body of a card in the AI Agent chat, shown after the user published a page or post. |
| 9 |
body: __( |
| 10 |
'Now that it is published, add it to your site menu so visitors can find it.', |
| 11 |
'extendify-local', |
| 12 |
), |
| 13 |
action: { |
| 14 |
// translators: Button on a card in the AI Agent chat that asks the agent to add the published page or post to the site menu. |
| 15 |
label: __('Add to menu', 'extendify-local'), |
| 16 |
// select-block has no example, so find-agent routes this message. |
| 17 |
// translators: Shown in the AI Agent chat as the user's own request, sent when they click the "Add to menu" button. |
| 18 |
message: __('Add this to the menu', 'extendify-local'), |
| 19 |
}, |
| 20 |
// The publish confirm writes the new status into the context. |
| 21 |
score: ({ context }) => (context?.postStatus === 'publish' ? 1 : 0), |
| 22 |
}; |
| 23 |
|