-
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
Add batch routine to create a block post given block_type_name, title and component #64
Comments
Since there are so many blocks delivered by multiple plugins we need to make it easier to list them. Requirements
Proposed solutionAuto population
example.
|
The keyword category is no longer limited to 3 keywords. |
For improved display of the excerpt the more tag should be after the block info tag. |
The batch routines served their purpose when creating new blocks but were only able to go so far.
I now want to add some PHP server logic that will generate / update the block definition given the block's registration information, including the icon. Proposed solutionImplement an AJAX request Most of the block CPT's fields should be correctly populated. It should then be a case of editing the generated content to create the example(s) and screenshot and adding a link to documentation, if known. Stage 1 - PrototypeIn this first version the AJAX request will be run directly by the user, by right clicking on the link in the block list block and choosing Open link in new window. The output from the AJAX request will be displayed here. This will include a link to edit the post after the create or update has been run. See bobbingwide/oik-blocks#27 for the changes to the Block list block. Stage 2 - ReconciliationThe Block List block will assist in the process, providing buttons to perform the required actions, retrieving the results and displaying them accordingly. |
The json_encode() call used to encode attrs needs to include the additional option required in the oik-clone logic. JSON_UNESCAPED_UNICODE... to not encode Unicode characters. How do I get a backslash on this iPad keyboard? Ah. Use the fn key: |
The original batch routine have been superceded by the AJAX method. This method sometimes fails when the block icon's SVG is enormous. The workaround is to edit the request to remove the icon and run it again. The issue was released in v1.35.0 |
There are over 140 blocks in the first 9 plugins that I want to catalogue. See #61.
Manually creating them takes too long, even with the template for new posts.
Proposed solution
Create a batch routine to generate the posts, setting post_meta, Yoast SEO stuff and so on.
Each block will need editing... but it'll be a kick start.
run from
oik-shortcodes/admin
The text was updated successfully, but these errors were encountered: