| 1 |
<?php |
| 2 |
/** |
| 3 |
* Custom CSS Controller |
| 4 |
* |
| 5 |
* This file include the inline css to the page. |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { exit; } |
| 9 |
|
| 10 |
$css = ''; |
| 11 |
|
| 12 |
if ($type != 'global') { |
| 13 |
|
| 14 |
$fm = new WPComment_InputManager($field_meta, $type); |
| 15 |
|
| 16 |
switch ($type) { |
| 17 |
case 'image': |
| 18 |
|
| 19 |
$active_imgborderclr = $fm->get_meta_value('selected_img_bordercolor', '#f00'); |
| 20 |
$img_width = $fm->get_meta_value('image_width', '75px'); |
| 21 |
$img_height = $fm->get_meta_value('image_height', 'auto'); |
| 22 |
|
| 23 |
$css .= '.' . $fm->data_name().' .nm-boxes-outer input:checked + img { |
| 24 |
border: 2px solid '.esc_attr($active_imgborderclr).' !important; |
| 25 |
}'; |
| 26 |
$css .= '.' . $fm->data_name().' .pre_upload_image img{ |
| 27 |
height: '.esc_attr($img_height).' !important; |
| 28 |
width : '.esc_attr($img_width).' !important; |
| 29 |
}'; |
| 30 |
break; |
| 31 |
} |
| 32 |
|
| 33 |
}else{ |
| 34 |
|
| 35 |
if (wpcomment_get_option('wpcomment_input_box_border_shadow_focus') != '') { |
| 36 |
|
| 37 |
$css .='.wpcomment-wrapper input[type="text"]:focus, |
| 38 |
.wpcomment-wrapper input[type="date"]:focus, |
| 39 |
.wpcomment-wrapper input[type="url"]:focus, |
| 40 |
.wpcomment-wrapper input[type="number"]:focus, |
| 41 |
.wpcomment-wrapper select:focus, |
| 42 |
.wpcomment-wrapper textarea:focus{ |
| 43 |
box-shadow:'.esc_attr(wpcomment_get_option('wpcomment_input_box_border_shadow_focus')).'!important; |
| 44 |
}'; |
| 45 |
} |
| 46 |
} |
| 47 |
|
| 48 |
echo $css; |
| 49 |
?> |