WordPress.org

Support

Support » Plugins and Hacks » Links shortcode » [Resolved] [Plugin: Links shortcode] Improved handling of link_updated

[Resolved] [Plugin: Links shortcode] Improved handling of link_updated

  • This brief snippet will cause the link_updated field to be blank, and thus suppressed by the [optional ...||...] code, if it contains the default of '0000-00-00 00:00:00' — add the lines marked by + (after line 107, the first one shown):

    $linkinfo['link_updated'] = $bm->link_updated;
    +               if (preg_match('#^[\-0 :]*$#', $linkinfo['link_updated'])) {
    +                 $linkinfo['link_updated'] = '';
    +               }
                    $linkinfo['link_rel'] = $bm->link_rel;

    The above is particularly useful with “Andy’s Link Last Edited Meta Box” as described at http://fleacircusdir.livejournal.com/5498.html … which updates WordPress’s link_updated field whenever a link is created or modified. (WP allegedly reserves that field for some other sort of magic which never seems to happen. We might as well use it!)

    http://wordpress.org/extend/plugins/links-shortcode/

Viewing 1 replies (of 1 total)
  • Plugin Author Maarten Swemmer

    @maartenjs

    I have updated the plugin to include this functionality. making the plugin compatible with “Andy’s Link Last Edited Meta Box”.
    Thanks for the tip!

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: Links shortcode] Improved handling of link_updated’ is closed to new replies.
Skip to toolbar