Last active
August 29, 2015 13:56
-
-
Save jbma/8846688 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
add_filter('lengow_extra_columns', 'lengow_add_extra_columns'); | |
add_filter('lengow_extra_field_value', 'lengow_extra_field_value', null, 3); | |
function lengow_add_extra_columns($extra_columns) { | |
$extra_columns[] = '_product_type_bulb'; | |
//$extra_columns[] = 'additional_field_2'; | |
return $extra_columns; | |
} | |
function lengow_extra_field_value($value, $field, $lengow_product) { | |
global $post; | |
switch ($field) { | |
case '_product_type_bulb': | |
$value = get_post_meta( $post->ID,'_product_blb'); | |
break; | |
default: | |
$value = ''; | |
break; | |
} | |
return $value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment