WordPress.org

Make WordPress Core

Ticket #16073: 16073.4.patch

File 16073.4.patch, 546 bytes (added by garyc40, 3 years ago)

final patch, fixed internationalization issue in 16073.3.patch

  • wp-includes/theme.php

    diff --git wp-includes/theme.php wp-includes/theme.php
    index 9d2f905..46c1cf1 100644
    function add_theme_support( $feature ) { 
    17541754                $_wp_theme_features[$feature] = true; 
    17551755        else 
    17561756                $_wp_theme_features[$feature] = array_slice( func_get_args(), 1 ); 
     1757                 
     1758        if ( $feature == 'post-formats' && is_array( $_wp_theme_features[$feature][0] ) ) 
     1759                $_wp_theme_features[$feature][0] = array_intersect( $_wp_theme_features[$feature][0], array_keys( get_post_format_slugs() ) ); 
    17571760} 
    17581761 
    17591762/**