Upgrade wordpress to 5.0 Custom miniature invisible metabox

I'm using the URL as the thumbnail of the post with the following plugin, it works fine and I create metabox inside the feature image box.

Old WordPress 4.9.8 works correctly with this add-on, but after
Upgrade to WP 5.0 metabox not visible in WP-admin
panel.

What changing needs in the code to show metabox in the WordPress 5.0 admin panel?

Show metabox inside the feature image box with WP-5.0

ID, & # 39; _thumbnail_ext_url & # 39 ;, TRUE)? : "http://wordpress.stackexchange.com/";
$ nonce = wp_create_nonce (& # 39; thumbnail_ext_url _ & # 39 ;. $ post-> ID. get_current_blog_id ());
$ html = & # 39;& # 39 ;;
$ html = & # 39;

& # 39; __ (& # 39; O & # 39 ;, & # 39; www-post-thumb & # 39;). & # 39;

& # 39 ;; $ html = & # 39;

& # 39; __ (& # 39; Enter the url for the external highlight image & # 39 ;, & # 39; www-post-thumb & # 39;). & # 39;

& # 39 ;; $ html = & # 39;

& # 39 ;; if (! empty ($ value) && is_image ($ value)) { $ html = & # 39;

& # 39 ;; $ html = & # 39;

& # 39; __ (& # 39; Leave the URL blank to remove & # 39 ;, & # 39; www-post-thumb & # 39;). & # 39;

& # 39 ;; } $ html = & # 39;
& # 39 ;; returns $ html; } Save function ($ pid, $ post) { $ cap = $ post-> post_type === & # 39; page & # 39 ;? & # 39; edit_page & # 39 ;: & # 39; edit_post & # 39 ;; Yes ( ! current_user_can ($ cap, $ pid) "http://wordpress.stackexchange.com/"! post_type_supports ($ post-> post_type, & # 39; thumbnail & # 39;) "http://wordpress.stackexchange.com/" defined (& # 39; DOING_AUTOSAVE & # 39;) ) { he came back; } $ action = & # 39; thumbnail_ext_url _ & # 39 ;. $ pid. get_current_blog_id (); $ nonce = filter_input (INPUT_POST, & # 39; thumbnail_ext_url_nonce & # 39 ;, FILTER_SANITIZE_STRING); $ url = filter_input (INPUT_POST, & # 39; thumbnail_ext_url & # 39 ;, FILTER_VALIDATE_URL); Yes ( empty ($ nonce) "http://wordpress.stackexchange.com/"! wp_verify_nonce ($ nonce, $ action) "http://wordpress.stackexchange.com/" (! empty ($ url) &&! is_image ($ url)) ) { he came back; } if (! empty ($ url)) { update_post_meta ($ pid, & # 39; _thumbnail_ext_url & # 39 ;, esc_url ($ url)); if (! get_post_meta ($ pid, & # 39; _thumbnail_id & # 39 ;, TRUE)) { update_post_meta ($ pid, & # 39; _thumbnail_id & # 39 ;, & # 39; by_url & # 39;); } } elseif (get_post_meta ($ pid, & # 39; _thumbnail_ext_url & # 39 ;, TRUE)) { delete_post_meta ($ pid, & # 39; _thumbnail_ext_url & # 39;); if (get_post_meta ($ pid, & # 39; _thumbnail_id & # 39 ;, TRUE) === & # 39; by_url & # 39;) { delete_post_meta ($ pid, & # 39; _thumbnail_id & # 39;); } } } Marking function ($ html, $ post_id, $ post_thumbnail_id, $ size, $ attr) { $ size = & # 39; _ & # 39 ;. $ size; // this should load _thumbnail_ext_url unless we have a size suffix that has a match in the database // Otherwise, it will load that matching element // ex: $ alt); $ attr = apply_filters (& # 39; wp_get_attachment_image_attributes & # 39 ;, $ attr, NULL); $ attr = array_map (& # 39; esc_attr & # 39 ;, $ attr); $ html = sprintf (& # 39; $ value) { $ html = "$ name =". "http://wordpress.stackexchange.com/" & # 39 ;. $ value "http://wordpress.stackexchange.com/" & # 39 ;; } $ html = & # 39; /> & # 39 ;; returns $ html; }