Available since: 3.0
searchwp_custom_field_keys_{$post_type}
View Parameters »This filter is applied after searchwp_custom_field_keys
allowing you to restrict Custom Field meta keys based on post type.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'searchwp_custom_field_keys_page', function( $meta_keys, $post_type ) { | |
// TODO: Customize $meta_keys to meet your needs. | |
return $meta_keys; // Array of meta keys to display in Custom Fields dropdown. | |
}, 20, 2 ); |
Parameters
Parameter | Type | Description |
---|---|---|
$meta_keys |
Array |
Meta keys |
$post_type |
String |
Post type |