WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
653 | * Passing a non-empty array will result in wp_prepare_themes_for_js() returning |
654 | * early with that value instead. |
655 | * |
656 | * @since 4.2.0 |
657 | * |
658 | * @param array $prepared_themes An associative array of theme data. Default empty array. |
659 | * @param WP_Theme[]|null $themes An array of theme objects to prepare, if any. |
660 | * @param string $current_theme The active theme slug. |
661 | */ |
662 | $prepared_themes = (array) apply_filters( 'pre_prepare_themes_for_js', array(), $themes, $current_theme ); |
663 |
|
664 | if ( ! empty( $prepared_themes ) ) { |
665 | return $prepared_themes; |
666 | } |
667 |
|
668 | // Make sure the active theme is listed first. |
669 | $prepared_themes[ $current_theme ] = array(); |
670 |
|
671 | if ( null === $themes ) { |