Skip to content

Commit

Permalink
check for function exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed May 13, 2024
1 parent 0ca2411 commit 89579ac
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/compat/wordpress-6.6/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );

0 comments on commit 89579ac

Please sign in to comment.