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