Shortcode handler function receives two arguments array $attr
and string $content
. So to pass attributes to shortcode handler function, just pass it as array:
$image = route_thumb_function( array( 'id' => $post_id ) );
Shortcode handler function receives two arguments array $attr
and string $content
. So to pass attributes to shortcode handler function, just pass it as array:
$image = route_thumb_function( array( 'id' => $post_id ) );