|
@@ 917-919 (lines=3) @@
|
| 914 |
|
|
| 915 |
|
if ( true === $GLOBALS['wp_filesystem']->move( $from, $to ) ) { |
| 916 |
|
return trailingslashit( $to ); |
| 917 |
|
} else { |
| 918 |
|
return new WP_Error( 'rename_failed', esc_html__( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) ); |
| 919 |
|
} |
| 920 |
|
} elseif ( empty( $subdir_name ) ) { |
| 921 |
|
return new WP_Error( 'packaged_wrong', esc_html__( 'The remote plugin package consists of more than one file, but the files are not packaged in a folder.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) ); |
| 922 |
|
} |
|
@@ 920-922 (lines=3) @@
|
| 917 |
|
} else { |
| 918 |
|
return new WP_Error( 'rename_failed', esc_html__( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) ); |
| 919 |
|
} |
| 920 |
|
} elseif ( empty( $subdir_name ) ) { |
| 921 |
|
return new WP_Error( 'packaged_wrong', esc_html__( 'The remote plugin package consists of more than one file, but the files are not packaged in a folder.', 'tgmpa' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'tgmpa' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) ); |
| 922 |
|
} |
| 923 |
|
} |
| 924 |
|
|
| 925 |
|
return $source; |