예제 #1
0
     * with WordPress.
     *
	 * @since    1.0.0
	 * @access   private
	*/
    private function load_dependencies()
    {
        /**
예제 #2
0
function colabs_setup_orders()
{
    $statuses = array(COLABS_ORDER_PENDING => _n_noop('Pending <span class="count">(%s)</span>', 'Pending <span class="count">(%s)</span>', 'colabsthemes'), COLABS_ORDER_FAILED => _n_noop('Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'colabsthemes'), COLABS_ORDER_COMPLETED => _n_noop('Completed <span class="count">(%s)</span>', 'Completed <span class="count">(%s)</span>', 'colabsthemes'), COLABS_ORDER_ACTIVATED => _n_noop('Activated <span class="count">(%s)</span>', 'Activated <span class="count">(%s)</span>', 'colabsthemes'));
    foreach ($statuses as $status => $translate_string) {
        register_post_status($status, array('public' => true, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => $translate_string));
    }
}
예제 #3
0
 /**
  * Post statuses for payments
  * @return
  */
 private static function register_post_statuses()
 {
     $statuses = self::get_statuses();
     foreach ($statuses as $status => $label) {
         register_post_status($status, array('label' => $label, 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop($label . ' <span class="count">(%s)</span>', $label . ' <span class="count">(%s)</span>')));
     }
 }
예제 #4
0
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);
}
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);
}
예제 #6
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);
 }
 /**
  * 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);
 }
예제 #8
0
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);
}
예제 #9
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);
 }
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);
}
예제 #11
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);
 }
예제 #12
0
 public function registerOrderStatuses()
 {
     $statuses = Status::getStatuses();
     foreach ($statuses as $status => $label) {
         $this->wp->registerPostStatus($status, array('label' => $label, 'public' => false, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop($label . ' <span class="count">(%s)</span>', $label . ' <span class="count">(%s)</span>', 'jigoshop')));
     }
 }
예제 #13
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);
 }
예제 #14
0
 function olr_new_post_status()
 {
     register_post_status('confirmed', array('label' => 'Confirmed', 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop('Confirmed <span class="count">(%s)</span>', 'Confirmed <span class="count">(%s)</span>')));
     register_post_status('closed', array('label' => 'Closed', 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop('Closed <span class="count">(%s)</span>', 'Closed <span class="count">(%s)</span>')));
     register_post_status('pending', array('label' => 'Pending', 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop('Pending <span class="count">(%s)</span>', 'Pending <span class="count">(%s)</span>')));
     register_post_status('enquiry', array('label' => 'Enquiry', 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop('Enquiry <span class="count">(%s)</span>', 'Enquiry <span class="count">(%s)</span>')));
 }
예제 #15
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);
}
예제 #16
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 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);
}
예제 #17
0
 /**
  * Post statuses for payments
  * @return  
  */
 private static function register_post_statuses()
 {
     $statuses = array(self::STATUS_AUTHORIZED => self::__('Authorized'), self::STATUS_CANCELLED => self::__('Cancelled'), self::STATUS_PARTIAL => self::__('Partial Payment'), self::STATUS_VOID => self::__('Void'), self::STATUS_REFUND => self::__('Refunded'), self::STATUS_RECURRING => self::__('Recurring'));
     foreach ($statuses as $status => $label) {
         register_post_status($status, array('label' => $label, 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop($label . ' <span class="count">(%s)</span>', $label . ' <span class="count">(%s)</span>')));
     }
 }
예제 #18
0
 /**
  * Register Post Statuses
  */
 public function register()
 {
     // preview post status
     register_post_status('preview', array('label' => _x('Preview', 'post status', 'wp-car-manager'), 'public' => false, 'exclude_from_search' => true, 'show_in_admin_all_list' => false, 'show_in_admin_status_list' => true, 'label_count' => _n_noop('Preview <span class="count">(%s)</span>', 'Preview <span class="count">(%s)</span>', 'wp-car-manager')));
     // expired post status
     register_post_status('expired', array('label' => _x('Expired', 'post status', 'wp-car-manager'), 'public' => false, 'protected' => true, 'exclude_from_search' => true, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop('Expired <span class="count">(%s)</span>', 'Expired <span class="count">(%s)</span>', 'wp-car-manager')));
 }
