pre_prepare_themes_for_js WordPress Filter Hook

The pre_prepare_themes_for_js hook is used to prepare themes for JavaScript before they are compiled. This hook is called before the themes are compiled and allows for modifications to be made to the theme objects.

apply_filters( 'pre_prepare_themes_for_js', array $prepared_themes, WP_Theme[]|null $themes, string $current_theme ) #

Filters theme data before it is prepared for JavaScript.


Description

Passing a non-empty array will result in wp_prepare_themes_for_js() returning early with that value instead.


Top ↑

Parameters

$prepared_themes

(array)An associative array of theme data. Default empty array.

$themes

(WP_Theme[]|null)An array of theme objects to prepare, if any.

$current_theme

(string)The active theme slug.


Top ↑

Source

File: wp-admin/includes/theme.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.2.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.