Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #58891


Ignore:
Timestamp:
07/24/2023 06:49:09 PM (3 years ago)
Author:
flixos90
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58891 – Description

    initial v1  
    33In order to decentralize the knowledge and understanding from just the few people that were involved in its implementation so far, this ticket aims to rewrite the function using a more coherent approach, which avoids most of the early returns and potentially uses a `switch` clause for the different context values.
    44
    5 While refactoring on its own is generally discouraged in WordPress core, this refactoring will benefit, simplify, or even enable several other tickets.
     5While refactoring on its own is generally discouraged in WordPress core, this refactoring will benefit, simplify, or even enable several other tickets:
     6* #58892
     7* #58893
     8* #58894
    69
    710It should however not be implemented as part of any of those tickets, since that could easily lead to oversights due to the complex logic. The goal of this ticket should be to refactor the logic in a way that all existing tests pass without any modifications. Coverage is quite extensive on this function (at least that!), so this is a good framework to follow here.