Viewing 10 replies - 16 through 25 (of 25 total)
  • Plugin Author donmik

    (@atallos)

    But $value is empty? Can you check if $value is empty? To know this, you can put this code in my plugin

    Before line 459, this line:
    return '<p>'.date_i18n(get_option('date_format') ,strtotime($value) ).'</p>';

    Write:
    var_dump($value)

    And do the same before line 567:
    return '<p>'.date_i18n(get_option('date_format') ,strtotime($value) ).'</p>';

    Write:
    var_dump($value)

    What do I have to check after I add this?

    Or is this a solution?

    Plugin Author donmik

    (@atallos)

    No, it’s not a solution, it will show the value contained in the variable $value.

    Something like this:

    string ‘1908-04-03 00:00:00’ (length=20)

    Or maybe something empty.

    When I do this I get a fatal error:
    Parse error: syntax error, unexpected T_RETURN in /home/natpkkat/public_html/connect_karditsa/wp-content/plugins/buddypress-xprofile-custom-fields-type/bp-xprofile-custom-fields-type.php on line 460

    Plugin Author donmik

    (@atallos)

    Sorry, it’s my fault, I forgot the “;”

    var_dump($value);

    With the ; it will not show this fatal error.

    Hi

    I’m getting the same error, this code in functions.php shows the current date.

    Plugin Author donmik

    (@atallos)

    Can you try to do whay I say with var_dump($value)?

    In your filter in functions.php, put before:

    return '<p>'.date_i18n( 'F j' , strtotime($value) ).'</p>';

    var_dump($value);

    I need to know if $value is empty.

    Hi atallos and thanks for your quick reply

    What I’m getting with this is:

    string(14) "13 julio, 1987"
    abril 22

    where "13 julio, 1987" is the right birthday and abril 22 today’s date without the year.

    UPDATE

    After updating your plugin I’m getting this:

    string(20) "1987-07-13 00:00:00 "
    julio 13

    and now without the var_dump($value);, I’m getting:

    julio 13

    which it’s just what I was looking for.

    Thanks for all your time!!!

    Plugin Author donmik

    (@atallos)

    You’re welcome ??

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Hide year of birth’ is closed to new replies.