Example #1
0
 function x_register_theme_plugins()
 {
     $template_directory_uri = get_template_directory_uri();
     $plugins = array(array('name' => 'X Shortcodes', 'slug' => 'x-shortcodes', 'source' => $template_directory_uri . '/framework/plugins/x-shortcodes.zip', 'required' => true, 'version' => '', 'force_activation' => true, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Slider Revolution', 'slug' => 'revslider', 'source' => $template_directory_uri . '/framework/plugins/revslider.zip', 'required' => false, 'version' => '4.3.8', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => '', 'manage_upgrade' => 'revslider/revslider.php'), array('name' => 'Visual Composer', 'slug' => 'js_composer', 'source' => $template_directory_uri . '/framework/plugins/js_composer.zip', 'required' => false, 'version' => '4.1.3', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => '', 'manage_upgrade' => 'js_composer/js_composer.php'), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'Force Regenerate Thumbnails', 'slug' => 'force-regenerate-thumbnails', 'required' => true));
     $config = array('domain' => '__x__', 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => true, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', '__x__'), 'menu_title' => __('Install Plugins', '__x__'), 'installing' => __('Installing Plugin: %s', '__x__'), 'oops' => __('Something went wrong with the plugin API.', '__x__'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', '__x__'), 'plugin_activated' => __('Plugin activated successfully.', '__x__'), 'complete' => __('All plugins installed and activated successfully. %s', '__x__'), 'nag_type' => 'updated'));
     tgmpa($plugins, $config);
 }
