title: Enabling custom Hooks inside dynamically generated HTML markup
body: <p>I was trying to dynamically create markup on my page and run inside that markup a custom hook like this:</p>
  
  <pre><code>add_action( 'genesis_after', 'mw_add_offcanvas' );
  function mw_add_offcanvas()
  {
      $out = '&lt;div class="shifter-navigation"&gt;';
      /**
       * Using this hook:
       * mw_add_offcanvas_sidebar
       * mw_offcanvas_menu
       */
      $out .= do_action( 'mw_inside_offcanvas' );;
      $out .= '&lt;/div&gt;';
      echo $out;
  }
  </code></pre>
  
  <p>The goal was to then be able to assign widget areas or menus to that hook:</p>
  
  <pre><code>function mw_add_offcanvas_sidebar() {
      genesis_widget_area( 'sidebar-navigation', array(
        'before' =&gt; '&lt;div class="widget-area"&gt;',
        'after' =&gt; '&lt;/div&gt;',
      ) );
  }
  
  add_action( 'mw_inside_offcanvas', 'mw_add_offcanvas_sidebar' );
  </code></pre>
  
  <p>This actually works although the elements are outputted outside the markup dinamically generated with the <code>mw_add_offcanvas()</code> function.</p>
  
  <p>How can I achieve this?</p>