Module: util/wpRfc

The RML WP RFC functionality allows you to create callbacks for specific elements defined in the DOM. For example you have to fallback to HTML output like the CustomField in attachment browser. You can otherwise use the attribute data-wprfc-visible="1" then the RFC is called when the elemen is visible. You do not have to append an additional script.
  • module:util/hooks#wprfc/$function

PHP side component

<div class="rml-wprfc" data-wprfc="breadcrumb"></div>
<script>jQuery(function() {"wprfc"); });</script>

JS side

window.rml.hooks.register('wprfc/breadcrumb', () => { });