0

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

1 Answer 1

2

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?

3
  • 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
    Commented Apr 6, 2012 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(). Commented Apr 6, 2012 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
    Commented Apr 6, 2012 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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