Block Editor: Fix the link to the classic editor when incompatible meta boxen are detected.

Props tmatsuur, mukesh27.
Fixes #45935.


git-svn-id: https://develop.svn.wordpress.org/trunk@45618 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2019-07-11 06:00:39 +00:00
parent eba439f0ac
commit 756e06cd94

View File

@ -1122,7 +1122,13 @@ function do_block_editor_incompatible_meta_box( $object, $box ) {
echo '</p>';
}
} elseif ( $object instanceof WP_Post ) {
$edit_url = add_query_arg( 'classic-editor', '', get_edit_post_link( $object ) );
$edit_url = add_query_arg(
array(
'classic-editor' => '',
'classic-editor__forget' => '',
),
get_edit_post_link( $object )
);
echo '<p>';
/* translators: %s: A link to use the Classic Editor plugin. */
printf( __( 'Please open the <a href="%s">classic editor</a> to use this meta box.' ), esc_url( $edit_url ) );