Network Latest Posts
[resolved] date format (5 posts)

  1. Jenny Beaumont
    Posted 3 years ago #

    Wow Jose! This plugin has come a long way, so many new exciting features! Thank you so much for including my suggestion about taxonomy control, that's a real plus.

    Just saw that you've added meta info - fab idea. I am having a little trouble controlling the date format however.

    I see that it's called in this bit of code:

    $format = (string)$options[1]->option_value;
      $dateobj = new DateTime(trim($thispost[$i]->post_date));
      $datepost = $dateobj->format("$format");

    Because my site is in French, I'd like to be able to modify how the date is displayed, which is different in different languages (as I'm sure you know). I thought the code was calling to the site settings to get the established format, but that doesn't seem to be the case. At least it's not working for me that way. ideas? (ie, the date appears "March 2, 2012" instead of "2 mars 2012")

    And then one more suggestion. It would be even *more* awesome if the meta info could be called separately. For example, I'd like date, but not author. Of course, I'll just change the code for my current purposes, but in the future, maybe on one page I want author info, and in a widget use I don't. Separating them out would be more flexible, and also help with formatting :) knowwhatimean?

    thanks again! this is now officially IMHO the BEST network-wide post publishing tool available. Bravo!



  2. Jenny Beaumont
    Posted 3 years ago #

    Interesting. So I'm able to hardcode the date by changing this bit:
    $datepost = $dateobj->format("j F Y");
    But my language options are still not being taken into account, and I've confirmed that the site options for the date settings are not being used.

    Ideas ?

  3. Jose Luis SAYAGO
    Plugin Author

    Posted 3 years ago #

    Hello Jenny, it seems it doesn't work as I expected it to. That piece of code is retrieving the value we set into the General > Date Format and Time Format fields. If you look into the database it's found inside the wp_options table the option name is "links_updated_date_format".

    It should *in theory* set the format in the language or the way you specified in your settings, but I only tested it in my main blog which is in english. I'll have to do more tests.

    Thanks for your feedback.

  4. Jose Luis SAYAGO
    Plugin Author

    Posted 3 years ago #

    Hi again,

    I've found the bad guy there, I discovered why it wasn't working and happily can say this is fixed in the version 3 (soon-to-be-released).


  5. Jenny Beaumont
    Posted 3 years ago #

    Hi Jose,

    Great, look forward to it!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Network Latest Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.