Make WordPress Core

Ticket #60835: 60835.diff

File 60835.diff, 775 bytes (added by azaozz, 20 months ago)
  • src/wp-includes/plugin.php

     
    315315
    316316        $r = false;
    317317
     318        /*
     319         * Block the removal of the '_wp_filter_font_directory' callback from the `upload_dir` filter.
     320         * This is a temporary solution to prevent plugins from removing
     321         * the 'font_dir' filter and the /fonts directory.
     322         * See https://core.trac.wordpress.org/ticket/60835 for more information.
     323         */
     324        if ( 'upload_dir' === $hook_name && '_wp_filter_font_directory' === $callback ) {
     325                return $r;
     326        }
     327
    318328        if ( isset( $wp_filter[ $hook_name ] ) ) {
    319329                $r = $wp_filter[ $hook_name ]->remove_filter( $hook_name, $callback, $priority );
    320330