Accessibility: Remove post format filter links from format icons in the Posts list table.
Introduce a dedicated 'Formats' drop-down filter as a replacement. Keep the icons as a simple visual indicator of the post format for now. Props afercia, melchoyce, GaryJ, chiaralovelaces, SergeyBiryukov. Fixes #35497. Built from https://develop.svn.wordpress.org/trunk@44961 git-svn-id: http://core.svn.wordpress.org/trunk@44792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -13,18 +13,22 @@
|
||||
* @return string Returns the block content.
|
||||
*/
|
||||
function render_block_core_calendar( $attributes ) {
|
||||
global $monthnum, $year, $post;
|
||||
global $monthnum, $year;
|
||||
|
||||
$previous_monthnum = $monthnum;
|
||||
$previous_year = $year;
|
||||
|
||||
if ( isset( $attributes['month'] ) ) {
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
|
||||
$monthnum = $attributes['month'];
|
||||
}
|
||||
|
||||
if ( isset( $attributes['year'] ) ) {
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
|
||||
$year = $attributes['year'];
|
||||
if ( isset( $attributes['month'] ) && isset( $attributes['year'] ) ) {
|
||||
$permalink_structure = get_option( 'permalink_structure' );
|
||||
if (
|
||||
strpos( $permalink_structure, '%monthnum%' ) !== false &&
|
||||
strpos( $permalink_structure, '%year%' ) !== false
|
||||
) {
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
|
||||
$monthnum = $attributes['month'];
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
|
||||
$year = $attributes['year'];
|
||||
}
|
||||
}
|
||||
|
||||
$custom_class_name = empty( $attributes['className'] ) ? '' : ' ' . $attributes['className'];
|
||||
|
||||
Reference in New Issue
Block a user