<?php

defined( 'ABSPATH' ) || exit;

if ( ! function_exists( 'masteriyo_get_social_login_redirect_url' ) ) {
	/**
	 * Gets the social login redirect url.
	 *
	 * @since 2.17.0
	 *
	 * @param string $value
	 * @return string
	 */
	function masteriyo_get_social_login_redirect_url( $value ) {
		$structure = get_option( 'permalink_structure' );

		if ( 'plain' === $structure || '' === $structure ) {
			$slug = '?redirect_key=' . $value;
		} else {
			$slug = $value;
		}
		return home_url( $slug, 'https' );
	}
}


