Compiler Integration

3. Compiler Integration

The QuadMenu stylesheets are created dynamically each time the user makes a change in the administration panel.

So if you want to integrate the compiler within your backend settings you have go through this tutorial.

Here we will provide two ways to trigger the compiler on the setting change in your theme panel.

3.1. Basic Integration

This method allows you to integrate the compiler in any theme framework.

3.1.1. Load Scripts

Include this function it into your theme functions.php file to include the js files of the compiler in the WordPress backend.

3.1.2. Trigger Compiler

Include this function it into your theme functions.php file to trigger compiler after the admin panel reload.

This function change the quadmenu_compiler value to 1, and the js files included before will trigger the compiler.

You’ll have to do the right validation to call this function only when the settings related to the menu are changed and make sure the panel is reload.

3.2. Redux Integration

QuadMenu allows you to integrate the compiler with the Redux Framework panel. This is possible through the redux hooks and allows you to trigger the compiler without reloading the panel.

3.2.1. Load Scripts

Include this function it into your theme functions.php file to include the js files of the compiler in your Redux admin panel.

3.2.2. Trigger Compiler

Once you set the theme locations where you want to activate QuadMenu you have to set some general parameters to fit the responsive layout of your theme.

Include this function it into your theme functions.php file to trigger compiler on the redux settings change.

3.2.3. Set Variables

Once you set the all responsive and font settings you have to define the layout of QuadMenu, that depends on your theme requirements and yout imagination.

Include this function it into your theme functions.php file to integrate the QuadMenu variables in your redux admin panel that will be used to compile the stylesheets.

3.3. Integration Example