Last active
June 21, 2018 16:25
-
-
Save wtmujeebu/38f6b173d0e53b9dd7079d4a24363158 to your computer and use it in GitHub Desktop.
Add custom columns into audit table - WebToffee GDPR Cookie Consent Plugin
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
add_filter('cli_new_columns_to_audit_table', 'wt_add_new_column',10,1); | |
function wt_add_new_column($table) | |
{ | |
return $table .= '<th class="cookielawinfo-column-5">'.__('Cookie ID', 'cookie-law-info').'</th>'; | |
} | |
add_filter('cli_new_column_values_to_audit_table','wt_add_new_value',10,2); | |
function wt_add_new_value($ret, $custom) | |
{ | |
$_cli_cookie_slugid = ( isset ( $custom["_cli_cookie_slugid"][0] ) ) ? $custom["_cli_cookie_slugid"][0] : ''; | |
return $ret.= '<td class="cookielawinfo-column-3">' . $_cli_cookie_slugid .'</td>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment