From 08755b138a1ff20b972e85022ab25f214b137f80 Mon Sep 17 00:00:00 2001 From: ramon Date: Sat, 11 May 2024 08:27:07 +1000 Subject: [PATCH] check for function exists. --- lib/compat/wordpress-6.6/rest-api.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/compat/wordpress-6.6/rest-api.php b/lib/compat/wordpress-6.6/rest-api.php index 049a58a70d39f7..109865c821a391 100644 --- a/lib/compat/wordpress-6.6/rest-api.php +++ b/lib/compat/wordpress-6.6/rest-api.php @@ -77,12 +77,14 @@ function gutenberg_add_class_list_to_public_post_types() { } add_action( 'rest_api_init', 'gutenberg_add_class_list_to_public_post_types' ); -/** - * Registers the Edit Site Export REST API routes. - */ -function gutenberg_register_edit_site_export_controller_endpoints() { - $edit_site_export_controller = new Gutenberg_REST_Edit_Site_Export_Controller_6_6(); - $edit_site_export_controller->register_routes(); +if ( ! function_exists( 'gutenberg_register_edit_site_export_controller_endpoints' ) ) { + /** + * Registers the Edit Site Export REST API routes. + */ + function gutenberg_register_edit_site_export_controller_endpoints() { + $edit_site_export_controller = new Gutenberg_REST_Edit_Site_Export_Controller_6_6(); + $edit_site_export_controller->register_routes(); + } } add_action( 'rest_api_init', 'gutenberg_register_edit_site_export_controller_endpoints' );