Skip to content
This repository was archived by the owner on Feb 21, 2024. It is now read-only.
This repository was archived by the owner on Feb 21, 2024. It is now read-only.

Better test for updated content. #4

@mattheu

Description

@mattheu

The test page is created once and only updated with the content included in the code when the plugin is updated.

However there are 2 issues with the way this is done right now.

Firstly, if you add/remove theme support for align-wide, and the content has already been created, it will NOT be modified to include the tests for wide aligned blocks.

Secondly, because the plugin relies on the hook upgrader_process_complete, if you update the plugin in any way other than using the admin UI - it will not be updated. (e.g if updating manually, or through composer)

I think you could handle this in a way that is more compatible with both of these use cases. Some ideas:

  • Use a filter on the content to ensure the bundled content is always used.
  • Store a hash of the content in post meta and use this to track which version of the content is stored and only update if it has changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions