Render attributes

The function is used to render custom attributes on an element such as classes and data-attrbiutes. It supports the following properties: Name Type Default Description tag_id String ‘wrapper’ Creates render attribute for tag id if doesn’t exists attribute String ‘class’ Adds an attribute to the tag_id value String Adds the value to the mentioned attribute In php files, render attributes function is used […]

Render tag

Options helpers

When rendering attributes, the following parameters will be replaced with the saved value. {{ELEMENT}} {{ELEMENT}} will register the style options for the wrapper For example, when adding css_style, {{ELEMENT}} will be replaced by the generated ID : $options->add_option(             ‘title_border_color’,             [                 ‘type’      => ‘colorpicker’,                 ‘width’     => 50,                 ‘title’     => __( ‘Title border color’, ‘zionbuilder’ ),                 ‘css_style’ => [                     [                         ‘selector’ => ‘{{ELEMENT}} .zb-el-alert__title’,                         ‘value’    => ‘border-color: {{VALUE}}’,                     ],                 ],             ]         ); This code will compile the following css: #uid680420617611 .zb-el-alert__title { border-color: hsl(53, […]