function my_theme_register_required_plugins()
{
    $plugins = array(array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'Theme Blvd Responsive Google Maps', 'slug' => 'theme-blvd-responsive-google-maps', 'required' => false), array('name' => 'LayerSlider', 'slug' => 'LayerSlider', 'source' => get_template_directory() . '/include/plugin/tgm-plugin-activation/plugins/LayerSlider.zip', 'version' => '5.1.1', 'required' => true, 'force_activation' => false, 'force_deactivation' => true));
    $theme_text_domain = 'gdl_back_office';
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
     * with WordPress.
     *
	 * @since    1.0.0
	 * @access   private
	*/
    private function load_dependencies()
    {
        /**
/**
 * Charity - Vender for lib (TGM-Plugin-Activation) activation
 *  
 * @package     charity
 * @version     v.1.0
 */
function charity_register_required_plugins()
{
    $vendorPath = get_template_directory() . '/vendor/plugins/';
    $plugins = array(array('name' => 'Charity Apps', 'slug' => 'charity-apps', 'source' => $vendorPath . 'charity-apps.zip', 'required' => true, 'force_activation' => true), array('name' => 'EasyPay', 'slug' => 'easypay', 'source' => $vendorPath . 'easypay.zip', 'required' => true, 'force_activation' => true), array('name' => 'Revolution Slider', 'slug' => 'revslider', 'source' => $vendorPath . 'revslider.zip', 'required' => true, 'force_activation' => true), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'source' => $vendorPath . 'contact-form-7.zip', 'required' => true), array('name' => 'Mailchimp', 'slug' => 'mailchimp-for-wp', 'source' => $vendorPath . 'mailchimp-for-wp.zip', 'required' => false), array('name' => 'Woocommerce', 'slug' => 'woocommerce', 'source' => $vendorPath . 'woocommerce.zip', 'required' => false, 'force_activation' => false), array('name' => 'Contact Form DB', 'slug' => 'contact-form-7-to-database-extension', 'source' => $vendorPath . 'contact-form-7-to-database-extension.zip', 'required' => false, 'force_activation' => false), array('name' => 'Events Manager', 'slug' => 'events-manager', 'source' => $vendorPath . 'events-manager.zip', 'required' => true, 'force_activation' => true), array('name' => 'WPBakery Visual Composer', 'slug' => 'js_composer', 'source' => $vendorPath . 'js_composer.zip', 'required' => false, 'force_activation' => false));
    $config = array('domain' => 'charity', 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'b-blog'), 'menu_title' => __('Install Plugins', 'b-blog'), 'installing' => __('Installing Plugin: %s', 'b-blog'), 'oops' => __('Something went wrong with the plugin API.', 'b-blog'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', 'b-blog'), 'plugin_activated' => __('Plugin activated successfully.', 'b-blog'), 'complete' => __('All plugins installed and activated successfully. %s', 'b-blog'), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
/**
 * This function is hooked into tgmpa_init, which is fired within the
 * TGM_Plugin_Activation class constructor.
 */
function my_theme_register_required_plugins()
{
    /**
     * Array of plugin arrays. Required keys are name and slug.
     * If the source is NOT from the .org repo, then source is also required.
     */
    $plugins = array(array('name' => 'Simple Page Ordering', 'slug' => 'simple-page-ordering', 'required' => false), array('name' => 'Custom Taxonomy Sort', 'slug' => 'custom-taxonomy-sort', 'required' => false));
    // Change this to your theme text domain, used for internationalising strings
    $theme_text_domain = 'gxg_textdomain';
    /**
     * Array of configuration settings. Amend each line as needed.
     * If you want the default strings to be available under your own theme domain,
     * leave the strings uncommented.
     * Some of the strings are added into a sprintf, so see the comments at the
     * end of each line for what each argument will be.
     */
    $config = array('domain' => $theme_text_domain, 'default_path' => dirname(__FILE__) . '/plugins/', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
Example #6
0
function porto_register_required_plugins()
{
    // disable visual composer automatic update
    global $vc_manager;
    if ($vc_manager) {
        $vc_updater = $vc_manager->updater();
        if ($vc_updater) {
            remove_filter('upgrader_pre_download', array(&$vc_updater, 'upgradeFilterFromEnvato'));
            remove_filter('upgrader_pre_download', array(&$vc_updater, 'preUpgradeFilter'));
        }
    }
    // get master slider download url
    add_filter('axiom_plugin_updater_custom_package_download_url', 'porto_axiom_plugin_updater_custom_package_download_url');
    /**
     * Array of plugin arrays. Required keys are name and slug.
     * If the source is NOT from the .org repo, then source is also required.
     */
    $plugins = array(array('name' => 'WPBakery Visual Composer', 'slug' => 'js_composer', 'source' => porto_plugins . '/js_composer.zip', 'required' => true, 'version' => '4.9.2'), array('name' => 'Ultimate Addons for Visual Composer', 'slug' => 'Ultimate_VC_Addons', 'source' => porto_plugins . '/Ultimate_VC_Addons.zip', 'required' => true, 'version' => '3.15.0'), array('name' => 'Porto Shortcodes', 'slug' => 'porto-shortcodes', 'source' => porto_plugins . '/porto-shortcodes.zip', 'required' => true, 'version' => '1.4'), array('name' => 'Porto Widgets', 'slug' => 'porto-widgets', 'source' => porto_plugins . '/porto-widgets.zip', 'required' => true, 'version' => '1.2'), array('name' => 'Porto Content Types', 'slug' => 'porto-content-types', 'source' => porto_plugins . '/porto-content-types.zip', 'required' => true, 'version' => '1.2.2'), array('name' => 'Dynamic Featured Image', 'slug' => 'dynamic-featured-image', 'required' => true), array('name' => 'Master Slider', 'slug' => 'masterslider', 'source' => porto_plugins . '/masterslider.zip', 'required' => true, 'version' => '2.26.0'), array('name' => 'Woocommerce', 'slug' => 'woocommerce', 'required' => true), array('name' => 'Regenerate Thumbnails', 'slug' => 'regenerate-thumbnails', 'required' => true), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'Really Simple CAPTCHA', 'slug' => 'really-simple-captcha', 'required' => false), array('name' => 'WP Sitemap Page', 'slug' => 'wp-sitemap-page', 'required' => false), array('name' => 'Post Type Archive Link', 'slug' => 'post-type-archive-links', 'required' => false), array('name' => 'MailPoet Newsletters', 'slug' => 'wysija-newsletters', 'required' => false), array('name' => 'Envato Toolkit', 'slug' => 'envato-wordpress-toolkit', 'source' => porto_plugins . '/envato-wordpress-toolkit.zip', 'required' => false, 'version' => '1.7.3'));
    if (class_exists('WooCommerce')) {
        $plugins = array_merge(array(array('name' => 'Yith Woocommerce Wishlist', 'slug' => 'yith-woocommerce-wishlist', 'required' => false), array('name' => 'Yith Woocommerce Ajax Navigation', 'slug' => 'yith-woocommerce-ajax-navigation', 'required' => false), array('name' => 'Yith Woocommerce Ajax Search', 'slug' => 'yith-woocommerce-ajax-search', 'required' => false)), $plugins);
    }
    if (defined('GEODIRECTORY_VERSION')) {
        $plugins = array_merge(array(array('name' => 'GeoDirectory Porto Theme Compatibility Pack', 'slug' => 'geodirectory-porto-theme-compatibility-pack', 'source' => porto_plugins . '/geodirectory-porto-theme-compatibility-pack.zip', 'required' => true, 'version' => '1.0.0')), $plugins);
    }
    /**
     * Array of configuration settings. Amend each line as needed.
     * If you want the default strings to be available under your own theme domain,
     * leave the strings uncommented.
     * Some of the strings are added into a sprintf, so see the comments at the
     * end of each line for what each argument will be.
     */
    $config = array('domain' => 'porto', 'default_path' => '', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'porto'), 'menu_title' => __('Install Plugins', 'porto'), 'installing' => __('Installing Plugin: %s', 'porto'), 'oops' => __('Something went wrong with the plugin API.', 'porto'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', 'porto'), 'plugin_activated' => __('Plugin activated successfully.', 'porto'), 'complete' => __('All plugins installed and activated successfully. %s', 'porto'), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
 /**
  * Register the required plugins for The "Google Analytics Top Content" plugin.
  */
 public function register_required_plugins()
 {
     $plugins = array(array('name' => 'Google Analytics by Yoast', 'slug' => 'google-analytics-for-wordpress', 'required' => true));
     $widgets_url = '<a href="' . get_admin_url('', 'widgets.php') . '" title="' . __('Setup Widget', 'top-google-posts') . '">' . __('Setup Widget', 'top-google-posts') . '</a>';
     $config = array('domain' => 'top-google-posts', 'default_path' => '', 'parent_slug' => 'plugins.php', 'capability' => 'install_plugins', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => true, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'top-google-posts'), 'menu_title' => __('Install Plugins', 'top-google-posts'), 'installing' => __('Installing Plugin: %s', 'top-google-posts'), 'oops' => __('Something went wrong with the plugin API.', 'top-google-posts'), 'notice_can_install_required' => _n_noop('The "Google Analytics Top Content" plugin requires the following plugin: %1$s.', 'This plugin requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This plugin recommends the following plugin: %1$s.', 'This plugin recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', 'top-google-posts'), 'plugin_activated' => __('Plugin activated successfully.', 'top-google-posts'), 'complete' => __('All plugins installed and activated successfully. %s', 'top-google-posts')));
     tgmpa($plugins, $config);
 }
function quidus_register_required_plugins()
{
    $plugins = array(array('name' => 'Kirki - Advanced Wordpress Customizer', 'slug' => 'Kirki', 'source' => 'https://downloads.wordpress.org/plugin/kirki.0.8.4.zip', 'required' => true, 'external_url' => '', 'force_activation' => false, 'force_deactivation' => true), array('name' => 'Contact Form 7', 'slug' => 'Contact Form 7', 'source' => 'https://downloads.wordpress.org/plugin/contact-form-7.4.1.2.zip', 'required' => false, 'external_url' => '', 'force_activation' => false, 'force_deactivation' => true), array('name' => 'Shortcodes Ultimate', 'slug' => 'Shortcodes Ultimate', 'source' => 'https://downloads.wordpress.org/plugin/shortcodes-ultimate.zip', 'required' => false, 'external_url' => '', 'force_activation' => false, 'force_deactivation' => true));
    $theme_text_domain = 'quidus';
    $config = array('domain' => 'quidus', 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'dismissable' => true, 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'quidus'), 'menu_title' => __('Install Plugins', 'quidus'), 'installing' => __('Installing Plugin: %s', 'quidus'), 'oops' => __('Something went wrong with the plugin API.', 'quidus'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'quidus'), 'notice_can_install_recommended' => _n_noop('This theme comes packaged with the following premium plugin: %1$s. enjoy:)', 'This theme comes packaged with the following premium plugin: %1$s. enjoy:)', 'quidus'), '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.', 'quidus'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'quidus'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'quidus'), '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.', 'quidus'), '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.', 'quidus'), '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.', 'quidus'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins', 'quidus'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins', 'quidus'), 'return' => __('Return to Required Plugins Installer', 'quidus'), 'plugin_activated' => __('Plugin activated successfully.', 'quidus'), 'complete' => __('All plugins installed and activated successfully. %s', 'quidus'), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
