Expanding the allowed HTML tags in comments?

I have no problem doing this in a comment, as an administrator: <b>bold test</b> <i>italics test</i> <u>underline test</u> <font color=”#ff9900″> color test</font> But the subscribers can’t underline, add color to words nor add images. Is it that only the admin can use more HTML tags than those suggested under the comment form? <a href=”” title=””> … Read more

Restrict file uploads by extension?

Is there a way in WordPress 3.1 to restrict allowed file uploads by extension (images only) and file size? Bonus question: Can I limit users to only be able view files they have uploaded themselves? 1 Answer 1 I believe you can add a filter to upload_mimes to restrict to certain types. The hook: http://adambrown.info/p/wp_hooks/hook/upload_mimes … Read more

What’s the proper way to use the get_image_tag filter?

I’m attempting to remove the title attribute for post thumbnails (on certain posts), and I assume the get_image_tag filter is the way to do this. However, what I’ve got so far isn’t working. What do I need to change to make this work? My code: add_filter(‘get_image_tag’, ‘image_no_title’); function image_no_title($title) { $title=””; return $title; } And … Read more

Does a const reference class member prolong the life of a temporary?

Why does this: #include <string> #include <iostream> using namespace std; class Sandbox { public: Sandbox(const string& n) : member(n) {} const string& member; }; int main() { Sandbox sandbox(string(“four”)); cout << “The answer is: ” << sandbox.member << endl; return 0; } Give output of: The answer is: Instead of: The answer is: four 6 … Read more

Why is WordPress redirecting users to random posts after commenting?

After commenting on one of my posts, WordPress redirects me to another random post. Only after, when checking the previous post, I can see that my comment was posted. Still, why is WordPress sending me to a random post after commenting? Here’s my comments.php file and here’s my website (please don’t publish it anywhere else, … Read more