RMC Pro Actions API

Below is a list of actions available for you to tap into to create add-ons and modify the behaviour of RMC Pro.

Admin Actions

There are two main areas that Admin Actions allow you to modify. The larger actions allow you to add new RMC Pro menu items, settings tabs, support tabs. Use this for full add-ons that need their own interface, global settings, and help pages.

You can modify the Edit Calculator interface using the finer actions. This allows you to create new sections, elements, settings, and tags.

Add a Sub-Menu Item


Add your own menu item to the RMC Pro menu.

Add a Settings Tabs Page


Add your own settings tab to the RMC Pro > Settings page.

Add a Support Tab Page


Add your own support tab to the RMC Pro > Support page.

Add a New Calculator Section


Create a new section in the calculator editing area of the Edit Calculator interface. New sections will be added after the existing sections (Interface, Processors, Sub-Calculations, Calculators).

Add a New Calculator Element


Add a new element to any section of the Edit Calculator interface, including new, custom sections you have added.

Add a New Section to a Calculator Element


Add a section to calculator element to group related settings.

Add a New Setting to a Calculator Element


Add a setting to a section in a calculator element.

Add a New Setting to a Calculator Section


Add a setting directly to a section of the calculator, without attaching it to a specific element.

Add a New Tag Section


Add Calculator Tags


Front End Actions

Modify the behaviour of calculators by adding new processors and user interface elements. In order for the calculator to function properly, processors need to be built in JavaScript with a PHP fallback.

Add a New Feature Once RMC Pro is Ready


Enqueue Supporting Scripts and JavaScript Processors


Add a New PHP Processor


Registers a processor callback for the interface, processors, calculators, or sub-calculations. The is the PHP fallback processor for the no JavaScript use case.

// Create the callback function to register your processor
function [your_prefix]_register_processor() {
    // Set the processor to run as an 'input', 'primary' processor (Processors and Calculators), 'secondary' (Sub-Calculations), or on 'output'
    $timing         = 'input';
    $section_slug   = 'interface'; // Or other processor section name
    $processor_slug = '[your_processor_name]';
    $callback       = '[your_callback_name]';
    // Add a new processor
    rmcp_add_processor( $timing, $section_slug, $processor_slug, $callback );
// Add the action to register the processor
add_action( 'rmcp_add_processors', '[your_prefix]_register_processor' );

// Create the processor function
function [your_processor_name]( $arg1, $arg2, ... ) {
    // ... Process and validate data ... //
    return [your_result];

A JavaScript processor must also be loaded on the rmcp_enqueue_scripts action and registered on the rmcp object.

    function( arg1, arg2, ... ) {
        // ... Your custom process ... //
        return [your_result];
    // Is an input?
    true // or false

Add a New UI Element


Front End & Admin

So far, there is only one action that effects front and admin sections…

Add a Preset Calculator