} #footer { background: #<?php echo $pp_skin_bg_style[1]; ?> ; } <?php } ?> <?php $pp_button_bg_color = get_option('pp_button_bg_color'); if (!empty($pp_button_bg_color)) { $pp_button_bg_color_light = '#' . hex_lighter(substr($pp_button_bg_color, 1), 20); ?> input[type=submit], input[type=button], a.button { background: <?php echo $pp_button_bg_color; ?> ; background: -webkit-gradient(linear, left top, left bottom, from(<?php echo $pp_button_bg_color_light; ?> ), to(<?php echo $pp_button_bg_color; ?> )); background: -moz-linear-gradient(top, <?php echo $pp_button_bg_color_light;
function table_func($atts, $content) { //extract short code attr extract(shortcode_atts(array('color' => ''), $atts)); switch (strtolower($color)) { case 'black': $bg_color = '#000000'; $text_color = '#ffffff'; break; default: case 'gray': $bg_color = '#666666'; $text_color = '#ffffff'; break; case 'white': $bg_color = '#f5f5f5'; $text_color = '#444444'; break; case 'blue': $bg_color = '#004a80'; $text_color = '#ffffff'; break; case 'yellow': $bg_color = '#f9b601'; $text_color = '#ffffff'; break; case 'red': $bg_color = '#9e0b0f'; $text_color = '#ffffff'; break; case 'orange': $bg_color = '#fe7201'; $text_color = '#ffffff'; break; case 'green': $bg_color = '#7aad34'; $text_color = '#ffffff'; break; case 'pink': $bg_color = '#d2027d'; $text_color = '#ffffff'; break; case 'purple': $bg_color = '#582280'; $text_color = '#ffffff'; break; } $bg_color_light = '#' . hex_lighter(substr($bg_color, 1), 20); $border_color = '#' . hex_lighter(substr($bg_color, 1), 10); $return_html = '<style> #content_wrapper .table_' . strtolower($color) . ' table { border:1px solid ' . $border_color . '; } #content_wrapper .table_' . strtolower($color) . ' table tr th { background: -webkit-gradient(linear, left top, left bottom, from(' . $bg_color_light . '), to(' . $bg_color . '));background: -moz-linear-gradient(top, ' . $bg_color_light . ', ' . $bg_color . ');filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'' . $bg_color_light . '\', endColorstr=\'' . $bg_color . '\');color:' . $text_color . '; } #content_wrapper .table_' . strtolower($color) . ' table tr th, #content_wrapper .table_' . strtolower($color) . ' table tr td { border-bottom:1px solid ' . $border_color . '; } #content_wrapper table tr:last-child { border-bottom: 0; } </style>'; $return_html = '<div class="table_' . strtolower($color) . '">'; $return_html .= html_entity_decode(do_shortcode($content)); $return_html = '</div>'; return $return_html; }
function ppb_styled_box_func($atts, $content) { //extract short code attr extract(shortcode_atts(array('title' => '', 'size' => 'one', 'style' => '', 'color' => ''), $atts)); switch (strtolower($color)) { case 'black': $bg_color = '#000000'; $text_color = '#ffffff'; break; default: case 'gray': $bg_color = '#666666'; $text_color = '#ffffff'; break; case 'white': $bg_color = '#f5f5f5'; $text_color = '#444444'; break; case 'blue': $bg_color = '#004a80'; $text_color = '#ffffff'; break; case 'yellow': $bg_color = '#f9b601'; $text_color = '#ffffff'; break; case 'red': $bg_color = '#9e0b0f'; $text_color = '#ffffff'; break; case 'orange': $bg_color = '#fe7201'; $text_color = '#ffffff'; break; case 'green': $bg_color = '#7aad34'; $text_color = '#ffffff'; break; case 'pink': $bg_color = '#d2027d'; $text_color = '#ffffff'; break; case 'purple': $bg_color = '#582280'; $text_color = '#ffffff'; break; } $bg_color_light = '#' . hex_lighter(substr($bg_color, 1), 20); $border_color = '#' . hex_lighter(substr($bg_color, 1), 10); $return_html = '<div class="' . $size . '">'; $return_html .= '<div class="styled_box_title" style="border:1px solid ' . $border_color . ';background: ' . $bg_color . ';color:' . $text_color . ' ' . $style . '">' . $title . '</div><br class="clear"/>'; $return_html .= '<div class="styled_box_content ' . $size . '" style="border:1px solid ' . $border_color . ';border-top:0;">' . $content . '</div>'; $return_html .= '</div>'; return $return_html; }