cpac_get_column_value_custom_field won't fire
-
For some strange reason, I can’t seem to get the
cpac_get_column_value_custom_field
hook to work. Here’s the code I’m using, straight from an example:add_filter( 'cpac_get_column_value_custom_field', 'format_cpac_fields', 10, 5 ); function format_cpac_fields( $value, $internal_field_key, $custom_field, $type, $object_id ) { $my_post_type = 'demo'; $my_field_name = 'city'; // make sure we have the correct posttype and fieldname echo $custom_field; if ( $my_field_name == $custom_field ) { if ( '33' == $value ) $value = 'Amsterdam'; elseif ( '34' == $value ) $value = 'New York'; } return 'test'; }
Even though the
if
statement won’t execute since I don’t have a field named ‘city’, I’ve hard-coded a return value to substitute any fields that might be passing by. I’ve also echoed out$custom_field
. Alas, nothing changes in my post columns!Any hints for where I can start troubleshooting?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘cpac_get_column_value_custom_field won't fire’ is closed to new replies.