Example #9
0
 function x_register_theme_plugins()
 {
     //
     // Bundled plugins.
     //
     $bundled = array('cornerstone' => array('name' => 'Cornerstone', 'slug' => 'cornerstone', 'source' => X_TEMPLATE_URL . '/framework/plugins/cornerstone.zip', 'required' => true, 'version' => '', 'force_activation' => true, 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => 'cornerstone/cornerstone.php', 'x_author' => 'Themeco', 'x_description' => 'This plugin is required to run X. It provides a front end page editor and all the shortcodes used in X.', 'x_logo' => '//theme.co/media/x_extensions/200-200-no-title-cornerstone.png', 'x_manage_upgrade' => false), 'revslider' => array('name' => 'Slider Revolution', 'slug' => 'revslider', 'source' => X_TEMPLATE_URL . '/framework/plugins/revslider.zip', 'required' => false, 'version' => '4.6.93', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => 'revslider/revslider.php', 'x_author' => 'ThemePunch', 'x_description' => 'Create responsive sliders with must-see-effects, all while maintaining your search engine optimization.', 'x_logo' => '//theme.co/media/x_extensions/200-200-no-title-slider-revolution.png', 'x_manage_upgrade' => true), 'js_composer' => array('name' => 'Visual Composer', 'slug' => 'js_composer', 'source' => X_TEMPLATE_URL . '/framework/plugins/js_composer.zip', 'required' => false, 'version' => '4.5.3', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => 'js_composer/js_composer.php', 'x_author' => 'WPBakery', 'x_description' => 'We recommend using <a href="//theme.co/cornerstone/" title="Cornerstone" target="_blank">Cornerstone</a> for page building in X as it is built and managed by Themeco; however, Visual Composer is an alternate choice.', 'x_logo' => '//theme.co/media/x_extensions/200-200-no-title-visual-composer.png', 'x_manage_upgrade' => true));
     //
     // Remote plugins.
     //
     $extensions = array();
     $addons = X_Update_API::get_cached_addons();
     if (is_array($addons) && !isset($addons['error'])) {
         foreach ($addons as $ext => $data) {
             $data['force_activation'] = $data['force_activation'] == 'on' ? true : false;
             $data['force_deactivation'] = $data['force_deactivation'] == 'on' ? true : false;
             $extensions[$ext] = array('name' => $data['title'], 'slug' => $data['slug'], 'source' => $data['download_url'], 'required' => false, 'version' => $data['latest_version'], 'force_activation' => $data['force_activation'], 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => $data['plugin_file'], 'x_author' => $data['author'], 'x_description' => $data['description'], 'x_logo' => $data['logo_url'], 'x_manage_upgrade' => false);
         }
     }
     //
     // Merge bundled and remote plugins.
     //
     $plugins = array_merge($bundled, $extensions);
     //
     // TMG configuration.
     //
     $config = array('domain' => '__x__', 'default_path' => 'tgmpa-install-plugins', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => true, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', '__x__'), 'menu_title' => __('Install Plugins', '__x__'), 'installing' => __('Installing Plugin: %s', '__x__'), 'oops' => __('Something went wrong with the plugin API.', '__x__'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', '__x__'), 'plugin_activated' => __('Plugin activated successfully.', '__x__'), 'complete' => __('All plugins installed and activated successfully. %s', '__x__'), 'nag_type' => 'updated'));
     tgmpa($plugins, $config);
 }
