• wube

    (@wujek_bogdan)


    I dug into plugin’s sources and I found that the plugin makes use of a custom database column in order to store the order information.

    In WP 4.6.0 a new action has been introduced: pre_get_terms. WP 4.4.0 introduced term meta. So it looks like the plugin could use these 2 features instead of a custom DB table. It would be a more “WordPress-ish” way.

    What do you think? Are there any reasons not to use term meta?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nsp-code

    (@nsp-code)

    That could be a solution, however it involve to JOIN the term meta table on a term_order field. That might be a bit tricky as not all queries would require such JOIN, also will makes things slower than using a separate column as works now.

    I would like to suggest the use of a taxonomy meta_field (tutorial) to store the order number rather than the custom column which could be an issue for future release of WP.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[enhancement] use pre_get_terms and term meta’ is closed to new replies.