You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: v5/extension-seo.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ The SEO extension comes with several hooks.
82
82
4. Filter - `typerocket_seo_post_types` - Used to control which post types have the SEO meta box.
83
83
6. Filter - `typerocket_seo_url` - Used to control the URL used for OG.
84
84
85
-
### tr_seo_post_types
85
+
### typerocket_seo_post_types
86
86
87
87
If you want to control what post types the meta box is added too, you can use the `typerocket_seo_post_types` filter hook. Only post types added will have the meta box added.
If you want to add fields to the SEO metabox, you will also want to display them on each page. You can use the `typerocket_seo_meta` action hook to output new meta.
Copy file name to clipboardExpand all lines: v5/wordpress-hooks.md
+35-7Lines changed: 35 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,23 +7,29 @@ Description: Extend and hook into TypeRocket with actions and filters.
7
7
8
8
TypeRocket comes with several hooks to help you extend its core functionality. Not all the hooks are listed here.
9
9
10
-
## Core Loaded
10
+
## Actions
11
11
12
-
The `typerocket_loaded` hook runs during `after_setup_theme`, after TypeRocket core has loaded, and before the TypeRocket registry runs.
12
+
### typerocket_loaded
13
13
14
-
This hook allows WordPress plugins to interact with TypeRocket.
14
+
The `typerocket_loaded` hook runs during `after_setup_theme`, after TypeRocket core has loaded, and before the TypeRocket registry runs. This hook allows WordPress plugins to interact with TypeRocket.
15
15
16
16
```php
17
17
add_action('typerocket_loaded', function() {
18
18
// do stuff
19
19
});
20
20
```
21
21
22
+
### typerocket_before_load
23
+
22
24
You can also use `typerocket_before_load` if you want to run code before the TypeRocket system is loaded.
23
25
24
-
! **Note**: If you are creating plugins that interact with TypeRocket you will want to install TypeRocket as an MU plugin.
26
+
```php
27
+
add_action('typerocket_before_load', function() {
28
+
// do stuff
29
+
});
30
+
```
25
31
26
-
##Models
32
+
### typerocket_model
27
33
28
34
The `typerocket_model` action hook runs after a model is constructed.
0 commit comments