do_shortcode() within Admin Page

Instead of calling do_shortcode() just call the function associated with the shortcode.

Example

There is a shortcode named [example] and a function registered as shortcode handler:

function example_shortcode( $atts = array(), $content="" )
{
    extract( 
            shortcode_atts( 
            array (
            'before' => '',
            'after' => '',
            ), 
            $atts 
       )
   );

    return $before . $content . $after;
}
add_shortcode( 'example', 'example_shortcode' );

In your admin page you just call the function:

echo example_shortcode( 
    array ( 'before' => 'This ', 'after' => '!' ), 
    'works' 
);

Output: This works!.

Faster and more reliable than do_shortcode().

tech