From f091fd484fec142f409bb9c502f67e7a4a0a85b6 Mon Sep 17 00:00:00 2001 From: Ashar Fuadi Date: Wed, 18 Dec 2024 21:44:07 +0700 Subject: [PATCH] Revert admin_init --- .../wpcom-hotfixes/wpcom-hotfixes.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wpcom-hotfixes.php b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wpcom-hotfixes.php index eeceb5b33b20c..199033db6b7f5 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wpcom-hotfixes.php +++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wpcom-hotfixes.php @@ -10,16 +10,11 @@ * See: p1734525664059729-slack-C02FMH4G8 * See: https://github.com/WordPress/gutenberg/issues/68053#issuecomment-2550730705 */ -add_action( - 'admin_init', - function () { - add_filter( - 'register_post_type_args', - function ( $args ) { - unset( $args['default_rendering_mode'] ); - return $args; - }, - 20 - ); - } +add_filter( + 'register_post_type_args', + function ( $args ) { + unset( $args['default_rendering_mode'] ); + return $args; + }, + 20 );