[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 https://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!)
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Links shortcode] Improved handling of link_updated’ is closed to new replies.