• jimario

    (@jimario)


    My list is successfully pulling in the registration date but not in the format that I want. In the changelogs, version 3.6.6 says that there are two formats for the registration date. So how do I go about changing the format from Yr/Mo/Dy to Mo/Dy/Yr?

    https://wordpress.org/plugins/amr-users/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author anmari

    (@anmari)

    The two fields are as a date and as “days ago”.

    …added user_registration_date as a standard field. For compatibility with prior versions and not to mess existing users up. user_registered is staying as showing ‘days_ago’….

    If you want to change the format of any field at moment you can write your own format routine. see
    http://wpusersplugin.com/2645/format-any-field-any-way-you-wish/

    Thread Starter jimario

    (@jimario)

    Okay, so let’s say I use the example code and just replace it with the technical names I’m actually using. Obviously this wouldn’t allow me to move the year to come after the month and day. But what you’re telling me is that there is a way to collect the entire value of that field (for example: 2014-03-30 18:36:06) and move the “2014” to the end of 03-30 but also put the hyphen in front of the “2014”. I think that is beyond my php abilities. I guess what I’m looking to do is go directly into whichever php file is relevant and switch the code around that is calling for the data to be shown in that order. I don’t mind having to remember to go back and reapply these edits whenever amr user plus plugin gets updated.

    Can you point me to the appropriate file?

    Plugin Author anmari

    (@anmari)

    Hmm, I did already, see the links above.

    The plugins formatting functions are ‘pluggable’.
    This means that if you write your own and put it in a site specific plugin (IE unique to your site and you can put all sorts of extra altering bits of code in ) or your custom themes functions.php (do NOT do this if your theme is likely to be auto updated),
    THEN
    that formatting function will be used instead of the one provided by the plugin AND you will not have to reapply any code changes when updates are made.

    Isn’t that good!

    The link above has the example you need and a link to a writeup on “site specific plugins”

    The field you want to format is ‘user_registered’ (the example is for user_nicename.).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘registration date format’ is closed to new replies.