Support

Account

Home Forums Feedback Consider filtering get_option calls to support get_option use for termdata Reply To: Consider filtering get_option calls to support get_option use for termdata

  • Because get_options() is a WordPress core function, I’m afraid there’s nothing we can do with it.

    James, it’s fairly straightforward. You’d just have to intercept the term_id within get_field and pass that through a get_option filter.

    add_filter ('get_option', 'acf_bc_term_meta'); with a function looking for _category_id_name.

    Pippin has some code which will do almost exactly what’s required, swapping post_meta for options: https://github.com/easydigitaldownloads/EDD-Commissions/blob/master/includes/commission-functions.php#L828