Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('cpac_get_column_value_custom_field', 'my_custom_value', 10, 3);
- function my_custom_value( $meta, $fieldtype, $field ) {
- fb($field);
- switch($field){
- case "ev_hide_date":
- if($meta == 1){
- $meta = "<span style='color: #eee; background: #C9161A; padding: 2px 5px; border-radius: 2px;'>date hidden</span>";
- }else{
- $meta = "";
- }
- break;
- }
- // change output on custom-fields KEY
- /*
- if ( 'my_custom_field_key' == $field )
- $meta = 'my custom text';
- // change output on custom-fields VALUE
- if ( 'my_custom_field_value' == $meta )
- $meta = 'another custom text';
- */
- return $meta;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement