'0px', 'line-height' => '0px', 'letter-spacing' => '0px', 'text-hshadow' => '0px', 'text-vshadow' => '0px', 'text-blur' => '0px', 'use' => 0, 'font-family' => '', 'font-style' => '', 'font-weight' => '', 'font-decoration' => '', 'font-transform' => '', 'font-google' => '', 'font-google-variant' => '', 'color' => '', 'text-shadowcolor' => '' ); $value = wp_parse_args( $value, $defaults ); // getting values if( $value['color'] ) $cp_style = sprintf(' style="background:%1$s;border-color:%1$s"', $value['color']); if( $value['text-shadowcolor'] ) $tsc_style = sprintf(' style="background:%1$s;border-color:%1$s"', $value['text-shadowcolor']); ?>
>
'. esc_html__( 'Use Google Fonts Instead', 'spyropress' ). ' ', $id, $item['name'], checked($value['use'], 1, false)); ?>
 
>
The quick brown fox jumps over the lazy dog.', 'spyropress' ); ?>
array ( 'range' => 'min', 'min' => 1, 'max' => 120, 'value' => (int)$fontsize_value ), "#{$id}-linehight" => array ( 'range' => 'min', 'min' => 7, 'max' => 89, 'value' => (int)$line_height_value ), "#{$id}-letterspacing" => array ( 'min' => -20, 'max' => 20, 'value' => (int)$letter_spacing_value ), "#{$id}-hshadow" => array ( 'min' => -50, 'max' => 50, 'value' => (int)$slider_hshadow_value ), "#{$id}-vshadow" => array ( 'min' => -50, 'max' => 50, 'value' => (int)$slider_vshadow_value ), "#{$id}-blur" => array ( 'range' => 'min', 'min' => 0, 'max' => 100, 'value' => (int)$slider_blur_value ) ); $js = "panelUi.bind_typography( '{$id}', ".json_encode($typo).");"; if($is_widget) { if(!$is_builder) add_jquery_ready($js); else $ui_content .= sprintf( '', $js, "\n" ); return $ui_content; } else { echo $ui_content; add_jquery_ready($js); } } function spyropress_widget_typography( $item, $id, $value, $is_builder = false ) { return spyropress_ui_typography( $item, $id, $value, true, $is_builder ); } /** * Generate style attribute for preview */ function spyropress_font_preview( $styles ) { if( $styles['color'] ) echo 'color:'.$styles['color'].';'; if( $styles['font-family'] ) echo 'font-family:'.$styles['font-family'].';'; if( $styles['font-weight'] ) echo 'font-weight:'.$styles['font-weight'].';'; if( $styles['font-transform'] ) echo 'text-transform:'.$styles['font-transform'].';'; if( $styles['font-style'] ) echo 'font-style:'.$styles['font-style'].';'; if( $styles['font-decoration'] ) echo 'text-decoration:'.$styles['font-decoration'].';'; if( $styles['font-size'] && $styles['font-size'] != '0px' ) echo 'font-size:'.$styles['font-size'].';'; if( $styles['line-height'] && $styles['line-height'] != '0px') echo 'line-height:'.$styles['line-height'].';'; if( $styles['letter-spacing'] && $styles['letter-spacing'] != '0px' ) echo 'letter-spacing:'.$styles['letter-spacing'].';'; if( $styles['text-shadowcolor'] ) echo 'text-shadow:'.$styles['text-hshadow'].' '.$styles['text-vshadow'].' '.$styles['text-blur'].' '.$styles['text-shadowcolor'].';'; } /** * Font Families * @uses apply_filters() */ function spyropress_panel_font_families() { return apply_filters( 'spyropress_font_families', array( '' => '', 'arial' => esc_html__( 'Arial', 'spyropress' ), 'georgia' => esc_html__( 'Georgia', 'spyropress' ), 'helvetica' => esc_html__( 'Helvetica', 'spyropress' ), 'palatino' => esc_html__( 'Palatino', 'spyropress' ), 'tahoma' => esc_html__( 'Tahoma', 'spyropress' ), 'times' => esc_html__( '"Times New Roman", sans-serif', 'spyropress' ), 'trebuchet' => esc_html__( 'Trebuchet', 'spyropress' ), 'verdana' => esc_html__( 'Verdana', 'spyropress' ) )); } /** * Font Weights */ function spyropress_panel_font_weights() { return array( '' => '', 'normal' => esc_html__( 'Normal', 'spyropress' ), 'bold' => esc_html__( 'Bold', 'spyropress' ), 'bolder' => esc_html__( 'Bolder', 'spyropress' ), 'lighter' => esc_html__( 'Lighter', 'spyropress' ), '100' => esc_html__( '100', 'spyropress' ), '200' => esc_html__( '200', 'spyropress' ), '300' => esc_html__( '300', 'spyropress' ), '400' => esc_html__( '400', 'spyropress' ), '500' => esc_html__( '500', 'spyropress' ), '600' => esc_html__( '600', 'spyropress' ), '700' => esc_html__( '700', 'spyropress' ), '800' => esc_html__( '800', 'spyropress' ), '900' => esc_html__( '900', 'spyropress' ), 'inherit' => esc_html__( 'Inherit', 'spyropress' ) ); } /** * Font Transform */ function spyropress_panel_font_transform() { return array( '' => '', 'none' => esc_html__( 'None', 'spyropress' ), 'uppercase' => esc_html__( 'UpperCase', 'spyropress' ), 'lowercase' => esc_html__( 'LowerCase', 'spyropress' ), 'capitalize' => esc_html__( 'Capitalize', 'spyropress' ) ); } /** * Font Styles */ function spyropress_panel_font_styles() { return array( '' => '', 'normal' => esc_html__( 'Normal', 'spyropress' ), 'italic' => esc_html__( 'Italic', 'spyropress' ), 'oblique' => esc_html__( 'Oblique', 'spyropress' ), 'inherit' => esc_html__( 'Inherit', 'spyropress' ) ); } /** * Font Decoration */ function spyropress_panel_font_decoration() { return array( '' => '', 'none' => esc_html__( 'None', 'spyropress' ), 'line-through' => esc_html__( 'Line-Through', 'spyropress' ), 'overline' => esc_html__( 'Overline', 'spyropress' ), 'underline' => esc_html__( 'Underline', 'spyropress' ), 'inherit' => esc_html__( 'Inherit', 'spyropress' ) ); } ?>