title: How to create custom location for add_filter?
body: <p>I have a custom.php page in my Wordpress plugin within which I want to output the following in a certain location:</p>
  
  <pre><code>class Report_a_bug {
  
  public function __construct() {
  
      add_filter( 'the_content', array( $this, 'report_button' ), 10, 1 );
  
  }
  
  public function report_button( $content ) {
  
      $content .= '&lt;div class="report-a-bug"&gt;
                      &lt;button class="show-form" data-post_id="' . get_the_ID() . '"&gt;' . 
                          __( 'Report a bug', 'reportabug' ) . 
                      '&lt;/button&gt;
                      &lt;textarea class="report-a-bug-message" placeholder="' . __( 'Describe what\'s wrong...', 'reportabug' ) . '"&gt;&lt;/textarea&gt;
                      &lt;p class="report-a-bug-response"&gt;&lt;/p&gt;
                  &lt;/div&gt;';
  
      return $content;
  
  }
  
  }
  </code></pre>
  
  <p>Instead of using 'the_content' how can I tell it to place the code in a custom location by using:</p>
  
  <pre><code>new Report_a_bug();
  </code></pre>
  
  <p><strong>UPDATED CODE - STILL NO OUTPUT</strong></p>
  
  <pre><code>class Report_a_bug
  {
  
      public function __construct()
      {
  
          $this-&gt;custom_hook();
          add_action( 'custom_hook', array( $this, 'report_button' ), 10, 1 );
      }
  
      function custom_hook()
      {
          do_action('custom_hook');
      }
  
      public function report_button($content)
      {
          $content .= '&lt;div class="report-a-bug"&gt;
          &lt;button class="show-form" data-post_id="' . get_the_ID() . '"&gt;' .
              __('Report a bug', 'reportabug') .
              '&lt;/button&gt;
          &lt;textarea class="report-a-bug-message" placeholder="' . __('Describe what\'s wrong...', 'reportabug') . '"&gt;&lt;/textarea&gt;
          &lt;p class="report-a-bug-response"&gt;&lt;/p&gt;
      &lt;/div&gt;';
  
          return $content;
      }
  }
  </code></pre>
  
  <p>Trying to call in page using <code>new Report_a_bug();</code></p>