Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: allowed_themes

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
140  *
141  * @return array $themes Array of allowed themes.
142  */
143 function get_allowed_themes() {
144      if ( !is_multisite() )
145           return get_themes();
146
147      $themes = get_themes();
148      $ct = current_theme_info();
149      $allowed_themes = apply_filters("allowed_themes", get_site_allowed_themes() );
150      if ( $allowed_themes == false )
151           $allowed_themes = array();
152
153      $blog_allowed_themes = wpmu_get_blog_allowedthemes();
154      if ( is_array( $blog_allowed_themes ) )
155           $allowed_themes = array_merge( $allowed_themes, $blog_allowed_themes );
156
157      if ( isset( $allowed_themes[ esc_html( $ct->stylesheet ) ] ) == false )
158           $allowed_themes[ esc_html( $ct->stylesheet ) ] = true;