Changeset 58813 for trunk/src/wp-admin/includes/translation-install.php
- Timestamp:
- 07/27/2024 12:25:44 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/translation-install.php
r58409 r58813 18 18 */ 19 19 function translations_api( $type, $args = null ) { 20 // Include an unmodified $wp_version.21 require ABSPATH . WPINC . '/version.php';22 23 20 if ( ! in_array( $type, array( 'plugins', 'themes', 'core' ), true ) ) { 24 21 return new WP_Error( 'invalid_type', __( 'Invalid translation type.' ) ); … … 47 44 'timeout' => 3, 48 45 'body' => array( 49 'wp_version' => $wp_version,46 'wp_version' => wp_get_wp_version(), 50 47 'locale' => get_locale(), 51 48 'version' => $args['version'], // Version of plugin, theme or core. … … 129 126 } 130 127 131 // Include an unmodified $wp_version. 132 require ABSPATH . WPINC . '/version.php'; 133 134 $api = translations_api( 'core', array( 'version' => $wp_version ) ); 128 $api = translations_api( 'core', array( 'version' => wp_get_wp_version() ) ); 135 129 136 130 if ( is_wp_error( $api ) || empty( $api['translations'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.