Example #10
0
function jogja_include_necessary_plugins()
{
    $plugins = array(array('name' => 'Regenerate Thumbnails', 'slug' => 'regenerate-thumbnails', 'required' => false), array('name' => 'Widget Import / Export', 'slug' => 'widget-importer-exporter', 'required' => false), array('name' => 'Ninja Forms', 'slug' => 'ninja-forms', 'required' => false), array('name' => 'MailChimp for WordPress', 'slug' => 'mailchimp-for-wp', 'required' => false), array('name' => 'WooCommerce', 'slug' => 'woocommerce', 'required' => false));
    $theme_text_domain = 'jogja';
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'menu' => 'jogja-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => false, 'message' => '');
    tgmpa($plugins, $config);
}
 /**
  * Register the required plugins for this theme.
  *
  * In this example, we register two plugins - one included with the TGMPA library
  * and one from the .org repo.
  *
  * The variable passed to tgmpa_register_plugins() should be an array of plugin
  * arrays.
  *
  * This function is hooked into tgmpa_init, which is fired within the
  * TGM_Plugin_Activation class constructor.
  */
 public function _actionRegisterRequiredPlugins()
 {
     $pluginsConfigData = Configure::read('Data.externalPlugins');
     /**
      * Array of plugin arrays. Required keys are name and slug.
      * If the source is NOT from the .org repo, then source is also required.
      */
     $plugins = array();
     foreach ($pluginsConfigData as $pluginConfigData) {
         // $pluginConfigData['source'] = GUMM_EXTERNAL_PLUGINS . $pluginConfigData['file'];
         $pluginConfigData['source'] = $pluginConfigData['file'];
         unset($pluginConfigData['file']);
         $pluginData = array_merge(array('name' => '', 'slug' => '', 'source' => '', 'required' => true, 'force_activation' => false, 'force_deactivation' => false), $pluginConfigData);
         // if ($pluginData['name'] && $pluginData['slug'] && $pluginData['source'] && is_file($pluginData['source'])) {
         if ($pluginData['name'] && $pluginData['slug'] && $pluginData['source']) {
             $plugins[] = $pluginData;
         }
     }
     /**
      * Array of configuration settings. Amend each line as needed.
      * If you want the default strings to be available under your own theme domain,
      * leave the strings uncommented.
      * Some of the strings are added into a sprintf, so see the comments at the
      * end of each line for what each argument will be.
      */
     $config = array('domain' => 'gummfw', 'default_path' => GUMM_EXTERNAL_PLUGINS, 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'gummfw'), 'menu_title' => __('Install Plugins', 'gummfw'), 'installing' => __('Installing Plugin: %s', 'gummfw'), 'oops' => __('Something went wrong with the plugin API.', 'gummfw'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', 'gummfw'), 'plugin_activated' => __('Plugin activated successfully.', 'gummfw'), 'complete' => __('All plugins installed and activated successfully. %s', 'gummfw')));
     tgmpa($plugins, $config);
 }
Example #12
0
/**
 * Register the required plugins for this theme.
 *
 * In this example, we register two plugins - one included with the TGMPA library
 * and one from the .org repo.
 *
 * The variable passed to tgmpa_register_plugins() should be an array of plugin
 * arrays.
 *
 * This function is hooked into tgmpa_init, which is fired within the
 * TGM_Plugin_Activation class constructor.
 */
function largo_register_required_plugins()
{
    /**
     * Array of plugin arrays. Required keys are name and slug.
     * If the source is NOT from the .org repo, then source is also required.
     */
    $plugins = array(array('name' => 'Link Roundups', 'slug' => 'link-roundups', 'source' => 'https://github.com/INN/link-roundups/archive/master.zip', 'required' => false, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => 'https://github.com/INN/link-roundups'), array('name' => 'Documentcloud', 'slug' => 'documentcloud', 'source' => 'https://github.com/documentcloud/wordpress-documentcloud/archive/master.zip', 'required' => false, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => 'https://github.com/documentcloud/wordpress-documentcloud'), array('name' => 'Disqus Comment System', 'slug' => 'disqus-comment-system', 'required' => false), array('name' => 'Better WordPress Google XML Sitemaps', 'slug' => 'bwp-google-xml-sitemaps', 'required' => false), array('name' => 'W3 Total Cache', 'slug' => 'w3-total-cache', 'required' => false), array('name' => 'Edit Flow', 'slug' => 'edit-flow', 'required' => false), array('name' => 'Co-Authors Plus', 'slug' => 'co-authors-plus', 'required' => false));
    // Change this to your theme text domain, used for internationalising strings
    $theme_text_domain = 'largo';
    /**
     * Array of configuration settings. Amend each line as needed.
     * If you want the default strings to be available under your own theme domain,
     * leave the strings uncommented.
     * Some of the strings are added into a sprintf, so see the comments at the
     * end of each line for what each argument will be.
     */
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_slug' => 'themes.php', 'capability' => 'edit_theme_options', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
    // Hide notices from users that can't do anything about them.
    // A future update to TGMPA intends to fix this issue on multisites.
    // @see: https://github.com/TGMPA/TGM-Plugin-Activation/pull/247
    //
    // This should be removed after TGMPA is updated to version 3.0
    if (!current_user_can('activate_plugins')) {
        TGM_Plugin_Activation::$instance->has_notices = false;
    }
}
Example #13
0
function mr_tailor_theme_register_required_plugins()
{
    $plugins = array(array('name' => 'WooCommerce', 'slug' => 'woocommerce', 'source' => 'http://downloads.wordpress.org/plugin/woocommerce.2.1.9.zip', 'required' => false, 'version' => '2.1.9', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'WooCommerce Header Category Image', 'slug' => 'woocommerce-header-category-image', 'source' => get_stylesheet_directory() . '/inc/plugins/woocommerce-header-category-image.zip', 'required' => false, 'version' => '1.0.0', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Envato Toolkit', 'slug' => 'envato-wordpress-toolkit-master', 'source' => get_stylesheet_directory() . '/inc/plugins/envato-wordpress-toolkit-master.zip', 'required' => false, 'version' => '1.6.2', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Visual Composer', 'slug' => 'js_composer', 'source' => get_stylesheet_directory() . '/inc/plugins/js_composer.zip', 'required' => true, 'version' => '4.1.3.1', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false, 'version' => '3.7.2'), array('name' => 'WP Retina 2x', 'slug' => 'wp-retina-2x', 'required' => false, 'version' => '1.9.2'));
    $theme_text_domain = 'mr_tailor';
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
Example #14
0
 public function run()
 {
     add_action('init', array($this, 'register_post_type'));
     add_action('tgmpa_register', function () {
         /*
          * Array of plugin arrays. Required keys are name and slug.
          * If the source is NOT from the .org repo, then source is also required.
          */
         $plugins = array(array('name' => 'Advanced Custom Fields', 'slug' => 'advanced-custom-fields', 'required' => true));
         /*
          * Array of configuration settings. Amend each line as needed.
          *
          * TGMPA will start providing localized text strings soon. If you already have translations of our standard
          * strings available, please help us make TGMPA even better by giving us access to these translations or by
          * sending in a pull-request with .po file(s) with the translations.
          *
          * Only uncomment the strings in the config array if you want to customize the strings.
          */
         $config = array('id' => 'tgmpa', 'default_path' => '', 'menu' => 'tgmpa-install-plugins', 'parent_slug' => 'themes.php', 'capability' => 'edit_theme_options', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => false, 'message' => '');
         tgmpa($plugins, $config);
     });
     add_action('widgets_init', function () {
         register_sidebar(array('name' => __('Jobify Sidebar', 'jobify'), 'id' => 'sidebar-jobify', 'description' => __('Widgets in this area will be shown on all job posts.', 'jobify'), 'before_widget' => '<li id="%1$s" class="widget %2$s">', 'after_widget' => '</li>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>'));
     });
 }
Example #15
0
 function x_register_theme_plugins()
 {
     //
     // Bundled plugins.
     //
     $bundled = array('cornerstone' => array('name' => 'Cornerstone', 'slug' => 'cornerstone', 'source' => 'cornerstone.zip', 'required' => true, 'version' => '', 'force_activation' => true, 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => 'cornerstone/cornerstone.php', 'x_author' => 'Themeco', 'x_description' => 'This plugin is required to run X. It provides a front end page editor and all the shortcodes used in X.', 'x_logo' => '//theme.co/media/x_extensions/200-200-no-title-cornerstone.png', 'x_manage_upgrade' => false));
     //
     // Remote plugins.
     //
     $extensions = array();
     $addons = get_site_option('x_extension_list', false);
     if (is_array($addons)) {
         foreach ($addons as $ext => $data) {
             $extensions[$ext] = array('name' => $data['title'], 'slug' => $data['slug'], 'source' => $data['package'], 'required' => false, 'version' => $data['new_version'], 'force_activation' => false, 'force_deactivation' => false, 'external_url' => '', 'x_plugin' => $data['plugin'], 'x_author' => $data['author'], 'x_description' => $data['description'], 'x_logo' => $data['logo_url'], 'x_manage_upgrade' => false);
         }
     }
     //
     // Merge bundled and remote plugins.
     //
     $plugins = array_merge($bundled, $extensions);
     //
     // TMG configuration.
     //
     $config = array('domain' => '__x__', 'default_path' => X_TEMPLATE_PATH . '/framework/plugins/', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => true, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', '__x__'), 'menu_title' => __('Install Plugins', '__x__'), 'installing' => __('Installing Plugin: %s', '__x__'), 'oops' => __('Something went wrong with the plugin API.', '__x__'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', '__x__'), 'plugin_activated' => __('Plugin activated successfully.', '__x__'), 'complete' => __('All plugins installed and activated successfully. %s', '__x__'), 'nag_type' => 'updated'));
     tgmpa($plugins, $config);
 }
