-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve the process for adding / updating block plugins #2
Comments
In the first stage of this development we'll copy the functions from the We'll implement the logic to:
|
…download and install the plugin version
Note: Some plugins aren't versioned in wordpress.org.
|
In the next stage we'll attach the banner image to the oik_plugin post. |
Then we'll add logic to update the post content to match the desired structure, if the content doesn't already contain a bw_plug shortcode. And logic to create the oik-plugins post if it doesn't already exist. |
Now we need to improve the creation of the block list block. Adding the ‘component’ is easy. Getting the prefix is harder. the prefix can be found using v1.2 of the WordPress plugins api. I’ve added some logic to the downloads routine in wp-top12 that gets the list of blocks known to wordpress.org. Seems to work. |
This routine’s been working reasonably well but needs a couple of tweaks.
|
15 months later...
So less than half way. RequirementsThere are some plugins with many blocks and variations that I haven't catalogued Example plugins:
For the complete list of numbers of blocks to be catalogued see https://blocks.wp-a2z.org/about/block-plugin-summary/ Proposed solution
WIBNI's...
|
Using the The Block title is Social Share Buttons but the generated block has a post title prefixed with Algori Workaround is to remove the Algori prefix from the generated block's post title and update the permalink. |
|
The
But it's no good for existing plugins that needs updating. RequirementImprove the process such that if no parameters to The logic that detects if the plugin is a Git repo should not apply updates to plugins in the WP-a2z organization. Proposed solutionObtain the list of plugins to be updated from the For each plugin in the list apply the updates to the plugin and any blocks listed in block.json files. Note: Similar logic can be applied for themes. |
I changed the logic to get a list of plugins to be updated. There are a couple of problems.
|
I also got the same Fatal attempting to upload the todo-list-block banner. |
Having implemented the changes to
|
|
Several blocks with
Correcting the problem involved matching the
|
When applying automatic updates we can save a bit of processing by using information from the plugin_info structure.
Here we can see:
|
After updating plugins and blocks, oik-loader's Rebuild index logic shoud be run automatically. ImplementationThis is not the same as visiting |
In wp.a2z I have multiple versions of Gutenberg installed. A couple of the versions are back level, they always appear to need updating. oik-blocker runs this when it's unnecessary. Perhaps it should ignore any plugin that starts Gutenberg |
To cater for plugins which don’t use block.json files, it might make sense to invoke a server function that will determine the blocks that are registered in the server and create/update the block post from this list. The process will involve
The first thing to write here are steps 2 and 3. |
I started writing some code for step 2 and quickly discovered that this may be a non-starter.
Differences for Jetpack are: I didn't look at the differences for CoBlocks or Stackable |
For plugin version updates I'm now considering another client-server solution that will perform a reconciliation of the blocks listed in the front end with those registered in the server for the selected component.
|
Regarding Stackable ( stackable-ultimate-gutenberg-blocks ).
Since v3 Stackable's blocks
Other than changing the title, I reckon I'll leave the documentation for the v2 blocks as they are. |
Issue #1 makes it easier to get a new run time version of a component in a Git repo which just contains the released versions. This is needed for re-parsing the PHP, using the oik-shortcodes batch routine.
For components which deliver WordPress blocks ( primarily plugins ) we also want to be able to automate, as far as is possible, the process of registering the plugin and identifying and then registering the blocks delivered by the plugin.
We want a process similar to
oik-update.php
which will bring together the manual steps required. The process should take into consideration whether or not the plugin has an existing Git repository. Ideally the routine would be run as a batch routine. For the time being we’ll call itoik-blocker.php
Syntax:
Where
Plugin is the name of the plugin to download
Version is the version number to download - latest will do
Etc are other parameters we might need to pass manually
The manual process will need to evolve to cater for my development and run-time environments.
The text was updated successfully, but these errors were encountered: