PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.5
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / introductions / readme.md

readme.md in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.5, at src/introductions/readme.md

28 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # Introductions
2
3 Is for showing introductions to a user, on Yoast admin pages.
4 Based on plugin version, page, user capabilities and whether the user has seen it already.
5
6 - `Introduction_Interface` defines what data is needed
7 - `id` as unique identifier
8 - `plugin` and `version` to determine if the introduction is new (version > plugin version)
9 - `pages` to be able to only show on certain Yoast admin pages
10 - `capabilities` to be able to only show for certain users
11 - `Introductions_Collector` uses that data to determine whether an introduction should be "shown" to a user
12 - uses the `wpseo_introductions` filter to be extendable from our other plugins
13 - uses `Introductions_Seen_Repository` to get the data to determine if the user saw an introduction already
14 - `Introductions_Seen_Repository` is the doorway whether a user has seen an introduction or not
15 - uses the `_yoast_introductions` user metadata
16 - `Introduction_Bucket` and `Introduction_Item` are used by the collector to get an array
17 - `Introductions_Integration` runs on the Yoast Admin pages and loads the assets
18 - only loads on our Yoast admin pages, but never on our installation success pages as to not disturb onboarding
19 - only loads assets if there is an introduction to show
20 - `js/src/introductions` holds the JS
21 - `wpseoIntroductions` is the localized script to transfer data from PHP to JS
22 - `css/src/ai-generator.css` holds the CSS
23
24 Inside JS, register the modal content via `window.YoastSEO._registerIntroductionComponent`, which takes a
25 `id` and a `Component`. The id needs to be the same as the id in the `Introduction_Interface`.
26 The action `yoast.introductions.ready` can be used to know whether the registration function is available and ready for
27 use.
28