Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #58286


Ignore:
Timestamp:
05/10/2023 02:05:18 PM (11 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58286 – Description

    initial v1  
    11I created 2 external links in the block editor. This created 2 different transients in the database in wp_options, that have a different dynamic part at the end:
    2 
     2{{{
    33_site_transient_g_url_details_response_ab62baf1c770821f259d255001f7a9b9
    44_site_transient_g_url_details_response_f6ce245428f26d29c355a44ceb3b9bf3
     5}}}
    56
    67This transient contains "g_url_details_response_" and is produced by file class-wp-rest-url-details-controller.php
     
    1718
    1819I tryed it using this filter:
     20{{{
    1921apply_filters( "pre_set_site_transient_{$transient}", mixed $value, string $transient )
     22}}}
    2023
    2124But it needs full transient name, which is created dynamically using this function
    22 
     25{{{
    2326private function build_cache_key_for_url( $url ) {
    24                 return 'g_url_details_response_' . md5( $url );
    25         }
    26 
     27        return 'g_url_details_response_' . md5( $url );
     28}
     29}}}
    2730from file class-wp-rest-url-details-controller.php
    2831