namespace :wordpress do
desc "Install the SOZO MU plugins to stop frontend output when logged into WordPress" task :sozo_mu do on roles(:all) do execute :cp, '-a', "#{release_path}/environments/global/wp/wp-content/mu-plugins/.", "#{release_path}/magento/wp/wp-content/mu-plugins/" end end desc "Tidy up the installation (remove un-needed files)" task :cleanup do on roles :all do |host| within release_path + "magento/wp/" do info "Removing default unused WordPress Plugins and Themes" if fetch(:wp_disable_plugins).length >= 1 execute :wp, 'plugin', 'deactivate', fetch(:wp_disable_plugins) end if fetch(:wp_delete_plugins).length >= 1 execute :wp, 'plugin', 'delete', fetch(:wp_delete_plugins) end if fetch(:wp_delete_themes).length >= 1 execute :wp, 'theme', 'delete', fetch(:wp_delete_themes) end execute :rm, '-f', 'readme.html' end end end
end