I'm trying to produce a shortcode in Wordpress, where the function that's known as using the shortcode tag will get the shortcode tag as parameter.

So say I've

<?php
var $shortcode = 'my_shortcode_tag';
add_shortcode( $shortcode, 'my_shortcode_function');
?>

i quickly want 'my_shortcode_function' to understand the shortcode tag because of it was known as. I understand which i can use characteristics as with [my_shortcode_tag tag='my_shortcode_tag'] after i call the shortcode during my actual publish, but I wish to have the ability to just write [my_shortcode_tag] and my function to understand it was known as with that tag. It is possible to method of doing this?

This really is submitted because the third argument to some shortcode function (as pointed out within the Shortcodes API).

for instance:

add_shortcode( 'shortcode1', 'my_shortcode_function');
add_shortcode( 'shortcode2', 'my_shortcode_function');

function my_shortcode_function($atts, $content, $sc) {
    return $sc;
}

this can output the title from the shortcode known as for your function.