/**
 * Register the required plugins for this theme.
 *
 * In this example, we register two plugins - one included with the TGMPA library
 * and one from the .org repo.
 *
 * The variable passed to tgmpa_register_plugins() should be an array of plugin
 * arrays.
 *
 * This function is hooked into tgmpa_init, which is fired within the
 * TGM_Plugin_Activation class constructor.
 */
function wheels_register_required_plugins()
{
    /**
     * Array of plugin arrays. Required keys are name and slug.
     * If the source is NOT from the .org repo, then source is also required.
     */
    $plugins = array(array('name' => 'Senior Plugin', 'slug' => 'senior-plugin', 'source' => get_stylesheet_directory() . '/extensions/senior-plugin.zip', 'required' => true, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'WPBakery Visual Composer', 'slug' => 'js_composer', 'source' => get_stylesheet_directory() . '/extensions/js_composer.zip', 'required' => true, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Ultimate Addons for Visual Composer', 'slug' => 'Ultimate_VC_Addons', 'source' => get_stylesheet_directory() . '/extensions/ultimate_vc_addons.zip', 'required' => true, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Layer Slider', 'slug' => 'LayerSlider', 'source' => get_stylesheet_directory() . '/extensions/layersliderwp.zip', 'required' => true, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Redux Framework', 'slug' => 'redux-framework', 'required' => true), array('name' => 'The Events Calendar', 'slug' => 'the-events-calendar', 'required' => false), array('name' => 'Breadcrumb Trail', 'slug' => 'breadcrumb-trail', 'required' => false), array('name' => 'Meta Box', 'slug' => 'meta-box', 'required' => true), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'Testimonial Rotator', 'slug' => 'testimonial-rotator', 'required' => false), array('name' => 'Wordpress Importer', 'slug' => 'wordpress-importer', 'required' => false));
    // Change this to your theme text domain, used for internationalising strings
    $theme_text_domain = 'wheels';
    // messages
    $messages = array(__('If you are not able to complete plugin installation process due to server issues please install the plugins manually. All required plugins are located in "extensions" folder in your main download from Themeforest.', $theme_text_domain), sprintf(__('After you finish installing plugins go back to %s page to complete the installation.', $theme_text_domain), '<a href="' . admin_url('themes.php?page=theme_activation_options') . '" title="' . __('Theme Activation', $theme_text_domain) . '">' . __('Theme Activation', $theme_text_domain) . '</a>'));
    $final_message = '';
    foreach ($messages as $message) {
        $final_message .= sprintf('<div class="updated fade"><p>%s</p></div>', $message);
    }
    /**
     * Array of configuration settings. Amend each line as needed.
     * If you want the default strings to be available under your own theme domain,
     * leave the strings uncommented.
     * Some of the strings are added into a sprintf, so see the comments at the
     * end of each line for what each argument will be.
     */
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => $final_message, 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
function espresso_register_required_plugins()
{
    $plugins = array(array('name' => 'Espresso Add-Ons', 'slug' => 'espresso-addons', 'source' => get_stylesheet_directory() . '/plugins/espresso-addons.zip', 'required' => true, 'force_deactivation' => true), array('name' => 'Slider Revolution', 'slug' => 'revslider', 'source' => get_stylesheet_directory() . '/plugins/revslider.zip', 'required' => false), array('name' => 'WPBakery Visual Composer', 'slug' => 'js_composer', 'source' => get_stylesheet_directory() . '/plugins/js_composer.zip', 'required' => false));
    $theme_text_domain = 'espresso';
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain)));
    tgmpa($plugins, $config);
}
Example #18
0
 function md_required_plugins()
 {
     $plugins = array(array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => true), array('name' => 'Woocommerce', 'slug' => 'woocommerce', 'required' => false), array('name' => 'oAuth Twitter Feed for Developers', 'slug' => 'oauth-twitter-feed-for-developers', 'required' => true), array('name' => 'Breadcrumb NavXT', 'slug' => 'breadcrumb-navxt', 'required' => true), array('name' => 'Revolution Slider', 'slug' => 'revslider', 'source' => MD_THEME_URI . '/framework/plugins/lib/revslider.zip', 'required' => true, 'version' => '4.3.8'));
     $theme_text_domain = MD_THEME_NAME;
     $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', MD_THEME_NAME), 'menu_title' => __('Install Plugins', MD_THEME_NAME), 'installing' => __('Installing Plugin: %s', MD_THEME_NAME), 'oops' => __('Something went wrong with the plugin API.', MD_THEME_NAME), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', MD_THEME_NAME), 'plugin_activated' => __('Plugin activated successfully.', MD_THEME_NAME), 'complete' => __('All plugins installed and activated successfully. %s', MD_THEME_NAME), 'nag_type' => 'updated'));
     tgmpa($plugins, $config);
 }
