Hi Carl, Alex, Kevin
As you probably know, I'm using the GF hooks to get content into posts depending on answers to various questions in forms. Right now I've come against a wall. I'm trying to include the following kind of code in my functions.php file:
$post_data["post_content"] .= "<p><a rel='license' href='http://creativecommons.org/licenses/by/3.0/nz/'><img alt='Creative Commons License' style="border-width:0" src='http://i.creativecommons.org/l/by/3.0/nz/88x31.png' /></a><br /><span xmlns:dc='http://purl.org/dc/elements/1.1/' href='http://purl.org/dc/dcmitype/MovingImage' property='dc:title' rel='dc:type'>[Title of work]</span> by <a xmlns:cc='http://creativecommons.org/ns#' href='[Attribute work to URL]' property='cc:attributionName' rel='cc:attributionURL'>[Attribute work to name]</a> is licensed under a <a rel='license' href='http://creativecommons.org/licenses/by/3.0/nz/'>Creative Commons Attribution 3.0 New Zealand License</a>.<br />Based on a work at <a xmlns:dc='http://purl.org/dc/elements/1.1/' href='[Source work URL]' rel='dc:source'>[Source work URL]</a>.<br />Permissions beyond the scope of this license may be available at <a xmlns:cc='http://creativecommons.org/ns#' href='[More permissions URL]' rel='cc:morePermissions'>[More permissions URL]</a>.</p>";
Unfortunately, this won't parse properly. I get the good old "unexpected T_STRING" error message. Do you know how I can include pre-formatted text/code like this please? I've tried using code tags but that doesn't work either. I'm sure everything else is fine as I've done a test with the word 'test' between the p tags and that works fine.
I'm really hoping we can crack this one please.
Many thanks
Richard