[wp-meta] [Making WordPress.org] #3769: Detection mechanism for theme support in

Making WordPress.org noreply at wordpress.org
Fri Aug 17 08:44:02 UTC 2018


#3769: Detection mechanism for theme support in
-----------------------------+--------------------
 Reporter:  flixos90         |      Owner:  (none)
     Type:  defect           |     Status:  new
 Priority:  normal           |  Milestone:
Component:  Theme Directory  |   Keywords:
-----------------------------+--------------------
 After trying to submit a theme, I received numerous errors about missing
 required calls to `add_theme_support( 'title-tag' )` and
 `add_theme_support( 'automatic-feed-links' )`, although both were present
 in the respective theme. This would cause in the theme upload to be
 automatically rejected.

 The thing is that the theme code iterates over an array of boolean-ish
 features (including the above two) and then adds support for each of them,
 causing exactly the same effect - support is added for the features. But
 apparently this is not recognized by the automatic check because it
 probably looks at the exact code statement.

 Here is the code for a more exact idea of what I'm talking about:
 {{{
 $features = array(
     'title-tag',
     'automatic-feed-links',
     ...
 );
 array_walk( $features, function( $feature ) {
     add_theme_support( $feature );
 } );
 }}}

 The above doesn't pass.

 It's obviously easy to rewrite the code so that it passes that tool by
 writing individual statements for each feature, but it's certainly
 unexpected and feels wrong to do so just to please the automatic check.

 I think we should investigate ways to improve this.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/3769>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list