/**
 * Renders content block fields
 * @param string $tab The tab to render the fields for
 * @since 0.1.0
 */
function pootlepb_block_dialog_fields_output($tab = null)
{
    //Content block panel fields
    $fields = pootlepb_block_styling_fields();
    //Prioritize array
    pootlepb_prioritize_array($fields);
    foreach ($fields as $field) {
        $key = $field['id'];
        if (!empty($tab)) {
            if ($tab != $field['tab']) {
                continue;
            }
        }
        //Output html field
        if ('html' == $field['type']) {
            echo $field['name'];
            continue;
        }
        echo "<div class='field field-" . $key . " field_type-" . $field['type'] . "'>";
        echo '<label>' . esc_html($field['name']) . '</label>';
        echo '<span>';
        pootlepb_render_content_block_field($key, $field);
        echo '</span>';
        if (isset($field['help-text'])) {
            echo '<span class="dashicons dashicons-editor-help tooltip" data-tooltip="' . esc_html($field['help-text']) . '"></span>';
        }
        echo '</div>';
    }
}
 /**
  * Sets content block embed and inline css
  * @param string $attr
  * @param array $styleWithSelector
  * @param array $styleArray
  * @param string $id
  */
 private function set_inline_embed_styles(&$attr, &$styleWithSelector, $styleArray, $id)
 {
     $inlineStyle = '';
     $widgetStyleFields = pootlepb_block_styling_fields();
     foreach ($widgetStyleFields as $key => $field) {
         if (empty($field['css'])) {
             continue;
         }
         if ($field['type'] == 'border') {
             //Border field
             $this->content_block_border($inlineStyle, $styleWithSelector, $id, $styleArray, $key, $field);
         } else {
             //Default for fields
             $this->default_block_field($inlineStyle, $styleWithSelector, $styleArray, $id, $key, $field);
         }
     }
     $this->bg_color_transparency($inlineStyle, $styleArray);
     $attr['style'] = $inlineStyle . $styleArray['inline-css'];
     /**
      * Filters content block attributes
      * @var array $attr Content block attributes
      * @var array $style Content block style settings
      * @var string $id Unique ID of content block
      * @since 0.1.0
      */
     $attr = apply_filters('pootlepb_content_block_attributes', $attr, $styleArray, $id);
 }