Passing variable from template file to the plugin file

I need to send some variable from template file (themes/template/page-profile.php) to the plugin file(plugin/instagram-slider/instagram.php).

For example: I have

$instagram_url = get_user_meta($user_data->ID, 'instagram_url', true);

I need to send that $instagram_url to plugin file:

private function display_images( $args ) 
{
$username = $instagram_url;
}

Any suggestions on how I might do this?

Read more here: Passing variable from template file to the plugin file

Leave a Reply

Your email address will not be published. Required fields are marked *