You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ( true === $GLOBALS['wp_filesystem']->move( $from, $to ) ) {
687
+
returntrailingslashit( $to );
688
+
}
689
+
else {
690
+
returnnewWP_Error( 'rename_failed', esc_html__( 'The remote plugin package is 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 ) );
691
+
}
692
+
}
693
+
elseif ( empty( $subdir_name ) ) {
694
+
returnnewWP_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 ) );
Copy file name to clipboardExpand all lines: example.php
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,16 @@ function my_theme_register_required_plugins() {
63
63
'external_url' => 'https://github.com/thomasgriffin/New-Media-Image-Uploader', // If set, overrides default API URL and points to an external URL.
64
64
),
65
65
66
+
// This is an example of how to include a plugin from a GitHub repository in your theme.
67
+
// This presumes that the plugin code is based in the root of the GitHub repository
68
+
// and not in a subdirectory ('/src') of the repository.
0 commit comments