ThemeShaper Forums » Thematic

[closed]

Function to add something to...what?

(3 posts)
  • Started 3 years ago by xxxevilgrinxxx
  • Latest reply from xxxevilgrinxxx
  • This topic is not resolved
  1. Hello, I'd like to make an addition, via function.php, to make a plugin behave properly. I've fumbled around with a bit and only managed to get more errors than what I've started out with.

    possible help?

    This is what I have to change/add - somehow

    Valid XHTML
    
    If you're using XHTML, the custom attributes will not pass validation. To make your XHTML technically valid, you'll need to add a custom namspace declaration to your opening <html> tag. (Note that the W3C validator does not take custom namespaces into account.)
    
    Change
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    to
    
    <html
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:addthis="http://www.addthis.com/help/api-spec">
    Posted 3 years ago #
  2. The little piece of code you are after is the thematic_create_doctype.

    function modify_create_doctype($content) {
    $content = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
    $content .= '<html xmlns="http://www.w3.org/1999/xhtml" xmlns:addthis="http://www.addthis.com/help/api-spec"';
    return $content;
    }
    add_filter('thematic_create_doctype', 'modify_create_doctype');

    Something like this is what you are after.

    Posted 3 years ago #
  3. Thanks, Scott :)

    In my test environment (no caching to worry about), I'm still generating errors, even with the above. Still, it's only 3 errors total, but they vex me :D

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.