<?php $expires = 2592000; header("Content-Type: text/css"); header("Pragma: public"); header("Cache-Control: maxage=" . $expires); header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT'); include_once '../../../../wp-config.php'; include_once '../../../../wp-load.php'; include_once '../../../../wp-includes/wp-db.php'; $css = xmt_css_minify(file_get_contents("css.css")); global $xmt_acc; foreach ($xmt_acc as $acc => $xmt_det) { echo str_replace('{xmt_id}', '#xmt_' . $acc . '_wid', $css); }
function xmt_css() { global $xmt_acc; echo '<link rel="stylesheet" href="' . xmt_get_dir('url') . '/css/css.php" type="text/css" media="screen" />'; foreach ($xmt_acc as $acc => $acc_det) { $avt_szw = intval($xmt_acc[$acc]['cfg']['avt_szw']); $avt_szh = intval($xmt_acc[$acc]['cfg']['avt_szh']); $avt_shw = intval($xmt_acc[$acc]['cfg']['avt_shw']); $cst_css = $xmt_acc[$acc]['cfg']['cst_css']; $css = ''; if ($avt_szw && $avt_szh) { $css .= '#xmt_' . $acc . '_wid.xmt .tweet_avatar{width:' . $avt_szw . 'px;height:' . $avt_szh . 'px} '; if ($avt_shw) { $css .= '#xmt_' . $acc . '_wid.xmt ul li.tweet_list{min-height:' . ($avt_szh + 7) . 'px} '; } } else { if ($avt_shw) { $css .= '#xmt_' . $acc . '_wid.xmt ul li.tweet_list{min-height:57px} '; } } if ($cst_css) { $cst_css = str_replace('{xmt_id}', '#xmt_' . $acc . '_wid', $cst_css); $css .= xmt_css_minify($cst_css) . ' '; } if ($css) { echo '<style type="text/css">/*<![CDATA[*/ ' . $css . ' /*]]>*/</style>'; } } }