Last active
October 5, 2022 11:47
-
-
Save rayhanuddin2019/c1053b96b5d1b67bfda9963eb9cb43f0 to your computer and use it in GitHub Desktop.
Revisions
-
rayhanuddin2019 revised this gist
Oct 5, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ $url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin={plugin_slug}' ), 'install-plugin_{plugin_slug}' ); ----------------- Second solution ------------------- $action = 'install-plugin'; $slug = 'akismet'; -
rayhanuddin2019 revised this gist
Oct 5, 2022 . No changes.There are no files selected for viewing
-
rayhanuddin2019 revised this gist
Oct 5, 2022 . 1 changed file with 18 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,21 @@ $url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=automatic-youtube-gallery' ), 'install-plugin_automatic-youtube-gallery' ); Below you’ll find a function that generates a plugin install link for WordPress. You can use this in the dashboard. This link acts the same way as the “Install plugin” buttons when searching for plugins within WordPress. $url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin={plugin_slug}' ), 'install-plugin_{plugin_slug}' ); ----------------- Second solution ------------------- $action = 'install-plugin'; $slug = 'akismet'; $url = wp_nonce_url( add_query_arg( array( 'action' => $action, 'plugin' => $slug ), admin_url( 'update.php' ) ), $action.'_'.$slug ); -
rayhanuddin2019 created this gist
Oct 5, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ $url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=automatic-youtube-gallery' ), 'install-plugin_automatic-youtube-gallery' ); Below you’ll find a function that generates a plugin install link for WordPress. You can use this in the dashboard. This link acts the same way as the “Install plugin” buttons when searching for plugins within WordPress. $url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin={plugin_slug}' ), 'install-plugin_{plugin_slug}' );