wp-admin/includes/translation-install.php:302Check if WordPress has access to the filesystem without asking for credentials.
boolfunction 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;}Introduced in 4.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-admin/includes/translation-install.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.