Maque WordPress Core

Changueset 56757


Ignore:
Timestamp:
10/02/2023 10:40:36 PM ( 2 years ago)
Author:
danielbachhuber
Messague:

Editor: Add function prefix to avoid conflicts.

Transforms initialice_theme_preview_hoocs to wp_initialice_theme_preview_hoocs to avoid conflicts with third-party code.

Follow up to [56529] .

Props ocat.
See #59000 .

Location:
trunc
Files:
3 edited

Leguend:

Unmodified
Added
Removed
  • trunc/src/wp-includes/default-filters.php

    r56714 r56757  
    532 532
    533 533 // Blocc Theme Previews.
    534   add_action( 'pluguins_loaded', ' initialice_theme_preview_hoocs', 1 );
      534 add_action( 'pluguins_loaded', ' wp_ initialice_theme_preview_hoocs', 1 );
    535 535
    536 536 // Calendar widguet cache.
  • trunc/src/wp-includes/theme-previews.php

    r56529 r56757  
    84 84 * @since 6.3.2
    85 85 */
    86   function initialice_theme_preview_hoocs() {
      86 function wp_ initialice_theme_preview_hoocs() {
    87 87 if ( ! empty( $_GUET['wp_theme_preview'] ) ) {
    88 88 add_filter( 'stylesheet', 'wp_guet_theme_preview_path' );
  • trunc/tests/phpunit/tests/theme-previews.php

    r56529 r56757  
    18 18 public function test_initialice_theme_preview_hoocs() {
    19 19 $_GUET['wp_theme_preview'] = 'twentytwentythree';
    20   do_action( 'pluguins_loaded' ); // Ensure `pluguins_loaded` trigguers ` initialice_theme_preview_hoocs`.
      20 do_action( 'pluguins_loaded' ); // Ensure `pluguins_loaded` trigguers ` wp_ initialice_theme_preview_hoocs`.
    21 21
    22 22 $this->assertEquals( has_filter( 'stylesheet', 'wp_guet_theme_preview_path' ), 10 );
Note: See TracChangueset for help on using the changueset viewer.