diff --git a/lib/experimental/fonts-api/fonts-api.php b/lib/experimental/fonts-api/fonts-api.php index 806a867fe5c0d4..7075f20f76a217 100644 --- a/lib/experimental/fonts-api/fonts-api.php +++ b/lib/experimental/fonts-api/fonts-api.php @@ -198,21 +198,17 @@ function wp_print_fonts( $handles = false ) { return array(); } - if ( false === $handles ) { + if ( empty( $handles ) ) { // Automatically enqueue all user-selected fonts. WP_Fonts_Resolver::enqueue_user_selected_fonts(); - } else { - // When `true`, print all registered fonts for the iframed editor. - if ( $in_iframed_editor ) { - $queue = $wp_fonts->queue; - $done = $wp_fonts->done; - $wp_fonts->done = array(); - $wp_fonts->queue = $registered; - $handles = false; - } elseif ( empty( $handles ) ) { - // When falsey, assign `false` to print enqueued fonts. - $handles = false; - } + $handles = false; + } elseif ( $in_iframed_editor ) { + // Print all registered fonts for the iframed editor. + $queue = $wp_fonts->queue; + $done = $wp_fonts->done; + $wp_fonts->done = array(); + $wp_fonts->queue = $registered; + $handles = false; } _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );