|
@@ 934-936 (lines=3) @@
|
| 931 |
|
|
| 932 |
|
if ( true === $GLOBALS['wp_filesystem']->move( $from, $to ) ) { |
| 933 |
|
return trailingslashit( $to ); |
| 934 |
|
} else { |
| 935 |
|
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 ) ); |
| 936 |
|
} |
| 937 |
|
} elseif ( empty( $subdir_name ) ) { |
| 938 |
|
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 ) ); |
| 939 |
|
} |
|
@@ 937-939 (lines=3) @@
|
| 934 |
|
} else { |
| 935 |
|
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 ) ); |
| 936 |
|
} |
| 937 |
|
} elseif ( empty( $subdir_name ) ) { |
| 938 |
|
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 ) ); |
| 939 |
|
} |
| 940 |
|
} |
| 941 |
|
|
| 942 |
|
return $source; |