WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #36666, comment 6


Ignore:
Timestamp:
04/26/2016 02:55:45 PM (4 years ago)
Author:
flixos90
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36666, comment 6

    initial v1  
    44> I looked through the documentation before putting this together, and as far as I could tell, the data structures for how HTML5, Post Formats, and Post Thumbnails are stored in the global `$_wp_theme_features` variable were the same. This would suggest to me that they could be removed in the same fashion. Am I mistaken?
    55
    6 I meant that post thumbnail support is a little different from post formats and HTML5 support since you can do `add_theme_support( 'post-thumbnails' )` which will produce `$_wp_theme_features = true` - so there's a chance that this variable is not an array (which is not handled in your initial patch). However in this case, we need to think about what the result of something like `remove_theme_support( 'post-thumbnails', array( 'post' )` would be: my initial thought says we should return `false` in this case as it's simply not possible to remove a specific post type from support then.
     6I meant that post thumbnail support and post formats support are a little different from HTML5 support since you can do `add_theme_support( 'post-thumbnails' )` which will produce `$_wp_theme_features = true` - so there's a chance that this variable is not an array (the same applies to post formats). However in this case, we need to think about what the result of something like `remove_theme_support( 'post-thumbnails', array( 'post' )` would be: my initial thought says we should return `false` in this case as it's simply not possible to remove a specific post type from support then.
     7Basically HTML5 must have additional arguments when adding support while post thumbnails and post formats don't.
    78
    89About the other issues, let's wait for some more feedback first.