WordPress.org

Ready to get started?Download WordPress

Forums

Theme-Check
[resolved] function tc_add_headers() needs to filter, not replace. (4 posts)

  1. 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/

  2. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 1 year ago #

    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.

  3. It was brought up in http://core.trac.wordpress.org/ticket/20897 for reference.

  4. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 1 year ago #

    Ahh, yes, I see. Makes sense.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags