rep__get_employee_post_id()
This function, retrieves a post ID based on an Employee ID from the database and returns it as data.
Namespace
REP_Malcolm
Return
data
Employee post ID data
Source
File: \includes\rep-helper-functions.php
function rep__get_employee_post_id( $employee_id ){
global $wpdb;
$post_id = null;
if( $employee_id ) {
$post_id = $wpdb->get_var(
$wpdb->prepare( "SELECT post_id FROM {$wpdb->prefix}rep_employee WHERE employee_id=%d", $employee_id )
);
}
return $post_id;
}