Advertisement
Guest User

Tgm

a guest
Oct 18th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. <?php
  2.  
  3. require_once dirname( __FILE__ ) . '/inc/class-tgm-plugin-activation.php';
  4.  
  5. add_action( 'tgmpa_register', 'my_theme_register_required_plugins' );
  6.  
  7.  
  8. function my_theme_register_required_plugins() {
  9.  
  10. $plugins = array(
  11.  
  12. // This is an example of how to include a plugin bundled with a theme.
  13. array(
  14. 'name' => 'Nazmul-hasan-toolkit',
  15. 'slug' => 'Nazmul-hasan-toolkit',
  16. 'source' => get_stylesheet_directory() . '/inc/plugins/Nazmul-hasan-toolkit.zip',e.
  17. 'required' => true,
  18. 'version' => '1.0',
  19. 'force_activation' => true,
  20. 'force_deactivation' => true,
  21.  
  22. ),array(
  23. 'name' => 'WPBakery Visual Composer',
  24. 'slug' => 'Js-Composer',
  25. 'source' => get_stylesheet_directory() . '/inc/plugins/Js-Composer.zip',e.
  26. 'required' => true,
  27. 'version' => '1.0',
  28. 'force_activation' => true,
  29. 'force_deactivation' => true,
  30.  
  31. ),
  32.  
  33.  
  34. // This is an example of how to include a plugin from the WordPress Plugin Repository.
  35. array(
  36. 'name' => 'Breadcrumb NavXT',
  37. 'slug' => 'breadcrumb-navxt',
  38. 'required' => true,
  39. 'version' => '5.7.1',
  40. ),
  41.  
  42. array(
  43. 'name' => 'Contact Form 7',
  44. 'slug' => 'contact-form-7',
  45. 'required' => false,
  46. 'version' => '4.7',
  47. ),
  48.  
  49.  
  50. );
  51.  
  52.  
  53. $config = array(
  54. 'id' => 'stock',
  55. 'default_path' => '',
  56. 'menu' => 'stock-install-plugins',
  57. 'parent_slug' => 'themes.php',
  58. 'capability' => 'edit_theme_options',
  59. 'has_notices' => true,
  60. 'dismissable' => true,
  61. 'dismiss_msg' => '',
  62. 'is_automatic' => false,
  63. 'message' => '',
  64.  
  65.  
  66. );
  67.  
  68. tgmpa( $plugins, $config );
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement