Exemplo n.º 1
0
/**
 * Checks the given profile tab is registered.
 *
 * @since 1.0.0
 * @param string  $tab the key value of the array in wpum_get_user_profile_tabs() must match slug
 * @return bool
 */
function wpum_profile_tab_exists($tab)
{
    $exists = false;
    if (array_key_exists($tab, wpum_get_user_profile_tabs())) {
        $exists = true;
    }
    return $exists;
}
Exemplo n.º 2
0
/**
 * Load profile tabs.
 * 
 * @since 1.0.0
 * @access public
 * @param object $user_data holds WP_User object
 * @return void
 */
function wpum_load_profile_tabs($user_data)
{
    $output = get_wpum_template('profile/profile-tabs.php', array('user_data' => $user_data, 'tabs' => wpum_get_user_profile_tabs()));
    echo $output;
}