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 |
---|---|
131 | * |
132 | * @return array $themes Array of allowed themes. |
133 | */ |
134 | function get_allowed_themes() { |
135 | if ( !is_multisite() ) |
136 | return get_themes(); |
137 |
|
138 | $themes = get_themes(); |
139 | $ct = current_theme_info(); |
140 | $allowed_themes = apply_filters("allowed_themes", get_site_allowed_themes() ); |
141 | if ( $allowed_themes == false ) |
142 | $allowed_themes = array(); |
143 |
|
144 | $blog_allowed_themes = wpmu_get_blog_allowedthemes(); |
145 | if ( is_array( $blog_allowed_themes ) ) |
146 | $allowed_themes = array_merge( $allowed_themes, $blog_allowed_themes ); |
147 |
|
148 | if ( isset( $allowed_themes[ esc_html( $ct->stylesheet ) ] ) == false ) |
149 | $allowed_themes[ esc_html( $ct->stylesheet ) ] = true; |