Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to Plugin #41

Merged
merged 4 commits into from
Jan 21, 2021
Merged

Convert to Plugin #41

merged 4 commits into from
Jan 21, 2021

Conversation

jdamner
Copy link
Contributor

@jdamner jdamner commented Jan 7, 2021

In support of issue #12 I've updated so can be distributed as a plugin via composer.

Set plugin name etc at start of plugin file.
Added composer/installers as dep and set type to wordpress-muplugin.

Set plugin name etc at start of plugin file.
Added composer/installers as dep and set type to wordpress-muplugin.
@jdamner jdamner changed the title Issue #12 Convert to Plugin Jan 7, 2021
@palmiak
Copy link
Owner

palmiak commented Jan 7, 2021

I like the idea of mu-plugin 👍

Just two questions - what would happen if someone would try install this in the theme?

Also what would happen in a scenario like this:

  • user had this installed as a library
  • after update it installed as a mu-plugin - will the library version be removed?

Let me be clear - I love the idea but I'm wondering wouldn't it be better to create a separate repo (even with compiled zips) of the mu-plugin version to be sure that we won't have any problems.

@jdamner
Copy link
Contributor Author

jdamner commented Jan 7, 2021 via email

@palmiak
Copy link
Owner

palmiak commented Jan 7, 2021

That's great to hear. Ok I will try it with the extra wrapper so it won't register twice and see if it works correctly.

@palmiak
Copy link
Owner

palmiak commented Jan 8, 2021

@jdamner just ❤️ for the documentations fixes.

@palmiak palmiak merged commit 601cd54 into palmiak:master Jan 21, 2021
@palmiak
Copy link
Owner

palmiak commented Jan 22, 2021

After merging I did one more test to saw some problems:

  • if I were using this as a library after running composer update it installed into {theme}/wp-content/mu-plugins directory - which is correct because the composer was in the theme.
  • the second thing - Bedrock has the autoloader that helps running plugins in folders. But it's not a standard.

I understand we could set it in composer but running composer update would be be breaking operation (which we don't want).

Overall - my plan is to have separate repositories:

  • this will stay as library
  • second as plugin (not mu-plugin) - to be sure it will work on every installation

So overall - I will remove update the composer update part and fix the documentation a bit.

@palmiak
Copy link
Owner

palmiak commented Jan 22, 2021

The plugin version is here https://github.com/palmiak/timber-acf-wp-blocks-plugin - could you test this?

using composer require palmiak/timber-acf-wp-blocks-plugin should work.

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

Successfully merging this pull request may close these issues.

2 participants