@@ 1039-1041 (lines=3) @@ | ||
1036 | ||
1037 | if ( true === $GLOBALS['wp_filesystem']->move( $from_path, $to_path ) ) { |
|
1038 | return trailingslashit( $to_path ); |
|
1039 | } else { |
|
1040 | return new WP_Error( |
|
1041 | 'rename_failed', |
|
1042 | 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' ), |
|
1043 | array( |
|
1044 | 'found' => $subdir_name, |
|
@@ 1049-1051 (lines=3) @@ | ||
1046 | ) |
|
1047 | ); |
|
1048 | } |
|
1049 | } elseif ( empty( $subdir_name ) ) { |
|
1050 | return new WP_Error( |
|
1051 | 'packaged_wrong', |
|
1052 | 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' ), |
|
1053 | array( |
|
1054 | 'found' => $subdir_name, |