Example #1
0
def update_plugins(wp_env,
                   wp_url,
                   plugin=None,
                   force_plugin=False,
                   force_options=False,
                   strict_list=False,
                   extra_config=None,
                   **kwargs):

    _check_site(wp_env, wp_url, **kwargs)

    all_params = {'openshift_env': wp_env, 'wp_site_url': wp_url}

    # if we have extra configuration to load,
    if extra_config is not None:
        all_params = _add_extra_config(extra_config, all_params)

    wp_generator = WPGenerator(all_params)

    wp_generator.update_plugins(only_one=plugin,
                                force_plugin=force_plugin,
                                force_options=force_options,
                                strict_plugin_list=strict_list)

    print("Successfully updated WordPress plugin list at {}".format(
        wp_generator.wp_site.url))
Example #2
0
def update_plugins(wp_env, wp_url, plugin=None, force=False, **kwargs):

    _check_site(wp_env, wp_url, **kwargs)

    wp_generator = WPGenerator({
        'openshift_env': wp_env,
        'wp_site_url': wp_url
    })

    wp_generator.update_plugins(only_one=plugin, force=force)

    print("Successfully updated WordPress plugin list at {}".format(
        wp_generator.wp_site.url))