Git Product home page Git Product logo

oik-update's Introduction

oik-update

banner

oik-batch routines to semiautomate the process of updating

  • the WP-a2z API reference for WordPress core, selected plugins and themes
  • document blocks for the WordPress block editor - Gutenberg
  • document Full Site Editing themes

Description

oik-update provides three batch routines which are invoked by oik-batch.

  • oik-blocker.php to improve the generation of blocks for plugins listed in blocks.wp-a2z.org
  • oik-themer.php to improve the registration of FSE themes listed in blocks.wp-a2z.org
  • oik-update.php to improve applying API updates for WordPress, plugins or themes

These are run from 3 command line routines, which use oik-batch run against --url=blocks.wp.a2z

  • blocks.bat
  • themes.bat
  • update.bat

Installation

  1. Install as if it were a WordPress plugin
  2. Invoke using oik-batch

Dependent upon:

  • oik-batch
  • wp-top12
  • Various plugins used in WP-a2z.

Screenshots

None

Upgrade Notice

1.2.1

Upgrade for improvements to oik-themer.php and oik-update.php

Changelog

1.2.1

  • Changed: Support PHP 8.1 and PHP 8.2 #8
  • Changed: Improve process for adding/updating themes #4
  • Changed: Improve process for adding/updating plugins #2
  • Fixed: Set overwrite_package to true when updating a theme #6
  • Tested: With WordPress 6.4-RC3 and WordPress Multisite
  • Tested: With Gutenberg 16.9.0
  • Tested: With PHP 8.1 and PHP 8.2

Further reading

If you want to read more about oik plugins and themes then please visit oik-plugins

oik-update's People

Contributors

bobbingwide avatar

Watchers

 avatar  avatar

oik-update's Issues

Deprecated message registering Jace's block patterns

While testing the new improved patterns display in blocks.wp.a2z I came across a Doing it wrong message.

Notice: Function _register_theme_block_patterns was called incorrectly. Could not register file "C:\apache\htdocs\wp-a2z/wp-content/themes/jace/patterns/register-block-patterns.php" as a block pattern ("Slug" field missing) Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.) in C:\apache\htdocs\wp-a2z\wp-includes\functions.php on line 5831

The code in gutenberg_register_theme_block_patterns() is trying to process the register-block-patterns.php file as a pattern.

The $pattern_data for this file is

C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\compat\wordpress-6.1\block-patterns.php(72:0) gutenberg_register_theme_block_patterns(37) 105 4 2022-10-08T16:13:56+00:00 1.285582 0.000946 cf=init 8333 12 0 6291456/6291456 512M F=688 pattern data for C:\apache\htdocs\wp-a2z/wp-content/themes/jace/patterns/register-block-patterns.php Array

    [title] => (string) ""
    [slug] => (string) ""
    [description] => (string) ""
    [viewportWidth] => (string) ""
    [categories] => (string) ""
    [keywords] => (string) ""
    [blockTypes] => (string) ""
    [postTypes] => (string) ""
    [inserter] => (string) ""

hence the message I saw.

C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\includes\bwtrace-actions.php(198:2) bw_trace_doing_it_wrong_run(1) 106 5 2022-10-08T16:13:56+00:00 1.286035 0.000453 cf=init,doing_it_wrong_run 8336 12 0 6291456/6291456 512M F=688 3 Array

    [0] => (string) "_register_theme_block_patterns"
    [1] => (string) "Could not register file "C:\apache\htdocs\wp-a2z/wp-content/themes/jace/patterns/register-block-patterns.php" as a block pattern ("Slug" field missing)"
    [2] => (string) "6.0.0"

Improve the process for adding / updating block plugins

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 it oik-blocker.php

Syntax:

cd wp-content/plugins/oik-update
oikwp oik-blocker.php plugin version etc etc

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.

Add a block rename routine to rename core-embeds

Between WordPress 5.6 and WordPress 5.6 the blocks prefixed core-embed were changed to variations of the core/embed block.
The oik-block posts for each of these blocks need to be updated.

Requirement

  • a batch process to rename the existing posts
  • If specified do all the core-embed blocks
  • otherwise do the one specified - defaults to core-embed/amazon-kindle changing to core/embed:amazon-kindle
  • variation indicated by the separating colon.

Proposed solution

  • develop and run oik-block-rename.php
  • apply manual updates to take into account other changes
  • clone the posts to core.wp-a2z.org

Improve the process for updating wp-a2z.org

I need to improve the method whereby updates to plugins and themes can be applied to wp-a2z.org efficiently. A time consuming part of the process has been downloading the latest runtime version of a component, extracting it to the WP-a2z repository, updating the repository and then running the batch process to rebuild the API reference.

This issue is to document the requirements and solution for building the API reference for the existing plugins and themes.

The logic has to cater for exceptions such as:

  1. The repository name for WordPress is wp-a2z.
  2. wp-a2z has some hand cranked files: README.md and .gitignore
  3. The Genesis theme framework is not downloadable from wordpress.org

Cater for new default themes such as twentytwentyfour

When a new release of WordPress is under development which contains a new default bundled theme the theme isn't yet available from wordpress.org/themes but it would be nice to document the new theme.
twentytwentyfour is the new theme to be bundled into WordPress 6.4

Requirement

  • Add logic to support documenting of a new WordPress bundled theme prior to its actual appearance in wordpress.org/themes

Improve the process for adding / updating FSE themes

There are now 31 FSE themes registered in wordpress.org https://wordpress.org/themes/tags/full-site-editing/
I need a quick process that will register the themes in blocks.wp.a2z then clone them to blocks.wp-a2z.org
OR to simply run on the live server.

  • oik-blocker is used for updating blocks
  • oik-update is used for update the API reference
  • oik-themer is needed to define and update themes

Proposed solution

  • Download the theme's zip
  • Unpack to wp-a2z
  • fetch theme info
  • create / update theme
  • set featured image to screenshot
  • find directory for patterns

It may not be necessary to download the theme to the local installation other than to be able to verify that the templates, template parts and patterns are located. Not that there's support for patterns yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.