Editor: Hide 'Skip to Editor' if editor not supported.

Wrap the classic editor 'Skip to Editor' link in a conditional to prevent it from rendering on post types that do not have editor support.

Props wildworks, parthvataliya, narenin, sainathpoojary, ankitkumarshah, parthvataliya, im3dabasia1.
Fixes #62623.
Built from https://develop.svn.wordpress.org/trunk@59511


git-svn-id: http://core.svn.wordpress.org/trunk@58897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson 2024-12-13 21:53:15 +00:00
parent ac54a93332
commit e25f6d7e2f
2 changed files with 8 additions and 2 deletions

View File

@ -546,7 +546,13 @@ do_action( 'edit_form_top', $post );
?>
<label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo $title_placeholder; ?></label>
<input type="text" name="post_title" size="30" value="<?php echo esc_attr( $post->post_title ); ?>" id="title" spellcheck="true" autocomplete="off" />
<a href="#content" class="button-secondary screen-reader-text skiplink" onclick="if (tinymce) { tinymce.execCommand( 'mceFocus', false, 'content' ); }"><?php esc_html_e( 'Skip to Editor' ); ?></a>
<?php
if ( post_type_supports( $post_type, 'editor' ) ) {
?>
<a href="#content" class="button-secondary screen-reader-text skiplink" onclick="if (tinymce) { tinymce.execCommand( 'mceFocus', false, 'content' ); }"><?php esc_html_e( 'Skip to Editor' ); ?></a>
<?php
}
?>
</div>
<?php
/**

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-alpha-59510';
$wp_version = '6.8-alpha-59511';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.