Created
April 18, 2016 19:46
-
-
Save sbruner/b3849b398048f6d55cecf28e059757e0 to your computer and use it in GitHub Desktop.
piklist-filter-piklist_get_file_data
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
<?php | |
//Allow the comment block to read your custom "User ID" attribute. | |
add_filter('piklist_get_file_data', 'allow_user_id', 10, 2); | |
function allow_user_id($data, $type) | |
{ | |
// If not a User section than bail | |
if($type != 'users') | |
{ | |
return $data; | |
} | |
// Allow the comment block to read the "User ID" attribute. | |
$data['user_id'] = 'User ID'; | |
return $data; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment