• Hi,
    I would like to report a bug I just found in your theme. The hook generate_after_element_class_attribute (theme-functions.php) is written in such a way that only the last hook call actually works, because every time the hook runs, the string is reset to empty.
    This is probably how it should be written:

    // Before this function existed we had the below to add attributes after the class attribute.
    $after = "";
    $after .= apply_filters( 'generate_after_element_class_attribute', $after , $context );
    
    if ( $after ) {
       $after = ' ' . $after;
    }

    Now the developer has the responsibility to append his own strings to $after or override/manipulate the existing ones if he hooks in later. The same goes when you use it to generate microdata: you should append to $output not override it (else, anyone using the hook with priority < 10 will get his output overriden.
    I will be pretty happy if you fix this bug in the subsequent version, since now, I don’t get microdata in certain cases (because I have no other way than to override it in my child function).
    Thank you for all the efforts you input into this theme!

    Greg

  • The topic ‘Bug in hook ‘generate_after_element_class_attribute’’ is closed to new replies.