bobbingwide / oik-shortcodes

Shortcode, block and API server
https://www.oik-plugins.com/oik-plugins/oik-shortcode-server/
GNU General Public License v2.0
1 stars 0 forks source link

Add batch routine to set compatible_up_to to the last term #50

Closed bobbingwide closed 7 years ago

bobbingwide commented 7 years ago

See bobbingwide/oik-fields/issues/23

In oik-plugins.com, for the Compatible up to taxonomy, I used to define all the supported versions. Now I just want there to be one term, the highest.

A batch routine ( admin.set_compatible_up_to.php ) is needed to process over 400 posts.

bobbingwide commented 7 years ago

For some posts no terms are defined. In this case we need to add a term. We can assume that the compatible up to value is the last release on or before the publication date. We'll ignore the point releases and only set the value to the minor level. e.g. For a post published between 13 June 2012 and 11 December 2012 we'll set the value to 3.4 not 3.4.x.