wp_print_scripts WordPress Action Hook

The wp_print_scripts hook is one of the most useful hooks in WordPress. It allows you to add your own custom scripts to your WordPress site without having to edit any core files. This hook is called before the section of your site is printed, so it is the perfect place to add your custom scripts.

do_action( 'wp_print_scripts' ) #

Fires before scripts in the $handles queue are printed.


More Information

Since WordPress 3.3, wp_print_scripts should not be used to enqueue styles or scripts.
See: https://make.wordpress.org/core/2011/12/12/use-wp_enqueue_scripts-not-wp_print_styles-to-enqueue-scripts-and-styles-for-the-frontend/

Use wp_enqueue_scripts instead.


Top ↑

Source

File: wp-includes/functions.wp-scripts.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.