wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
wp_get_active_and_valid_themes is private and should not be used in themes or plugins directly.
wp_get_active_and_valid_themes › WordPress Function
Depuis5.1.0
Dépréciéen/a
› wp_get_active_and_valid_themes ( Pas de paramètres )
Accès: |
|
Retourne: |
|
Défini(e) dans: |
|
Codex: |
Retrieves an array of active and valid themes.
While upgrading or installing WordPress, no themes are returned.Fonctions en relation: wp_get_active_and_valid_plugins, get_site_allowed_themes, wpmu_get_blog_allowedthemes, wp_get_themes, _wp_relative_upload_path
Source
function wp_get_active_and_valid_themes() { global $pagenow, $wp_stylesheet_path, $wp_template_path; $themes = array(); if ( wp_installing() && 'wp-activate.php' !== $pagenow ) { return $themes; } if ( is_child_theme() ) { $themes[] = $wp_stylesheet_path; } $themes[] = $wp_template_path; /* * Remove themes from the list of active themes when we're on an endpoint * that should be protected against WSODs and the theme is paused. */ if ( wp_is_recovery_mode() ) { $themes = wp_skip_paused_themes( $themes ); // If no active and valid themes exist, skip loading themes. if ( empty( $themes ) ) { add_filter( 'wp_using_themes', '__return_false' ); } } return $themes; }