Filter the HTML content of plugin

If you want to make the output filterable, you simply need to define a custom filter, and pass the output through it.

Your function outputs (echoes) this value:

<h1>test</h1>

If you want it to be filterable, you need to put that output in a PHP string. Instead of this:

?>
    <h1>test</h1>
<?php

Do something like this:

$output="<h1>test</h1>";

Then echo it:

// Define
$output="<h1>test</h1>";
// Output
echo $output;

Now, you have something that you can pass through a custom filter, which you would define using apply_filters():

apply_filters( $filter_name, $value );

Let’s call this filter wpse140953_order_funct:

// Define
$output="<h1>test</h1>";
// Output
echo apply_filters( 'wpse140953_order_funct', $output );

…and that’s it. Now the output is filterable.