WordPress filter hook

themify_metabox_get_field_names

Fired by 5 WordPress plugins, running on 46K+ sites between them.

How to use themify_metabox_get_field_names

It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'themify_metabox_get_field_names', function( $unique, $arr ) {
	// Change $unique here.
	return $unique;
}, 10, 2 );

Argument names come from Themify Portfolio Post's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

5 plugins that fire themify_metabox_get_field_names

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Themify Portfolio Post icon Themify Portfolio Post30,000+ installs apply_filters( 'themify_metabox_get_field_names', array_unique( $list ), $arr ) includes/themify-metabox/includes/themify-metabox-utils.php:25
  2. Themify Popup icon Themify Popup8,000+ installs apply_filters( 'themify_metabox_get_field_names', array_unique( $list ), $arr ) includes/themify-metabox/includes/themify-metabox-utils.php:25
  3. Themify Builder icon Themify Builder6,000+ installs apply_filters( 'themify_metabox_get_field_names', array_keys(array_flip( $list )), $arr ) themify/themify-metabox/includes/themify-metabox-utils.php:25
  4. Themify Event Post icon Themify Event Post2,000+ installs apply_filters( 'themify_metabox_get_field_names', array_unique( $list ), $arr ) includes/themify-metabox/includes/themify-metabox-utils.php:25
  5. Themify Store Locator icon Themify Store Locator400+ installs apply_filters( 'themify_metabox_get_field_names', array_flip(array_flip( $list )), $arr ) includes/themify-metabox/includes/themify-metabox-utils.php:25

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.