Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JudeRosario/f8cf504aed2bca488dbd to your computer and use it in GitHub Desktop.
Save JudeRosario/f8cf504aed2bca488dbd to your computer and use it in GitHub Desktop.
Add the location to [app_my_appointments] shortcode
add_filter('app_my_appointments_column_name' , 'app_table_add_location_column' ) ;
function app_table_add_location_column($c) {
return $c.'<th class="my-appointments-location">' . __('Location', 'appointments' ) . '</th>' ;
}
add_filter('app-shortcode-my_appointments-after_status' , 'app_table_add_location_column_cell', 10 , 2 ) ;
function app_table_add_location_column_cell($c, $r) {
return $r->location ? '<td>'. $r->location .'</td>' : '<td> - </td>' ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment