PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.2.10
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.2.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
← All changes | public/dynamic-css/dynamic-css.php +16 -18 2.4.152.2.10 View file →
@@ -9,9 +9,11 @@
9 9 if ( ! defined( 'ABSPATH' ) ) {
10 10 exit;
11 11 }
12 12
13 -$layout_preset = isset( $layouts['pcp_layout_preset'] ) ? $layouts['pcp_layout_preset'] : '';
13 +$view_options = get_post_meta( $pcp_id, 'sp_pcp_view_options', true );
14 +$layouts = get_post_meta( $pcp_id, 'sp_pcp_layouts', true );
15 +$layout = isset( $layouts['pcp_layout_preset'] ) ? $layouts['pcp_layout_preset'] : '';
14 16 // Section Title.
15 17 if ( $view_options['section_title'] ) {
16 18 $section_title_margin_top = $view_options['section_title_margin']['top'] > 0 ? $view_options['section_title_margin']['top'] . 'px' : 0;
17 19 $section_title_margin_right = $view_options['section_title_margin']['right'] > 0 ? $view_options['section_title_margin']['right'] . 'px' : 0;
@@ -26,10 +28,9 @@
26 28
27 29 /**
28 30 * Style for each slide/post.
29 31 */
30 -$post_sorter = isset( $view_options['post_content_sorter'] ) ? $view_options['post_content_sorter'] : '';
31 -
32 +$post_sorter = $view_options['post_content_sorter'];
32 33 // Post Title.
33 34 if ( $post_sorter['pcp_post_title']['show_post_title'] ) {
34 35 $_post_title_typography = $view_options['post_title_typography'];
35 36 $custom_css .= ".pcp-wrapper-{$pcp_id} .sp-pcp-title a {color: {$_post_title_typography['color']};display: inherit;} .pcp-wrapper-{$pcp_id} .sp-pcp-title a:hover {color: {$_post_title_typography['hover_color']};}";
@@ -35,21 +36,19 @@
35 36 $custom_css .= ".pcp-wrapper-{$pcp_id} .sp-pcp-title a {color: {$_post_title_typography['color']};display: inherit;} .pcp-wrapper-{$pcp_id} .sp-pcp-title a:hover {color: {$_post_title_typography['hover_color']};}";
36 37 }
37 38
38 39 // Post Content.
39 -$pcp_post_content = isset( $post_sorter['pcp_post_content'] ) ? $post_sorter['pcp_post_content'] : '';
40 -$show_post_content = isset( $pcp_post_content['show_post_content'] ) ? $pcp_post_content['show_post_content'] : '';
41 -if ( $show_post_content ) {
40 +if ( $post_sorter['pcp_post_content']['show_post_content'] ) {
42 41 $_post_content_typography = $view_options['post_content_typography'];
43 - $custom_css .= ".pcp-wrapper-{$pcp_id} .sp-pcp-post-content{color: {$_post_content_typography['color']}; }";
42 + $custom_css .= ".pcp-wrapper-{$pcp_id} .sp-pcp-post-content{color: {$_post_content_typography['color']}; }";
44 43 }
45 44
46 -if ( 'carousel_layout' === $layout_preset ) {
45 +if ( 'carousel_layout' === $layout ) {
47 46 include SP_PC_PATH . '/public/dynamic-css/carousel-css.php';
48 47 }
49 48
50 49 // Post inner padding.
51 -$post_content_orientation = $view_options['post_content_orientation'];
50 +$post_content_orientation = $view_options['post_content_orientation'];
52 51 if ( 'overlay' !== $post_content_orientation ) {
53 52 $_post_inner_padding = SP_PC_Functions::pcp_metabox_value( 'post_inner_padding_property', $view_options );
54 53 $post_inner_padding_unit = $_post_inner_padding['unit'];
55 54 $post_inner_padding_top = $_post_inner_padding['top'] > 0 ? $_post_inner_padding['top'] . $post_inner_padding_unit : '0';
@@ -68,11 +67,11 @@
68 67 $custom_css .= "#pcp_wrapper-{$pcp_id} .sp-pcp-post {border: {$post_border_width}px {$post_border_style} {$post_border_color};}";
69 68 }
70 69
71 70 // Post background color.
72 -$post_background_property = SP_PC_Functions::pcp_metabox_value( 'post_background_property', $view_options );
71 +$post_background_property = SP_PC_Functions::pcp_metabox_value( 'post_background_property', $view_options );
73 72 $post_border_radius_property = SP_PC_Functions::pcp_metabox_value( 'post_border_radius_property', $view_options );
74 -$custom_css .= "#pcp_wrapper-{$pcp_id} .sp-pcp-post {border-radius: {$post_border_radius_property['all']}px;}";
73 +$custom_css .= "#pcp_wrapper-{$pcp_id} .sp-pcp-post {border-radius: {$post_border_radius_property['all']};}";
75 74 if ( ! in_array( $post_content_orientation, array( 'overlay', 'overlay-box' ), true ) ) {
76 75 $custom_css .= "#pcp_wrapper-{$pcp_id} .sp-pcp-post{background-color: {$post_background_property};}";
77 76 }
78 77
@@ -82,17 +81,16 @@
82 81 $post_thumb_css = $post_sorter['pcp_post_thumb'];
83 82
84 83 // Post Meta.
85 84 $_post_meta_typography = $view_options['post_meta_typography'];
86 -$custom_css .= ".pcp-wrapper-{$pcp_id} .sp-pcp-post-meta li,.pcp-wrapper-{$pcp_id} .sp-pcp-post-meta ul,.pcp-wrapper-{$pcp_id} .sp-pcp-post-meta li a{color: {$_post_meta_typography['color']};}";
87 -$custom_css .= ".pcp-wrapper-{$pcp_id} .sp-pcp-post-meta li a:hover{color: {$_post_meta_typography['hover_color']};}";
85 +$custom_css .= ".pcp-wrapper-{$pcp_id} .sp-pcp-post-meta li,.pcp-wrapper-{$pcp_id} .sp-pcp-post-meta ul,.pcp-wrapper-{$pcp_id} .sp-pcp-post-meta li a{color: {$_post_meta_typography['color']};}";
86 +$custom_css .= ".pcp-wrapper-{$pcp_id} .sp-pcp-post-meta li a:hover{color: {$_post_meta_typography['hover_color']};}";
88 87
89 88 // Post ReadMore Settings.
90 -$post_content_settings = isset( $post_sorter['pcp_post_content'] ) ? $post_sorter['pcp_post_content'] : '';
91 -$show_read_more = isset( $post_content_settings['show_read_more'] ) ? $post_content_settings['show_read_more'] : '';
92 -if ( $show_read_more ) {
89 +$post_content_settings = $post_sorter['pcp_post_content'];
90 +if ( $post_content_settings['show_read_more'] ) {
93 91 $_button_color = $post_content_settings['readmore_color_button'];
94 - $custom_css .= "#pcp_wrapper-{$pcp_id} .pcp-readmore-link{ background: {$_button_color['bg']}; color: {$_button_color['standard']}; border-color: {$_button_color['border']}; } #pcp_wrapper-{$pcp_id} .pcp-readmore-link:hover { background: {$_button_color['hover_bg']}; color: {$_button_color['hover']}; border-color: {$_button_color['hover_border']}; }";
92 + $custom_css .= "#pcp_wrapper-{$pcp_id} .pcp-readmore-link{ background: {$_button_color['bg']}; color: {$_button_color['standard']}; border-color: {$_button_color['border']}; } #pcp_wrapper-{$pcp_id} .pcp-readmore-link:hover { background: {$_button_color['hover_bg']}; color: {$_button_color['hover']}; border-color: {$_button_color['hover_border']}; }";
95 93 }
96 94
97 95 // Pagination CSS and Live filter CSS.
98 96 $show_pagination = isset( $view_options['show_post_pagination'] ) ? $view_options['show_post_pagination'] : '';
@@ -97,6 +95,6 @@
97 95 // Pagination CSS and Live filter CSS.
98 96 $show_pagination = isset( $view_options['show_post_pagination'] ) ? $view_options['show_post_pagination'] : '';
99 97 if ( $show_pagination ) {
100 98 $pagination_btn_color = $view_options['pcp_pagination_btn_color'];
101 - $custom_css .= "#pcp_wrapper-{$pcp_id} .pcp-post-pagination .page-numbers.current, #pcp_wrapper-{$pcp_id} .pcp-post-pagination a.active , #pcp_wrapper-{$pcp_id} .pcp-post-pagination a:hover{ color: {$pagination_btn_color['text_acolor']}; background: {$pagination_btn_color['active_background']}; border-color: {$pagination_btn_color['border_acolor']}; }#pcp_wrapper-{$pcp_id} .pcp-post-pagination .page-numbers, .pcp-post-pagination a{ background: {$pagination_btn_color['background']}; color:{$pagination_btn_color['text_color']}; border-color: {$pagination_btn_color['border_color']}; }";
99 + $custom_css .= "#pcp_wrapper-{$pcp_id} .pcp-post-pagination .page-numbers.current, #pcp_wrapper-{$pcp_id} .pcp-post-pagination a.active , #pcp_wrapper-{$pcp_id} .pcp-post-pagination a:hover{ color: {$pagination_btn_color['text_acolor']}; background: {$pagination_btn_color['active_background']}; border-color: {$pagination_btn_color['border_acolor']}; }#pcp_wrapper-{$pcp_id} .pcp-post-pagination .page-numbers, .pcp-post-pagination a{ background: {$pagination_btn_color['background']}; color:{$pagination_btn_color['text_color']}; border-color: {$pagination_btn_color['border_color']}; }";
102 100 }