예제 #19
0
 function __construct()
 {
     $this->add_shortcode();
     // While generating the output of a text widget with a contact-form shortcode, we need to know its widget ID.
     add_action('dynamic_sidebar', array($this, 'track_current_widget'));
     // Add a "widget" shortcode attribute to all contact-form shortcodes embedded in widgets
     add_filter('widget_text', array($this, 'widget_atts'), 0);
     // If Text Widgets don't get shortcode processed, hack ours into place.
     if (!has_filter('widget_text', 'do_shortcode')) {
         add_filter('widget_text', array($this, 'widget_shortcode_hack'), 5);
     }
     // Akismet to the rescue
     if (function_exists('akismet_http_post')) {
         add_filter('contact_form_is_spam', array($this, 'is_spam_akismet'), 10);
         add_action('contact_form_akismet', array($this, 'akismet_submit'), 10, 2);
     }
     add_action('loop_start', array('Grunion_Contact_Form', '_style_on'));
     // custom post type we'll use to keep copies of the feedback items
     register_post_type('feedback', array('labels' => array('name' => __('Feedbacks', 'jetpack'), 'singular_name' => __('Feedback', 'jetpack'), 'search_items' => __('Search Feedback', 'jetpack'), 'not_found' => __('No feedback found', 'jetpack'), 'not_found_in_trash' => __('No feedback found', 'jetpack')), 'menu_icon' => GRUNION_PLUGIN_URL . '/images/grunion-menu.png', 'show_ui' => TRUE, 'show_in_admin_bar' => FALSE, 'public' => FALSE, 'rewrite' => FALSE, 'query_var' => FALSE, 'capability_type' => 'page'));
     // Add "spam" as a post status
     register_post_status('spam', array('label' => 'Spam', 'public' => FALSE, 'exclude_from_search' => TRUE, 'show_in_admin_all_list' => FALSE, 'label_count' => _n_noop('Spam <span class="count">(%s)</span>', 'Spam <span class="count">(%s)</span>', 'jetpack'), 'protected' => TRUE, '_builtin' => FALSE));
     // POST handler
     if ('POST' == strtoupper($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 'grunion-contact-form' == $_POST['action'] && isset($_POST['contact-form-id'])) {
         add_action('template_redirect', array($this, 'process_form_submission'));
     }
     /* Can be dequeued by placing the following in wp-content/themes/yourtheme/functions.php
      *
      * 	function remove_grunion_style() {
      *		wp_deregister_style('grunion.css');
      *	}
      *	add_action('wp_print_styles', 'remove_grunion_style');
      */
     wp_register_style('grunion.css', GRUNION_PLUGIN_URL . 'css/grunion.css', array(), JETPACK__VERSION);
 }
예제 #20
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);
}
 public function dln_company_status_filters()
 {
     $types = self::get_company_status();
     foreach ($types as $name => $type) {
         register_post_status($name, array('label' => $type, 'private' => true, '_builtin' => true, 'label_count' => _n_noop($type . ' <span class="count">(%s)</span>', $type . ' <span class="count">(%s)</span>')));
     }
 }
 private function edit_pages_query()
 {
     $post_stati = array('publish' => array(__('Published'), __('Published pages'), _n_noop('Published (%s)', 'Published (%s)')), 'future' => array(__('Scheduled'), __('Scheduled pages'), _n_noop('Scheduled (%s)', 'Scheduled (%s)')), 'pending' => array(__('Pending Review'), __('Pending pages'), _n_noop('Pending Review (%s)', 'Pending Review (%s)')), 'draft' => array(__('Draft'), _c('Drafts|manage posts header'), _n_noop('Draft (%s)', 'Drafts (%s)')), 'private' => array(__('Private'), __('Private pages'), _n_noop('Private (%s)', 'Private (%s)')));
     if (function_exists('wp_trash_post') && EMPTY_TRASH_DAYS) {
         $post_stati['trash'] = array(_x('Trash', 'page'), __('Trash pages'), _n_noop('Trash (%s)', 'Trash (%s)'));
     }
     $post_stati = apply_filters('post_stati', $post_stati);
     $per_page = intval(($this->base->get('page_size') - self::HEADER_FOOTER_SIZE) / self::COLUMN_SIZE);
     if ($per_page < 1) {
         $per_page = 1;
     } elseif ($per_page > 15) {
         $per_page = 15;
     }
     if (isset($_GET['filter'])) {
         $pagenum = 1;
     } else {
         $pagenum = isset($_GET['paged']) ? intval($_GET['paged']) : 1;
     }
     $query = array('post_type' => 'page', 'what_to_show' => 'posts', 'post_status' => 'any', 'posts_per_page' => -1, 'posts_per_archive_page' => -1, 'orderby' => 'menu_order title', 'order' => 'ASC', 's' => $this->search);
     if (isset($_GET['post_status'])) {
         $post_status = stripslashes($_GET['post_status']);
         if (in_array($post_status, array_keys($post_stati))) {
             $query['post_status'] = $post_status;
             $query['perm'] = 'readable';
         }
     }
     $query = apply_filters('manage_pages_query', $query);
     query_posts($query);
     return array($post_stati, $pagenum, $per_page);
 }
예제 #23
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 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);
 }
예제 #25
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);
}
 /**
  * register_custom_post_statuses.
  */
 public function register_custom_post_statuses()
 {
     $wcj_orders_custom_statuses_array = '' == get_option('wcj_orders_custom_statuses_array') ? array() : get_option('wcj_orders_custom_statuses_array');
     foreach ($wcj_orders_custom_statuses_array as $slug => $label) {
         register_post_status($slug, array('label' => $label, 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop($label . ' <span class="count">(%s)</span>', $label . ' <span class="count">(%s)</span>')));
     }
 }
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);
}
예제 #28
0
/**
 * 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);
}
예제 #29
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);
 }
 private function registerPostStatus()
 {
     foreach (SLN_Enum_BookingStatus::toArray() as $k => $v) {
         register_post_status($k, array('label' => $v, 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop($v . ' <span class="count">(%s)</span>', $v . ' <span class="count">(%s)</span>')));
     }
     add_action('transition_post_status', array($this, 'transitionPostStatus'), 10, 3);
 }