/**
 * [shortcode foo='foo']
 * or
 * [shortcode]$content here[/shortcode]
 * @param $atts
 * @param $content
 * @return false|string
 */
function get_articleshare($atts, $content)
{
     /**
     * params whitelist => default values
     * @var string $foo
     * @var number $baz
     */
    extract(shortcode_atts( array(
        'foo' => 'no foo',
        'baz' => 123
    ), $atts ));

    $output = '';
    //do magic here with $foo and $baz
    return $output;
}
add_shortcode('articleshare_shortcode','get_articleshare');

Leave a Reply

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