Definition:
function get_site_allowed_themes() {}
Source code
function get_site_allowed_themes() { $themes = get_themes(); $allowed_themes = get_site_option( 'allowedthemes' ); if ( !is_array( $allowed_themes ) || empty( $allowed_themes ) ) { $allowed_themes = get_site_option( 'allowed_themes' ); // convert old allowed_themes format if ( !is_array( $allowed_themes ) ) { $allowed_themes = array(); } else { foreach( (array) $themes as $key => $theme ) { $theme_key = esc_html( $theme['Stylesheet'] ); if ( isset( $allowed_themes[ $key ] ) == true ) { $allowedthemes[ $theme_key ] = 1; } } $allowed_themes = $allowedthemes; } } return $allowed_themes; }
1695
No comments yet... Be the first to leave a reply!