Make WordPress Core

Changeset 18720


Ignore:
Timestamp:
09/19/2011 04:29:03 PM (15 years ago)
Author:
duck_
Message:

Allow current_theme_supports() to be used to check for specific post formats. Props ericmann. Fixes #18691.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r18656 r18720  
    19481948                                return true;
    19491949                        $content_type = $args[0];
    1950                         if ( in_array($content_type, $_wp_theme_features[$feature][0]) )
    1951                                 return true;
    1952                         else
    1953                                 return false;
     1950                        return in_array( $content_type, $_wp_theme_features[$feature][0] );
     1951                        break;
     1952
     1953                case 'post-formats':
     1954                        // specific post formats can be registered by passing an array of types to
     1955                        // add_theme_support()
     1956                        $post_format = $args[0];
     1957                        return in_array( $post_format, $_wp_theme_features[$feature][0] );
    19541958                        break;
    19551959        }
Note: See TracChangeset for help on using the changeset viewer.