WordPress.org

Make WordPress Core

Ticket #16073: 16073.3.patch

File 16073.3.patch, 539 bytes (added by garyc40, 7 years ago)

forgot to check is_array()

  • wp-includes/theme.php

    diff --git wp-includes/theme.php wp-includes/theme.php
    index 9d2f905..bf0fcbd 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], get_post_format_slugs() );
     1760        }
    17571761}
    17581762
    17591763/**