Skip to content
Snippets Groups Projects
Verified Commit ad51c9a0 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

add possibility to choose mu_plugin URL

parent ec1ff5c3
No related branches found
No related tags found
1 merge request!102Resolve "Custom plugin for WP"
Pipeline #11552 passed with stage
in 57 seconds
......@@ -87,10 +87,14 @@ wordpress:
mu_plugins_enabled: false
mu_plugins_dir: mu-plugins
mu_plugins:
block-bad-queries:
name: Block Bad Queries
version: 20200319
phpfile: block-bad-queries.php
block-bad-queries:
name: Block Bad Queries
phpfile: block-bad-queries.php
url: https://downloads.wordpress.org/plugin/block-bad-queries.20200319.zip
stackspin:
name: Stackspin
phpfile: stackspin-plugin.php
url: https://github.com/level73/stackspin-plugin/archive/refs/heads/main.zip
## Enable externally triggered cron for an MU cron plugin
# NOTE: mu_plugins *must* be enabled if you want to enable mu_cron
......
......@@ -14,9 +14,6 @@
- name: Set MU plugins url in wp-config
shell: wp {{ cli_args }} config set 'WPMU_PLUGIN_URL' "'{{ WP_URL }}/wp-content/mu-plugins'" --raw --type=constant
- name: Set mu_cron salt value
shell: wp {{ cli_args }} config set 'WP_CRON_CONTROL_SECRET' "{{ WP_MU_CRON_SETTINGS.secret }}" --add --type=constant
# MU plugins directory and loader
- name: Add a MU plugins directory when WP_MU_PLUGINS_DIR is set
......@@ -26,7 +23,7 @@
state: directory
- name: Fetch and unzip plugins in-place
shell: curl -L https://downloads.wordpress.org/plugin/{{ wp_mu_plugin.key }}.{{ wp_mu_plugin.value.version}}.zip | unzip -q -o -d {{ WP_CONTENT_MOUNT }}/{{ WP_MU_PLUGINS_DIR }} -
shell: curl -L {{ wp_mu_plugin.url }} | unzip -q -o -d {{ WP_CONTENT_MOUNT }}/{{ WP_MU_PLUGINS_DIR }} -
loop: "{{ WP_MU_PLUGINS | dict2items }}"
loop_control:
loop_var: wp_mu_plugin
......@@ -49,6 +46,10 @@
### Install wp-cron as mu
- name: Set mu_cron salt value
shell: wp {{ cli_args }} config set 'WP_CRON_CONTROL_SECRET' "{{ WP_MU_CRON_SETTINGS.secret }}" --add --type=constant
when: WP_MU_CRON_ENABLED
- name: Shallow clone from the github repository
git:
repo: "{{ WP_MU_CRON_SETTINGS.repo}}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment