Skip to content

Commit

Permalink
Remove import of class-wp-rest-wpcom-block-editor-sharing-modal-contr…
Browse files Browse the repository at this point in the history
…oller.php (#39488)
  • Loading branch information
taipeicoder committed Sep 24, 2024
1 parent 5e2ab4c commit 664ace7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: removed

Removed import of the class-wp-rest-wpcom-block-editor-sharing-modal-controller.php controller
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,6 @@ public function enqueue_script_and_style() {
"var launchpadOptions = $launchpad_options;",
'before'
);

/**
* Enqueue the sharing modal options.
*/
$sharing_modal_options = wp_json_encode(
array(
'isDismissed' => WP_REST_WPCOM_Block_Editor_Sharing_Modal_Controller::get_wpcom_sharing_modal_dismissed(),
),
JSON_HEX_TAG | JSON_HEX_AMP
);

wp_add_inline_script(
$handle,
"var sharingModalOptions = $sharing_modal_options;",
'before'
);
}

/**
Expand All @@ -101,10 +85,6 @@ public function register_rest_api() {
require_once __DIR__ . '/class-wp-rest-wpcom-block-editor-video-celebration-modal-controller.php';
$video_celebration_modal_controller = new WP_REST_WPCOM_Block_Editor_Video_Celebration_Modal_Controller();
$video_celebration_modal_controller->register_rest_route();

require_once __DIR__ . '/class-wp-rest-wpcom-block-editor-sharing-modal-controller.php';
$sharing_modal_controller = new WP_REST_WPCOM_Block_Editor_Sharing_Modal_Controller();
$sharing_modal_controller->register_rest_route();
}
}
add_action( 'init', array( __NAMESPACE__ . '\WPCOM_Block_Editor_NUX', 'init' ) );

0 comments on commit 664ace7

Please sign in to comment.