Daily Archives of July 15, 2017

Generate activation or deactivation link of WordPress plugin

Sometimes you need an action link to activate or deactivate a plugin. How do you do that? I have written a simple function that can help you achieve this. <?php /** * Get activation or deactivation link of a plugin * * @author Nazmul Ahsan <mail@nazmulahsan.me> * @param string $plugin plugin file name * @param string $action action to perform. activate or deactivate * @return string $url action url */ function na_action_link( $plugin, $action = 'activate' ) { if ( strpos( $plugin, '/' ) ) { $plugin = str_replace( '\/', '%2F', $plugin ); } $url = sprintf( admin_url( 'plugins.php?action=' . Read more


WPpeople works mainly on WordPress based projects.
It specializes in developing Plugins, Themes and WP based apps. Well, you can count SEO and maintenance jobs too.

Get in touch