mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Accessibility: Make the Get Shortlink button be a real button.
Worth noting, as of WordPress 4.4, the Get Shortlink button is hidden by default but it can be restored via filters. Props Cheffheid. See #26504. Fixes #40448. Built from https://develop.svn.wordpress.org/trunk@40578 git-svn-id: http://core.svn.wordpress.org/trunk@40448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b0a327cf3c
commit
fe96a729a0
@ -582,7 +582,7 @@ if ( has_filter( 'pre_get_shortlink' ) || has_filter( 'get_shortlink' ) ) {
|
||||
$shortlink = wp_get_shortlink($post->ID, 'post');
|
||||
|
||||
if ( !empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url('?page_id=' . $post->ID) ) {
|
||||
$sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button button-small" onclick="prompt('URL:', jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>';
|
||||
$sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr( $shortlink ) . '" /><button type="button" class="button button-small" onclick="prompt('URL:', jQuery(\'#shortlink\').val());">' . __( 'Get Shortlink' ) . '</button>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.8-alpha-40577';
|
||||
$wp_version = '4.8-alpha-40578';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user