Wordpress Theme problems

Discussion in 'WordPress' started by Nandamuri, Jun 20, 2009.

  1. #1
    I request you to please visit this post http://prowebweaver.com/test/?p=3.

    I am trying to design a theme. In the process I am getting the following message, at the bottom of the page.
    Fatal error: Call to undefined function esc_attr_e() in /home/prowebwe/public_html/test/wp-content/themes/laksmi/comments.php on line 71

    There should be a submit button instead of that message.....

    This is what in 71st line :
    <p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php esc_attr_e('Submit Comment'); ?>" />.

    What should we do to define a function.....
     
    Nandamuri, Jun 20, 2009 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You should update Wordpress to version 2.8. You are currently using 2.7.1.
    That attribute escaping function (esc_attr_e) was only introduced in 2.8.
    You can read about it at the very end of this page:
    http://codex.wordpress.org/Data_Validation

    Or you can try using the old function, attribute_escape()
     
    Cash Nebula, Jun 20, 2009 IP
  3. Nandamuri

    Nandamuri Peon

    Messages:
    665
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    No, both of them are reporting some fatal errors..

    Instead, I have removed the function <?php esc_attr_e('Submit Comment'); ?> and have given the value=""search"

    Then everything seems to be working fine....But, I do not what consequences can it lead to.
     
    Nandamuri, Jun 20, 2009 IP
  4. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #4
    :confused: BTW, why do you want to use esc_attr_e()?
    I think you can just translate with _e('string'); or __('string'); if that is all you need.
     
    Cash Nebula, Jun 20, 2009 IP