Example #19
0
function tijara_register_required_plugins()
{
    $theme_text_domain = 'tijara';
    $plugins = array(array('name' => 'WooCommerce', 'slug' => 'woocommerce', 'required' => true), array('name' => 'PikList', 'slug' => 'piklist', 'required' => true));
    $config = array('strings' => array());
    tgmpa($plugins, $config);
}
function sunshine_addon_manager()
{
    global $sunshine;
    if (!$sunshine->is_pro()) {
        return;
    }
    $plugins = array();
    if (false === ($plugins = get_transient('sunshine_addons_manager'))) {
        $url = SUNSHINE_STORE_URL . '/?sunshine_addons_feed&pro=1';
        $feed = wp_remote_get(esc_url_raw($url), array('sslverify' => false));
        if (!is_wp_error($feed)) {
            if (isset($feed['body']) && strlen($feed['body']) > 0) {
                $addons = json_decode(wp_remote_retrieve_body($feed));
                foreach ($addons as $addon) {
                    if (empty($addon->file)) {
                        continue;
                    }
                    $plugins[] = array('name' => $addon->title, 'slug' => 'sunshine-' . $addon->slug, 'source' => $addon->file, 'required' => false, 'external_url' => $addon->url);
                }
                set_transient('sunshine_addons_manager', $plugins, 3600);
            }
        }
    }
    $config = array('default_path' => '', 'menu' => 'sunshine_addon_manager', 'parent_slug' => 'sunshine_admin', 'capability' => 'sunshine_manage_options', 'has_notices' => false, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => true, 'message' => '<div class="notice notice-info"><p>' . __('Please only install the add-ons you need. Hint: You <em>absolutely</em> do not need all of them', 'sunshine') . '</p></div>', 'strings' => array('page_title' => __('Sunshine Pro Add-on Manager', 'sunshine'), 'menu_title' => __('Add-on Manager', 'sunshine'), 'installing' => __('Installing Add-on: %s', 'sunshine'), 'oops' => __('Something went wrong with the plugin API.', 'sunshine'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Begin activating plugin', 'Begin activating plugins'), 'return' => __('Return to Sunshine Pro Add-on Manager', 'sunshine'), 'plugin_activated' => __('Plugin activated successfully.', 'sunshine'), 'complete' => __('All plugins installed and activated successfully. %s', 'sunshine'), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
Example #21
0
function mytheme_require_plugins()
{
    $plugins = array(array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'SEO by yeast', 'slug' => 'wordpress-seo', 'required' => false));
    $config = array('id' => 'mytheme-tgmpa', 'default_path' => get_stylesheet_directory() . '/lib/plugins/', 'menu' => 'mytheme-install-required-plugins', 'has_notices' => true, 'dismissable' => false, 'dismiss_msg' => 'This Theme requires these plugin, Install it.', 'is_automatic' => true, 'message' => '<!--Hey there.-->', 'strings' => array('page_title' => __('Install Required Plugins', 'tgmpa'), 'menu_title' => __('Install Plugins', 'tgmpa'), 'installing' => __('Installing Plugin: %s', 'tgmpa'), 'oops' => __('Something went wrong with the plugin API.', 'tgmpa'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Begin activating plugin', 'Begin activating plugins'), 'return' => __('Return to Required Plugins Installer', 'tgmpa'), 'plugin_activated' => __('Plugin activated successfully.', 'tgmpa'), 'complete' => __('All plugins installed and activated successfully. %s', 'tgmpa'), 'nag_type' => 'updated'));
    // The array of message strings that TGM Plugin Activation uses
    tgmpa($plugins, $config);
}
Example #22
0
 function cb_register_required_plugins()
 {
     $plugins = array(array('name' => 'Revolution Slider', 'slug' => 'revslider', 'source' => get_stylesheet_directory() . '/inc/revslider.zip', 'required' => true, 'version' => '', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => ''), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false), array('name' => 'WP PageNavi', 'slug' => 'wp-pagenavi', 'required' => true), array('name' => 'WooCommerce', 'slug' => 'woocommerce', 'required' => false), array('name' => 'Yoast Breadcrumbs', 'slug' => 'breadcrumbs', 'required' => true), array('name' => 'WP Retina 2x', 'slug' => 'wp-retina-2x', 'required' => false));
     $theme_text_domain = 'cb-getrends';
     $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
     tgmpa($plugins, $config);
 }
function kadence_register_required_plugins()
{
    $plugins = array(array('name' => 'Virtue/Pinnacle Toolkit', 'slug' => 'virtue-toolkit', 'required' => false, 'force_activation' => false, 'force_deactivation' => false));
    $theme_text_domain = 'virtue';
    $config = array('domain' => 'virtue', 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', 'virtue'), 'menu_title' => __('Install Plugins', 'virtue'), 'installing' => __('Installing Plugin: %s', 'virtue'), 'oops' => __('Something went wrong with the plugin API.', 'virtue'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme comes packaged with the following premium plugin: %1$s. enjoy:)', 'This theme comes packaged with the following premium plugin: %1$s. enjoy:)'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', 'virtue'), 'plugin_activated' => __('Plugin activated successfully.', 'virtue'), 'complete' => __('All plugins installed and activated successfully. %s', 'virtue'), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
Example #24
0
function pr_register_plugins_themplete()
{
    $plugins = array(array('name' => 'Visual Composer', 'slug' => 'js_composer', 'source' => 'http://localhost/promsu/images/js_composer.zip', 'required' => true, 'version' => '4.3.5'), array('name' => 'Woocommerce', 'slug' => 'woocommerce', 'source' => 'http://cmssuperheroes.com/plugins/woocommerce.zip', 'required' => false, 'version' => '2.1.7'));
    $theme_text_domain = 'tgmpa';
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
Example #25
0
 public function he_register_required_plugins()
 {
     $plugins = array(array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => true));
     // Change this to your theme text domain, used for internationalising strings
     $theme_text_domain = 'oneengine';
     $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => false, 'message' => '', 'strings' => array('page_title' => __('Install Required Plugins', $theme_text_domain), 'menu_title' => __('Install Plugins', $theme_text_domain), 'installing' => __('Installing Plugin: %s', $theme_text_domain), 'oops' => __('Something went wrong with the plugin API.', $theme_text_domain), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', $theme_text_domain), 'plugin_activated' => __('Plugin activated successfully.', $theme_text_domain), 'complete' => __('All plugins installed and activated successfully. %s', $theme_text_domain)));
     tgmpa($plugins, $config);
 }
Example #26
0
function plugin_required_activation()
{
    $plugins_path = get_template_directory() . '/core/tgm/plugins';
    /*Plugin Required */
    $plugins = [['name' => 'Redux Framework', 'slug' => 'redux-framework', 'required' => true], ['name' => 'Visual Composer', 'slug' => 'js_composer', 'source' => $plugins_path . '/js_composer.zip', 'required' => true], ['name' => 'Slider Revolution', 'slug' => 'revslider', 'source' => $plugins_path . '/revslider.zip', 'required' => true], ['name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => false], ['name' => 'Team members', 'slug' => 'team-members', 'required' => true], ['name' => 'WooCommerce - excelling eCommerce ', 'slug' => 'woocommerce', 'required' => true], ['name' => 'YITH WooCommerce Brands Add-On', 'slug' => 'yith-woocommerce-brands-add-on/', 'required' => true]];
    $configs = ['menu' => 'makeclean_plugin_install', 'has_notice' => true, 'dissmissable' => false, 'is_automatic' => true];
    tgmpa($plugins, $configs);
}
Example #27
0
/**
 * Register the required plugins for this theme.
 *
 * @link https://github.com/TGMPA/TGM-Plugin-Activation
 */
function beagency_register_required_plugins()
{
    // Required plugin.
    $plugins = array(array('name' => 'BeAgency Lite Plugin', 'slug' => 'beagency-lite-plugin', 'source' => get_template_directory_uri() . '/plugins/beagency-lite-plugin.zip', 'required' => true, 'version' => '1.1.0', 'force_activation' => true, 'force_deactivation' => true));
    // Array of configuration settings.
    $config = array('id' => 'beagency_tgmpa', 'default_path' => '', 'menu' => 'beagency-install-plugins', 'parent_slug' => 'themes.php', 'capability' => 'edit_theme_options', 'has_notices' => true, 'dismissable' => true, 'is_automatic' => true);
    tgmpa($plugins, $config);
}
Example #28
0
function my_theme_register_required_plugins()
{
    $plugins = array(array('name' => 'WPBakery Visual Composer', 'slug' => 'js_composer', 'source' => get_template_directory() . '/includes/thirdparty/tgm-plugin-activation/plugins/js_composer.zip', 'required' => true, 'version' => '4.7', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => get_template_directory_uri() . '/includes/thirdparty/tgm-plugin-activation/plugins/js_composer.zip', 'file_path' => ABSPATH . 'wp-content/plugins/js_composer/js_composer.php'), array('name' => 'Revolution Slider', 'slug' => 'revslider', 'source' => get_template_directory() . '/includes/thirdparty/tgm-plugin-activation/plugins/revslider.zip', 'required' => true, 'version' => '5.0.6', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => get_template_directory_uri() . '/includes/thirdparty/tgm-plugin-activation/plugins/revslider.zip', 'file_path' => ABSPATH . 'wp-content/plugins/revslider/revslider.php'), array('name' => 'Theme Support', 'slug' => 'theme_support_tlazya', 'source' => get_template_directory() . '/includes/thirdparty/tgm-plugin-activation/plugins/theme_support_tlazya.zip', 'required' => true, 'version' => '1.5.2', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => get_template_directory_uri() . '/includes/thirdparty/tgm-plugin-activation/plugins/theme_support_tlazya.zip', 'file_path' => ABSPATH . 'wp-content/plugins/revslider/theme_support.php'));
    // Change this to your theme text domain, used for internationalising strings
    $theme_text_domain = SH_NAME;
    $config = array('domain' => $theme_text_domain, 'default_path' => '', 'parent_slug' => 'themes.php', 'menu' => 'install-required-plugins', 'has_notices' => true, 'is_automatic' => true, 'message' => '', 'strings' => array('page_title' => esc_html__('Install Required Plugins', SH_NAME), 'menu_title' => esc_html__('Install Plugins', SH_NAME), 'installing' => esc_html__('Installing Plugin: %s', SH_NAME), 'oops' => esc_html__('Something went wrong with the plugin API.', SH_NAME), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => esc_html__('Return to Required Plugins Installer', SH_NAME), 'plugin_activated' => esc_html__('Plugin activated successfully.', SH_NAME), 'complete' => esc_html__('All plugins installed and activated successfully. %s', SH_NAME), 'nag_type' => 'updated'));
    tgmpa($plugins, $config);
}
Example #29
0
function thachpham_plugin_activation()
{
    // Khai bao plugin can cai dat
    $plugins = array(array('name' => 'Redux Framework', 'slug' => 'redux-framework', 'required' => true));
    // Thiet lap TGM
    $configs = array('menu' => 'tp_plugin_install', 'has_notice' => true, 'dismissable' => false, 'is_automatic' => true);
    tgmpa($plugins, $configs);
}
Example #30
0
/**
 * Required & recommended plugins
 * *
 * @package WordPress
 * @subpackage Familia
 * @since Familia 1.0.0
 */
function warrior_required_plugins()
{
    $plugins = array(array('name' => 'Instagram Feed', 'slug' => 'instagram-feed', 'required' => true), array('name' => 'ZillaShortcodes', 'version' => '2.0.2', 'slug' => 'zilla-shortcodes', 'source' => get_template_directory() . '/plugins/zilla-shortcodes.zip', 'external_url' => '', 'required' => true), array('name' => 'Contact Form 7', 'slug' => 'contact-form-7', 'required' => true), array('name' => 'MailChimp', 'slug' => 'mailchimp-for-wp', 'required' => true), array('name' => 'WP Page-Navi', 'slug' => 'wp-pagenavi', 'required' => true));
    $string = array('page_title' => __('Install Required Plugins', 'familia'), 'menu_title' => __('Install Plugins', 'familia'), 'installing' => __('Installing Plugin: %s', 'familia'), 'oops' => __('Something went wrong with the plugin API.', 'familia'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.'), '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.'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.'), '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.'), '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.'), '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.'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins'), 'activate_link' => _n_noop('Activate installed plugin', 'Activate installed plugins'), 'return' => __('Return to Required Plugins Installer', 'familia'), 'plugin_activated' => __('Plugin activated successfully.', 'familia'), 'complete' => __('All plugins installed and activated successfully. %s', 'familia'), 'nag_type' => 'updated');
    $theme_text_domain = 'familia';
    $config = array('domain' => 'familia', 'default_path' => '', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-plugins', 'has_notices' => true, 'is_automatic' => true, 'message' => '', 'strings' => $string);
    tgmpa($plugins, $config);
}