Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have WP_DEBUG set to ON to show errors and notices. Of all notices the one that is bothering me is Notice: attribute_escape is deprecated since version 2.8! Use esc_attr() instead. in /Users/john/Documents/htdocs/wp-includes/functions.php on line 3467. I started commenting the code to find which function or statement was generating these notices. To my surprise these notices were thrown by wp_head(), echo get_the_title() — The core Wordpress functions. I switched the theme to twentyeleven where the problem does not appear at all.

So, I'd like to find out why these core functions are throwing notices in my theme and what can I do to debug, isolate and resolve these?

Regards, John

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

This proves that the problem isn't core:

I switched the theme to twentyeleven where the problem does not appear at all.

Core functions are not throwing those notices. Your Theme is calling the deprecated function(s) somewhere - perhaps in a filer callback for the_title.

Search your Theme files to find the culprit. Start in functions.php.

p.s. what Theme are you using?

share|improve this answer
    
bennette Thx for the reply. It is a custom theme, built from scratch. BTW, could echoing get_the_title() without escaping result in such a notice? Meanwhile, I'll start digging the theme to find the culprit. –  John Apr 6 '12 at 16:53
    
"could echoing get_the_title() without escaping result in such a notice": No; that notice means that, somewhere, the Theme is calling attribute_escape(). –  Chip Bennett Apr 6 '12 at 16:59
1  
Got it. It was a hook that was calling attribute_escape within the function for removing Private/Protected from post titles. Thx a million for the help. –  John Apr 6 '12 at 17:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.