equal
deleted
inserted
replaced
307 |
307 |
308 return $results; |
308 return $results; |
309 } |
309 } |
310 |
310 |
311 /** |
311 /** |
312 * Check the package source to make sure there are .mo and .po files. |
312 * Checks that the package source contains .mo and .po files. |
313 * |
313 * |
314 * Hooked to the {@see 'upgrader_source_selection'} filter by |
314 * Hooked to the {@see 'upgrader_source_selection'} filter by |
315 * Language_Pack_Upgrader::bulk_upgrade(). |
315 * Language_Pack_Upgrader::bulk_upgrade(). |
316 * |
316 * |
317 * @since 3.7.0 |
317 * @since 3.7.0 |
318 * |
318 * |
319 * @global WP_Filesystem_Base $wp_filesystem Subclass |
319 * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. |
320 * |
320 * |
321 * @param string|WP_Error $source |
321 * @param string|WP_Error $source The path to the downloaded package source. |
322 * @param string $remote_source |
322 * @param string $remote_source Remote file source location. |
|
323 * @return string|WP_Error The source as passed, or a WP_Error object on failure. |
323 */ |
324 */ |
324 public function check_package( $source, $remote_source ) { |
325 public function check_package( $source, $remote_source ) { |
325 global $wp_filesystem; |
326 global $wp_filesystem; |
326 |
327 |
327 if ( is_wp_error( $source ) ) { |
328 if ( is_wp_error( $source ) ) { |