twentyseventeen_scripts()
- Source
wp-content/themes/twentyseventeen/functions.php:449
Compatibility
- WordPress
- core
- PHP
- 7.4–8.6-dev
- 6.7.10
- 6.8.11
- 6.9.10
- 7.0.7
- 7.1.3
Present in every tracked release (6.7.10 to 7.1.3), and compiles on PHP 7.4 through 8.6-dev.
Performance profile
How much work a call to twentyseventeen_scripts() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.
- Cost class
- Heavy
- Scaling
- Constant
- Instructions
- 123–184
- Plugin surface
- None
- Called by
- 0
Reaches the database via get_post().
No loop in the body: the same number of instructions runs whatever you pass in.
Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 185.
Nothing here hands control to plugin code.
Nothing in core calls this; the cost is only what you spend yourself.
What it touches
- optionoption read or write
get_option()called directly - hookthird-party callbacks
apply_filters()one call below twentyseventeen_scripts() - querycontent query
get_post()one call below twentyseventeen_scripts() - cacheobject cache
wp_cache_get()one call below twentyseventeen_scripts() - serializeserialisation
maybe_unserialize()one call below twentyseventeen_scripts()
Further down the call graph this can also reach transient. That is the worst case, several calls deep and usually down an error path, not what a normal call pays.
What one call costs · 48 distinct outcomes
One number would be a lie: the work depends on which branch runs. These are every distinct cost twentyseventeen_scripts() can have, taken from its control-flow graph on PHP 8.5.
| When | Instructions | Calls it makes |
|---|---|---|
!is_customize_preview() && !has_nav_menu() && !is_singular() | 123–124 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
!is_customize_preview() && !has_nav_menu() && is_singular() && !comments_open() | 126–127 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
!is_customize_preview() && !has_nav_menu() && !is_singular() | 129–130 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
!is_customize_preview() && !has_nav_menu() && is_singular() && comments_open() && !get_option() | 130–131 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
!is_customize_preview() && !has_nav_menu() && is_singular() && !comments_open() | 132–133 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
!has_nav_menu() && !is_singular() | 132–133 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
!is_customize_preview() && !has_nav_menu() && is_singular() && comments_open() && get_option() | 133–134 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
!has_nav_menu() && is_singular() && !comments_open() | 135–136 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
!is_customize_preview() && !has_nav_menu() && is_singular() && comments_open() && !get_option() | 136–137 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
!has_nav_menu() && !is_singular() | 137–138 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
!is_customize_preview() && !has_nav_menu() && is_singular() && comments_open() && get_option() | 139–140 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
!has_nav_menu() && is_singular() && comments_open() && !get_option() | 139–140 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
36 further outcomes, up to 184 instructions
!has_nav_menu() && is_singular() && !comments_open() | 140–141 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
!has_nav_menu() && is_singular() && comments_open() && get_option() | 142–143 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
is_customize_preview() && !has_nav_menu() && !is_singular() | 143–144 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
!has_nav_menu() && is_singular() && comments_open() && !get_option() | 144–145 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
is_customize_preview() && !has_nav_menu() && is_singular() && !comments_open() | 146–147 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
is_customize_preview() && !has_nav_menu() && !is_singular() | 146–147 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
!has_nav_menu() && is_singular() && comments_open() && get_option() | 147–148 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
is_customize_preview() && !has_nav_menu() && is_singular() && !comments_open() | 149–150 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
!is_customize_preview() && has_nav_menu() && !is_singular() | 150–151 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
is_customize_preview() && !has_nav_menu() && is_singular() && comments_open() && !get_option() | 150–151 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
!is_customize_preview() && has_nav_menu() && is_singular() && !comments_open() | 153–154 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
is_customize_preview() && !has_nav_menu() && is_singular() && comments_open() && get_option() | 153–154 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
is_customize_preview() && !has_nav_menu() && is_singular() && comments_open() && !get_option() | 153–154 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
!is_customize_preview() && has_nav_menu() && !is_singular() | 156–157 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
is_customize_preview() && !has_nav_menu() && is_singular() && comments_open() && get_option() | 156–157 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
!is_customize_preview() && has_nav_menu() && is_singular() && comments_open() && !get_option() | 157–158 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
!is_customize_preview() && has_nav_menu() && is_singular() && !comments_open() | 159–160 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
has_nav_menu() && !is_singular() | 159–160 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
!is_customize_preview() && has_nav_menu() && is_singular() && comments_open() && get_option() | 160–161 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
has_nav_menu() && is_singular() && !comments_open() | 162–163 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
!is_customize_preview() && has_nav_menu() && is_singular() && comments_open() && !get_option() | 163–164 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
has_nav_menu() && !is_singular() | 164–165 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
!is_customize_preview() && has_nav_menu() && is_singular() && comments_open() && get_option() | 166–167 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
has_nav_menu() && is_singular() && comments_open() && !get_option() | 166–167 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
has_nav_menu() && is_singular() && !comments_open() | 167–168 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
has_nav_menu() && is_singular() && comments_open() && get_option() | 169–170 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
is_customize_preview() && has_nav_menu() && !is_singular() | 170–171 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
has_nav_menu() && is_singular() && comments_open() && !get_option() | 171–172 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
is_customize_preview() && has_nav_menu() && is_singular() && !comments_open() | 173–174 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
is_customize_preview() && has_nav_menu() && !is_singular() | 173–174 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular() |
has_nav_menu() && is_singular() && comments_open() && get_option() | 174–175 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
is_customize_preview() && has_nav_menu() && is_singular() && !comments_open() | 176–177 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open() |
is_customize_preview() && has_nav_menu() && is_singular() && comments_open() && !get_option() | 177–178 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
is_customize_preview() && has_nav_menu() && is_singular() && comments_open() && get_option() | 180–181 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
is_customize_preview() && has_nav_menu() && is_singular() && comments_open() && !get_option() | 180–181 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option() |
is_customize_preview() && has_nav_menu() && is_singular() && comments_open() && get_option() | 183–184 | twentyseventeen_fonts_url(), get_template_directory_uri(), twentyseventeen_fonts_url(), wp_enqueue_style(), get_stylesheet_uri(), wp_enqueue_style(), get_theme_file_uri(), wp_enqueue_style(), get_theme_mod(), is_customize_preview(), get_theme_file_uri(), wp_enqueue_style(), is_customize_preview(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_style(), wp_style_add_data(), get_theme_file_uri(), wp_register_script(), wp_script_add_data(), get_theme_file_uri(), wp_register_script(), get_theme_file_uri(), wp_enqueue_script(), twentyseventeen_get_svg(), has_nav_menu(), get_theme_file_uri(), wp_enqueue_script(), __(), __(), twentyseventeen_get_svg(), wp_localize_script(), get_theme_file_uri(), wp_enqueue_script(), is_singular(), comments_open(), get_option(), wp_enqueue_script() |
Across PHP versions
| PHP | Compiled | Executed | Branches | Notes |
|---|---|---|---|---|
| 8.6-dev | 185 | 123–184 | 8 | |
| 8.5 | 185 | 123–184 | 8 | |
| 8.4 | 185 | 123–184 | 8 | 3 fewer instructions than PHP 8.3 |
| 8.3 | 188 | 126–187 | 8 | |
| 8.2 | 188 | 126–187 | 8 | |
| 8.1 | 188 | 126–187 | 8 | |
| 7.4 | 188 | 126–187 | 8 |
An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.
Uses · 19
- twentyseventeen_fonts_url()Register custom fonts.
- get_template_directory_uri()Retrieves template directory URI for the active theme.
- wp_enqueue_style()Enqueues a CSS stylesheet.
- get_stylesheet_uri()Retrieves stylesheet URI for the active theme.
- get_theme_file_uri()Retrieves the URL of a file in the theme.
- get_theme_mod()Retrieves theme modification value for the active theme.
- is_customize_preview()Whether the site is being previewed in the Customizer.
- wp_register_style()Registers a CSS stylesheet.
- wp_style_add_data()Adds metadata to a CSS stylesheet.
- wp_register_script()Registers a new script.
- wp_script_add_data()Adds metadata to a script.
- wp_enqueue_script()Enqueues a script.
Show all 19
- twentyseventeen_get_svg()Return SVG markup.
- has_nav_menu()Determines whether a registered nav menu location has a menu assigned to it.
- __()Retrieves the translation of $text.
- wp_localize_script()Localizes a script.
- is_singular()Determines whether the query is for an existing single post of any post type (post, attachment, page, custom post types).
- comments_open()Determines whether the current post is open for comments.
- get_option()Retrieves an option value based on an option name.
Source code
function twentyseventeen_scripts() { // Add custom fonts, used in the main stylesheet. $font_version = ( 0 === strpos( (string) twentyseventeen_fonts_url(), get_template_directory_uri() . '/' ) ) ? '20230328' : null; wp_enqueue_style( 'twentyseventeen-fonts', twentyseventeen_fonts_url(), array(), $font_version ); // Theme stylesheet. wp_enqueue_style( 'twentyseventeen-style', get_stylesheet_uri(), array(), '20250415' ); // Theme block stylesheet. wp_enqueue_style( 'twentyseventeen-block-style', get_theme_file_uri( '/assets/css/blocks.css' ), array( 'twentyseventeen-style' ), '20240729' ); // Load the dark colorscheme. if ( 'dark' === get_theme_mod( 'colorscheme', 'light' ) || is_customize_preview() ) { wp_enqueue_style( 'twentyseventeen-colors-dark', get_theme_file_uri( '/assets/css/colors-dark.css' ), array( 'twentyseventeen-style' ), '20240412' ); } // Register the Internet Explorer 9 specific stylesheet, to fix display issues in the Customizer. if ( is_customize_preview() ) { wp_register_style( 'twentyseventeen-ie9', get_theme_file_uri( '/assets/css/ie9.css' ), array( 'twentyseventeen-style' ), '20161202' ); wp_style_add_data( 'twentyseventeen-ie9', 'conditional', 'IE 9' ); } // Register the Internet Explorer 8 specific stylesheet. wp_register_style( 'twentyseventeen-ie8', get_theme_file_uri( '/assets/css/ie8.css' ), array( 'twentyseventeen-style' ), '20161202' ); wp_style_add_data( 'twentyseventeen-ie8', 'conditional', 'lt IE 9' ); // Register the html5 shiv. wp_register_script( 'html5', get_theme_file_uri( '/assets/js/html5.js' ), array(), '20161020' ); wp_script_add_data( 'html5', 'conditional', 'lt IE 9' ); // Skip-link fix is no longer enqueued by default. wp_register_script( 'twentyseventeen-skip-link-focus-fix', get_theme_file_uri( '/assets/js/skip-link-focus-fix.js' ), array(), '20161114', array( 'in_footer' => true ) ); wp_enqueue_script( 'twentyseventeen-global', get_theme_file_uri( '/assets/js/global.js' ), array( 'jquery' ), '20211130', array( 'in_footer' => false, // Because involves header. 'strategy' => 'defer', ) ); $twentyseventeen_l10n = array( 'quote' => twentyseventeen_get_svg( array( 'icon' => 'quote-right' ) ), ); if ( has_nav_menu( 'top' ) ) { wp_enqueue_script( 'twentyseventeen-navigation', get_theme_file_uri( '/assets/js/navigation.js' ), array( 'jquery' ), '20210122', array( 'in_footer' => false, // Because involves header. 'strategy' => 'defer', ) ); $twentyseventeen_l10n['expand'] = __( 'Expand child menu', 'twentyseventeen' ); $twentyseventeen_l10n['collapse'] = __( 'Collapse child menu', 'twentyseventeen' ); $twentyseventeen_l10n['icon'] = twentyseventeen_get_svg( array( 'icon' => 'angle-down', 'fallback' => true, ) ); } wp_localize_script( 'twentyseventeen-global', 'twentyseventeenScreenReaderText', $twentyseventeen_l10n ); wp_enqueue_script( 'jquery-scrollto', get_theme_file_uri( '/assets/js/jquery.scrollTo.js' ), array( 'jquery' ), '2.1.3', array( 'in_footer' => true, 'strategy' => 'defer', )Changelog
Unchanged from 6.7.10 through 7.1.3.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.11 tag, from
src/wp-content/themes/twentyseventeen/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.