wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_can_install_language_pack › WordPress Function
Seit4.0.0
Veraltetn/v
› wp_can_install_language_pack ( Keine Parameter )
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Check if WordPress has access to the filesystem without asking for credentials.
Ähnliche Funktionen: wp_install_language_form, wp_maybe_grant_install_languages_cap, wp_download_language_pack, wp_installing, wp_not_installed
Quellcode
function wp_can_install_language_pack() {
if ( ! wp_is_file_mod_allowed( 'can_install_language_pack' ) ) {
return false;
}
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$skin = new Automatic_Upgrader_Skin();
$upgrader = new Language_Pack_Upgrader( $skin );
$upgrader->init();
$check = $upgrader->fs_connect( array( WP_CONTENT_DIR, WP_LANG_DIR ) );
if ( ! $check || is_wp_error( $check ) ) {
return false;
}
return true;
}