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