megaresponsive_lite_required_plugins

The CWP MegaResponsive megaresponsive lite required plugins function.

Description

megaresponsive_lite_required_plugins(); 

Usage

  1. if ( !function_exists( 'megaresponsive_lite_required_plugins' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = megaresponsive_lite_required_plugins(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function megaresponsive_lite_required_plugins() { 
  2.  
  3. /** 
  4. * Array of plugin arrays. Required keys are name and slug. 
  5. * If the source is NOT from the .org repo, then source is also required. 
  6. */ 
  7. $plugins = array( 
  8.  
  9. // This is an example of how to include a plugin from the WordPress Plugin Repository 
  10. array( 
  11. 'name' => 'WP Product Review',  
  12. 'slug' => 'wp-product-review',  
  13. 'required' => false,  
  14. ),  
  15. array( 
  16. 'name' => 'Tweet old post',  
  17. 'slug' => 'tweet-old-post',  
  18. 'required' => false,  
  19.  
  20.  
  21. ); 
  22.  
  23. // Change this to your theme text domain, used for internationalising strings 
  24. $theme_text_domain = 'megaresponsive-lite'; 
  25.  
  26. /** 
  27. * Array of configuration settings. Amend each line as needed. 
  28. * If you want the default strings to be available under your own theme domain,  
  29. * leave the strings uncommented. 
  30. * Some of the strings are added into a sprintf, so see the comments at the 
  31. * end of each line for what each argument will be. 
  32. */ 
  33. $config = array( 
  34. 'domain' => 'megaresponsive-lite', // Text domain - likely want to be the same as your theme. 
  35. 'default_path' => '', // Default absolute path to pre-packaged plugins 
  36. 'parent_menu_slug' => 'themes.php', // Default parent menu slug 
  37. 'parent_url_slug' => 'themes.php', // Default parent URL slug 
  38. 'menu' => 'install-required-plugins', // Menu slug 
  39. 'has_notices' => true, // Show admin notices or not 
  40. 'is_automatic' => false, // Automatically activate plugins after installation or not 
  41. 'message' => '', // Message to output right before the plugins table 
  42. 'strings' => array( 
  43. 'page_title' => __( 'Install Required Plugins', 'megaresponsive-lite' ),  
  44. 'menu_title' => __( 'Install Plugins', 'megaresponsive-lite' ),  
  45. 'installing' => __( 'Installing Plugin: %s', 'megaresponsive-lite' ), // %1$s = plugin name 
  46. 'oops' => __( 'Something went wrong with the plugin API.', 'megaresponsive-lite' ),  
  47. 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'megaresponsive-lite' ), // %1$s = plugin name(s) 
  48. 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'megaresponsive-lite' ), // %1$s = plugin name(s) 
  49. 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'megaresponsive-lite' ), // %1$s = plugin name(s) 
  50. 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'megaresponsive-lite' ), // %1$s = plugin name(s) 
  51. 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'megaresponsive-lite' ), // %1$s = plugin name(s) 
  52. 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'megaresponsive-lite' ), // %1$s = plugin name(s) 
  53. 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'megaresponsive-lite' ), // %1$s = plugin name(s) 
  54. 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'megaresponsive-lite' ), // %1$s = plugin name(s) 
  55. 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'megaresponsive-lite' ),  
  56. 'activate_link' => _n_noop( 'Activate installed plugin', 'Activate installed plugins', 'megaresponsive-lite' ),  
  57. 'return' => __( 'Return to Required Plugins Installer', 'megaresponsive-lite' ),  
  58. 'plugin_activated' => __( 'Plugin activated successfully.', 'megaresponsive-lite' ),  
  59. 'complete' => __( 'All plugins installed and activated successfully. %s', 'megaresponsive-lite' ), // %1$s = dashboard link 
  60. 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated' or error 
  61. ); 
  62.  
  63. tgmpa( $plugins, $config ); 
  64.