ejikas
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: attachment post-slug not being checked for duplicatesYour description is not very clear to me but I think you referring the same bug I just submited to the wordpress trac: https://core.trac.www.ads-software.com/ticket/16438
Hope it will be fixed in future releases. There is one more solution you did not mentioned. Not necessary change slugs, just insert the buggy attachement into the page (any page or post), save, and then you may remove it from the content. The image will remain in the page’s gallery (so the attachement will have “parent”) and that is enough for dissapearing the bug.
Forum: Requests and Feedback
In reply to: _wp_unfiltered_html_comment causes warning in XHTML1.0 StrictYes, I noticed the same thing. I looked to the code and realised that this appears only for me as I’m logged in, but not for anonymous user or general user.
Anyway it is really annoying to see the validation error for myself.
Where may be found usage of “_wp_unfiltered_html_comment”:
1. wp-includes/comment-template.php
line #610:wp_nonce_field('unfiltered-html-comment_' . $post->ID, '_wp_unfiltered_html_comment', false);
2. wp-comments-post.php
line #39:if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) {
in general just here, but some themes as well, for example popular k2 theme:
3. wp-content\themes\k2\comments-ajax.php
line #78:if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) {
what I would suggest and did myself is:
I altered functionwp_comment_corm_unfiltered_html_nonce()
at wp-includes/comment-template.phpcommented line:
wp_nonce_field('unfiltered-html-comment_' . $post->ID, '_wp_unfiltered_html_comment', false);
and added this line bellow:
echo '<input type="hidden" id="wp_unfiltered_html_comment" name="_wp_unfiltered_html_comment" value="' . wp_create_nonce( 'unfiltered-html-comment_' . $post->ID ) . '" />';
Thats it. (correct me if I’m wrong)
Researching it, I noticed that wp funtion
wp_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true )
has default value"_wpnonce"
that is incorect as well (as it is used for ID value as well).that is at
wp-includes/functions.php
line #979:function wp_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true ) {