Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #58962, comment 35


Ignore:
Timestamp:
10/23/2023 10:09:41 PM (12 months ago)
Author:
flixos90
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58962, comment 35

    initial v1  
    11Regardless of whether the existing `_prime_*_caches()` function are now meant to be used by others or not, I don't think it makes sense to use an underscore prefixed name for a public function, for the reasons outlined above.
    22
    3 The existing functions were already introduced before, and given they are intended to be public now, their names are technically not appropriate. Of course I understand why, it is because the use-case for the function would have changed after their introduction. But that is not the case for new functions we're introducing now. Therefore, I don't think it makes sense to knowingly make a naming "mistake" on a new function when we don't have to.
     3The existing functions were already introduced before, and given they are intended to be public now, their names are technically not appropriate. Of course I understand why, it is because the use-case for the function would have changed after their introduction. But that is not the case for new functions we're introducing now. Therefore, I don't think it makes sense to knowingly make a naming "mistake" on a new function when we don't have to. I would support deprecation and renaming of the existing `_prime_*_caches()` functions for that reason.
    44
    55Last but not least, using the term "load" as @joemcgill suggested is easier to understand than "prime", ''and'' it is aligned with the closely related `wp_load_alloptions()` and `wp_load_core_site_options()` functions and their names. In fact, the functions are introduced as a replacement for relying on autoloaded options ("alloptions").