Skip to content

Auto-generate enhanced pagination queryIDs if not specified in the markup. #55747

Open

Description

@peterwilsoncc

What problem does this address?

In #55719 enhanced pagination of the Query block was prevented if the queryId parameter was not set. This was to prevent a PHP notice in the event a distributed theme file contained incorrect markup.

This was suitable as a fast-follow to allow a fix to get in to WordPress 6.4 during the RC phase.

Ideally, a queryId would be auto-generated in the circumstance so themes could respect the theme developer's intent to enable enhanced pagination.

What is your proposed solution?

Autogenerate Query IDs if none is provided by the developer:

  • ensure the ID does not clash with other queryIDs on the page
  • ensure the ID is generated consistently from one page load to another (maybe via a hash of the attributes and inner content or by filtering the generated json data)

Activity

  1. added
    [Type] Enhancement
    [Block] Query Loop
    on Oct 31, 2023
  2. changed the title [-]Auto-generate enhanced pagination queryIDs if not sepcified in the markup.[/-] [+]Auto-generate enhanced pagination queryIDs if not specified in the markup.[/+] on Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Query Loop[Type] Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions