'', 'class' =>'', 'style' =>'normal', 'align' =>'', 'width' =>'100', 'margin_top' =>'', 'margin_bottom' =>'', 'border_size' =>'', 'border_color' =>'', 'icon' =>'fa-leaf', ), $args ); extract( $defaults ); self::$args = $defaults; if(is_numeric($width)) $width = $width.'px'; if(is_numeric($margin_top)) $margin_top = $margin_top.'px'; if(is_numeric($margin_bottom)) $margin_bottom = $margin_bottom.'px'; if(is_numeric($border_size)) $border_size = $border_size.'px'; $uniq_class = uniqid('divider-'); $class .= ' divider'; $class .= ' '.$uniq_class; // normal/shadow/dotted/dashed/double line/double dashed/double dotted/image/icon/back_to_top/title_left/ switch( $style ){ case "normal": $class .= ' divider-border'; break; case "shadow": $class .= ' divider-shadow'; break; case "dotted": $class .= ' divider-border dotted'; break; case "dashed": $class .= ' divider-border dashed'; break; case "double_line": $class .= ' divider divider-border double-line'; break; case "double_dashed": $class .= ' divider-border dashed double-line'; break; case "double_dotted": $class .= ' divider-border dotted double-line'; break; case "icon": $class .= ' divider-icon center'; break; case "back_to_top": $class .= ' divider-back-to-top'; break; case "image": $class .= ' divider-image'; break; } if( $align == 'center' ) $class .= ' center'; $textstyle = sprintf('.'.$uniq_class.'{ margin-top: %s;margin-bottom:%s;width:%s;}.'.$uniq_class.' .divider-border{border-bottom-width:%s; border-color:%s;}.'.$uniq_class.' .double-line.divider-inner-item .divider-inner{border-top-width: %s; border-bottom-width: %s;}.'.$uniq_class.' .divider-border.divider-inner-item .divider-inner{ border-bottom-width: %s;}',$margin_top,$margin_bottom,$width,$border_size,$border_color,$border_size,$border_size,$border_size); $styles = sprintf( '', $textstyle); $html = '