PluginProbe
WP Ultimate Post Grid / 2.0
WP Ultimate Post Grid v2.0
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
wp-ultimate-post-grid / helpers / css.php

css.php in WP Ultimate Post Grid 2.0, at helpers/css.php

57 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class WPUPG_Css {
4
5 public function __construct()
6 {
7 add_action( 'wp_head', array( $this, 'dropdown_filters_css' ), 19 );
8 add_action( 'wp_head', array( $this, 'css' ) );
9 add_action( 'wp_head', array( $this, 'custom_css' ), 20 );
10 }
11
12 public function dropdown_filters_css()
13 {
14 if( WPUltimatePostGrid::is_premium_active() ) {
15 $border_color = WPUltimatePostGrid::option( 'filters_dropdown_border_color', '#AAAAAA' );
16 $text_color = WPUltimatePostGrid::option( 'filters_dropdown_text_color', '#444444' );
17 $background_highlight_color = WPUltimatePostGrid::option( 'filters_dropdown_highlight_background_color', '#5897FB' );
18 $text_highlight_color = WPUltimatePostGrid::option( 'filters_dropdown_highlight_text_color', '#FFFFFF' );
19
20 echo '<style type="text/css">';
21 // Border Color
22 echo '.select2wpupg-selection, .select2wpupg-dropdown { border-color: '.$border_color.'!important; }';
23 echo '.select2wpupg-selection__arrow b { border-top-color: '.$border_color.'!important; }';
24 echo '.select2wpupg-container--open .select2wpupg-selection__arrow b { border-bottom-color: '.$border_color.'!important; }';
25
26 // Text color
27 echo '.select2wpupg-selection__placeholder, .select2wpupg-search__field, .select2wpupg-selection__rendered, .select2wpupg-results__option { color: '.$text_color.'!important; }';
28 echo '.select2wpupg-search__field::-webkit-input-placeholder { color: '.$text_color.'!important; }';
29 echo '.select2wpupg-search__field:-moz-placeholder { color: '.$text_color.'!important; }';
30 echo '.select2wpupg-search__field::-moz-placeholder { color: '.$text_color.'!important; }';
31 echo '.select2wpupg-search__field:-ms-input-placeholder { color: '.$text_color.'!important; }';
32
33 // Highlight colors
34 echo '.select2wpupg-results__option--highlighted { color: '.$text_highlight_color.'!important; background-color: '.$background_highlight_color.'!important; }';
35
36 echo '</style>';
37 }
38 }
39
40 public function css()
41 {
42 if( WPUltimatePostGrid::option( 'grid_container_animation_speed', '0.8' ) != '0' ) {
43 echo '<style type="text/css">';
44 echo '.wpupg-grid { transition: height ' . WPUltimatePostGrid::option( 'grid_container_animation_speed', '0.8' ) . 's; }';
45 echo '</style>';
46 }
47 }
48
49 public function custom_css()
50 {
51 if( WPUltimatePostGrid::option( 'custom_code_public_css', '' ) !== '' ) {
52 echo '<style type="text/css">';
53 echo WPUltimatePostGrid::option( 'custom_code_public_css', '' );
54 echo '</style>';
55 }
56 }
57 }