Created
August 23, 2022 10:11
-
-
Save marcusig/86ef40336557538def3d1ad27b2852ee to your computer and use it in GitHub Desktop.
[Configurator] add html support to layer name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the new label, with html support: {{{ instead of {{ | |
function my_prefix_frontend_configurator_layer_name() { | |
?> | |
<span class="text layer-name">{{{data.name}}}</span> | |
<?php | |
} | |
add_action( 'tmpl-mkl-pc-configurator-layer-item-button', 'my_prefix_frontend_configurator_layer_name', 10 ); | |
// Remove the existing label | |
add_action( 'mkl_pc_frontend_templates_before', function() { | |
remove_action( 'tmpl-mkl-pc-configurator-layer-item-button', 'mkl_pc_frontend_configurator_layer_name', 10 ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment