Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/learn/fields/header-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Field::make( 'header_scripts', 'crb_header_scripts', __( 'Header Scripts' ) )
Set what hook the field should use. Default is `wp_head`.

```php
Field::make( 'text', 'crb_phone', __( 'Phone' ) )
Field::make( 'header_scripts', 'crb_header_scripts', __( 'Header Scripts' ) )
->set_hook_name( 'wp_print_scripts' );
```

Expand All @@ -26,7 +26,7 @@ Field::make( 'text', 'crb_phone', __( 'Phone' ) )
Set what priority the hook should use. Default is 10.

```php
Field::make( 'text', 'crb_phone', __( 'Phone' ) )
Field::make( 'header_scripts', 'crb_header_scripts', __( 'Header Scripts' ) )
->set_hook_priority( 11 );
```

Expand All @@ -35,6 +35,6 @@ Field::make( 'text', 'crb_phone', __( 'Phone' ) )
Shorthand for both `set_hook_name()` and `set_hook_priority()`.

```php
Field::make( 'text', 'crb_phone', __( 'Phone' ) )
Field::make( 'header_scripts', 'crb_header_scripts', __( 'Header Scripts' ) )
->set_hook( 'wp_print_scripts', 11 );
```