PluginProbe
WP Ultimate Post Grid / 1.8
WP Ultimate Post Grid v1.8
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 1.8, at helpers/css.php

47 lines 2.4 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, 'custom_css' ), 20 );
9 }
10
11 public function dropdown_filters_css()
12 {
13 if( WPUltimatePostGrid::is_premium_active() ) {
14 $border_color = WPUltimatePostGrid::option( 'filters_dropdown_border_color', '#AAAAAA' );
15 $text_color = WPUltimatePostGrid::option( 'filters_dropdown_text_color', '#444444' );
16 $background_highlight_color = WPUltimatePostGrid::option( 'filters_dropdown_highlight_background_color', '#5897FB' );
17 $text_highlight_color = WPUltimatePostGrid::option( 'filters_dropdown_highlight_text_color', '#FFFFFF' );
18
19 echo '<style type="text/css">';
20 // Border Color
21 echo '.select2wpupg-selection, .select2wpupg-dropdown { border-color: '.$border_color.'!important; }';
22 echo '.select2wpupg-selection__arrow b { border-top-color: '.$border_color.'!important; }';
23 echo '.select2wpupg-container--open .select2wpupg-selection__arrow b { border-bottom-color: '.$border_color.'!important; }';
24
25 // Text color
26 echo '.select2wpupg-selection__placeholder, .select2wpupg-search__field, .select2wpupg-selection__rendered, .select2wpupg-results__option { color: '.$text_color.'!important; }';
27 echo '.select2wpupg-search__field::-webkit-input-placeholder { color: '.$text_color.'!important; }';
28 echo '.select2wpupg-search__field:-moz-placeholder { color: '.$text_color.'!important; }';
29 echo '.select2wpupg-search__field::-moz-placeholder { color: '.$text_color.'!important; }';
30 echo '.select2wpupg-search__field:-ms-input-placeholder { color: '.$text_color.'!important; }';
31
32 // Highlight colors
33 echo '.select2wpupg-results__option--highlighted { color: '.$text_highlight_color.'!important; background-color: '.$background_highlight_color.'!important; }';
34
35 echo '</style>';
36 }
37 }
38
39 public function custom_css()
40 {
41 if( WPUltimatePostGrid::option( 'custom_code_public_css', '' ) !== '' ) {
42 echo '<style type="text/css">';
43 echo WPUltimatePostGrid::option( 'custom_code_public_css', '' );
44 echo '</style>';
45 }
46 }
47 }