Title: [Plugin: Theme-Check] function tc_add_headers() needs to filter, not replace.
Last modified: August 20, 2016

---

# [Plugin: Theme-Check] function tc_add_headers() needs to filter, not replace.

 *  Resolved [George Stephanis](https://wordpress.org/support/users/georgestephanis/)
 * (@georgestephanis)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-theme-check-function-tc_add_headers-needs-to-filter-not-replace/)
 * Proposed modification as follows …
 *     ```
       function tc_add_headers( $extra_headers ) {
       -	$extra_headers = array( 'License', 'License URI', 'Template Version' );
       +	$extra_headers = array_merge( (array) $extra_headers, array( 'License', 'License URI', 'Template Version' ) );
       	return $extra_headers;
       }
       ```
   
 * In short, this will actually filter the data, rather than deciding any thing 
   already caught by a filter is irrelevant and overwriting it.
 * [http://wordpress.org/extend/plugins/theme-check/](http://wordpress.org/extend/plugins/theme-check/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-theme-check-function-tc_add_headers-needs-to-filter-not-replace/#post-2804199)
 * Looking at the code, I’m not sure what the point of that function is in the first
   place. That stuff isn’t used anywhere and should probably just be removed.
 *  Thread Starter [George Stephanis](https://wordpress.org/support/users/georgestephanis/)
 * (@georgestephanis)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-theme-check-function-tc_add_headers-needs-to-filter-not-replace/#post-2804200)
 * It was brought up in [http://core.trac.wordpress.org/ticket/20897](http://core.trac.wordpress.org/ticket/20897)
   for reference.
 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-theme-check-function-tc_add_headers-needs-to-filter-not-replace/#post-2804217)
 * Ahh, yes, I see. Makes sense.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Theme-Check] function tc_add_headers() needs to filter, not 
replace.’ is closed to new replies.

 * ![](https://ps.w.org/theme-check/assets/icon-128x128.png?rev=972579)
 * [Theme Check](https://wordpress.org/plugins/theme-check/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/theme-check/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/theme-check/)
 * [Active Topics](https://wordpress.org/support/plugin/theme-check/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/theme-check/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/theme-check/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-theme-check-function-tc_add_headers-needs-to-filter-not-replace/#post-2804217)
 * Status: resolved