Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Consider adding a block based theme automatically (tt1-blocks) #13

Open
youknowriad opened this issue Jun 22, 2021 · 1 comment
Open

Comments

@youknowriad
Copy link

A lot of PRs these days are about Full Site Editing features requiring a block theme. Can we have tt1-blocks installed by default?

@aduth
Copy link
Member

aduth commented Jun 23, 2021

👋

There's some prior art to this with the time-remaining and disable-nux plugins installed by default as mu-plugins:

RUN curl https://raw.githubusercontent.com/aduth/wp-time-remaining/master/index.php > wp-content/mu-plugins/time-remaining.php
RUN curl https://raw.githubusercontent.com/aduth/wp-disable-nux/master/index.php > wp-content/mu-plugins/disable-nux.php

Those are pretty simple examples though, since they're single file plugins.

A zip might not be much more difficult if you'd extract it to a folder, then write a loader file like described in this page:

https://wordpress.org/support/article/must-use-plugins/

WordPress only looks for PHP files right inside the mu-plugins directory, and (unlike for normal plugins) not for files in subdirectories. You may want to create a proxy PHP loader file inside the mu-plugins directory:

e.g.

RUN curl -o my-plugin.zip http://example.com/plugin.zip && \
  unzip my-plugin.zip -d wp-content/mu-plugins/my-plugin && \
  echo "<?php require WPMU_PLUGIN_DIR . '/my-plugin/my-plugin.php';" && \
  rm my-plugin.zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants