コード例 #1
0
 $formatimg = $format == '' ? 'standart' : "format-{$format}";
 $no_content = isset($blogConf['hide_content']) && $blogConf['hide_content'] == true ? "no-content" : "";
 $color = $class = '';
 if (isset($post_options['custom_bg']) && $post_options['custom_bg']) {
     $color = $post_options['bg_color'];
     if (!empty($color)) {
         $class = "post-" . strtolower(getContrast50($color)) . " ";
         $color = 'style="background-color: ' . $color . '"';
     }
 } else {
     $args = array('orderby' => 'name');
     $terms = wp_get_post_terms($post->ID, 'category', $args);
     $option = get_option("taxonomy_" . $terms[0]->term_id);
     $color = isset($option['bg_color']) ? $option['bg_color'] : '';
     if (!empty($color)) {
         $class = "post-" . strtolower(getContrast50($color)) . " ";
         $color = 'style="background-color: ' . $option['bg_color'] . '"';
     }
 }
 if (isset($post_options['custom_link'])) {
     $customlink['enable'] = 'true';
     $customlink['url'] = $post_options['custom_link_url'];
     if (!preg_match_all('!https?://[\\S]+!', $customlink['url'], $matches)) {
         $customlink['url'] = "http://" . $customlink['url'];
     }
     $customlink['target'] = ' target="' . $post_options['custom_link_target'] . '"';
 } else {
     $customlink['url'] = get_permalink();
     $customlink['enable'] = $customlink['target'] = "";
 }
 $is_featured_post = isset($post_options['is_featured_post']) && $post_options['is_featured_post'] ? "article-featured" : "";
コード例 #2
0
ファイル: front-page.php プロジェクト: Jonnyonthe/longtermcar
                                        <?php 
                echo do_shortcode(get_the_content());
                ?>
                                </div> <!-- .page-fullwdth-content -->
                            </div> <!-- .page-content -->
                        <?php 
            } else {
                // Parallax Page
                $image = get_post_meta($post->ID, 'thm_background_url', true);
                $parallaxId[] = $post->post_name;
                ?>
                            <section id="<?php 
                echo $post->post_name;
                ?>
" class="parallax parallax-image <?php 
                echo getContrast50($bg_color);
                ?>
" style="background-color: <?php 
                echo $bg_color;
                ?>
; background-image:url('<?php 
                if (isset($image)) {
                    echo $image;
                }
                ?>
');">
                                <div class="overlay"></div>
                                <div class="container">
                                    <div  class="parallax-content">

                                        <div class="row page-content">  
コード例 #3
0
ファイル: optinrev-fn.php プロジェクト: erikdukker/medisom
    function optinrev_popup_css($is_view = NULL)
    {
        $optin = optinrev_get('optinrevolution/optin1');
        if (empty($optin)) {
            return false;
        }
        $dir = OPTINREV_DIR;
        if ($optin) {
            $optin = unserialize($optin);
        } else {
            //load default
            $optin = array('optinrev_round_border' => '', 'optinrev_wbg_color' => '#FFFFFF', 'optinrev_wbg_opacity' => 0, 'optinrev_border_opacity' => 0, 'optinrev_pwbg_color' => '#FFFFFF', 'optinrev_border_color' => '#000000', 'optinrev_border_radius' => 0, 'optinrev_border_thickness' => 1, 'optinrev_top_margin' => 50, 'optinrev_wwidth' => 700, 'optinrev_hheight' => 400, 'optinrev_delay' => 0, 'optinrev_close_popup_image' => 'close1', 'optinrev_close_button' => 'top:230px;right:230px;', 'optinrev_link_color' => '#1122CC', 'optinrev_link_underline' => '');
        }
        $pdim = array('width' => $optin['optinrev_wwidth'], 'height' => $optin['optinrev_hheight']);
        //dynamic close button
        $ww = $pdim['width'];
        $wh = $pdim['height'];
        $bw = $optin['optinrev_border_thickness'];
        //goto website button
        $loc = isset($optin['optinrev_gotowebsite']) && $optin['optinrev_gotowebsite'] == 'bottom' ? $wh - 56 : 20;
        $close_btn = array('close1' => array($ww - 30 / 2 + $bw, -(30 / 2) - $bw), 'close2' => array($ww - 45 / 2 + $bw, -(45 / 2) - $bw), 'close3' => array($ww - 60 / 2 + $bw, -(60 / 2) - $bw), 'close4' => array($ww - 30 / 2 + $bw, -(30 / 2) - $bw), 'close5' => array($ww - 45 / 2 + $bw, -(45 / 2) - $bw), 'close6' => array($ww - 60 / 2 + $bw, -(60 / 2) - $bw), 'close7' => array($ww - 272, $loc), 'close8' => array($ww - 272, $loc));
        $lpos = $close_btn[$optin['optinrev_close_popup_image']];
        $close_btn = 'left:' . $lpos[0] . 'px;top:' . $lpos[1] . 'px;';
        $top_margin = !$is_view ? 'margin-top:45px !important;' : '';
        $li_padding = $is_view ? 'line-height: 35px !important;' : '';
        //IE only
        $border_color = optinrev_is_ie() ? $optin['optinrev_border_color'] : 'rgba(' . implode(',', hex2dec($optin['optinrev_border_color'])) . ',' . $optin['optinrev_border_opacity'] / 100 . ')';
        $htc = optinrev_is_ie() ? 'behavior: url(' . $dir . 'css/PIE.php);' : '';
        $unrem_css = '
img.wotimg {border: 1px dashed #888 !important;}
.mceImageDrag {padding:0px !important;position:absolute;z-index:9999;}
#close {position:absolute;z-index:1001;text-decoration:none;border: 1px solid transparent;}
.mceImageSelect {position:relative;padding:0px !important;border: 1px dashed #888 !important;}
.mceWotlayer {border: 1px dashed #888 !important;z-index:999;padding:0px !important;margin:0px !important;}
';
        if ($is_view) {
            $unrem_css = '';
        }
        $view_cleaned = '
#zindex {position:absolute;width:50px;padding:0px;font-size:9px;font-weight:normal;background-color:#f0f0f0;color:#404040;padding:2px}
#imglabel {position:absolute;left:0px;bottom:0px;padding:0px;font-size:9px;font-weight:normal;background-color:red;color:#ffffff;padding:0px 2px 0px 2px;}
#mceWotmove {position:absolute;right:-1px;bottom:-1px;width:14px;height:14px; background: url(' . $dir . 'images/cursor_drag_arrow.png) no-repeat center center;cursor:move;background-color:#fff;z-index:99999;}
#mceDeleteObj {position:absolute;left:-1px;top:-12px;width:12px;height:12px; background: url(' . $dir . 'images/delete-ic.png) no-repeat center center;cursor:pointer;background-color:#fff;z-index:99999;}
';
        if ($is_view) {
            $view_cleaned = '';
        }
        //is rounded border
        $optin['optinrev_border_radius'] = $optin['optinrev_round_border'] == 'on' ? $optin['optinrev_border_radius'] : '0';
        $form_css = $is_view ? isset($optin['optinrev_email_form_css']) ? stripcslashes($optin['optinrev_email_form_css']) : '' : '';
        $wm_hand = $is_view ? '#simplemodal-container #wm {cursor:pointer;}' : '';
        $pwd_color = !$is_view ? 'black' : getContrast50($optin['optinrev_wbg_color']);
        $cursor = optinrev_is_ie() ? 'cursor:crosshair;' : 'cursor: se-resize;';
        //resizable
        $resizable = '
.ui-icon { width: 18px; height: 18px; background-image: url(' . $dir . 'images/hgrip.png); }
.ui-icon-gripsmall-diagonal-se { background-repeat: no-repeat; background-position: left top;}
.ui-icon-gripsmall-diagonal-se:hover { background-repeat: no-repeat; background-position: left -18px;}
.ui-resizable-handle { position: absolute;font-size: 0.1px; z-index: 99999; display: block; ' . $cursor . '}
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-se { ' . $cursor . ' width: 18px; height: 18px; right: -8px;bottom: -8px;}
';
        if ($is_view) {
            $resizable = '';
        }
        $lnk_under = 'none';
        if (isset($optin['optinrev_link_underline'])) {
            $lnk_under = $optin['optinrev_link_underline'] == 'on' ? 'underline' : 'none';
        }
        $lnk_color = isset($optin['optinrev_link_color']) ? $optin['optinrev_link_color'] : '';
        $mcebody = !$is_view ? '#tinymce {overflow:hidden !important;} #tinymce a:link, #tinymce a:visited, #tinymce a:hover, #tinymce a:active {color:' . $lnk_color . ';text-decoration:' . $lnk_under . ';}' : '';
        //Close button
        $active_close_button = '#simplemodal-container .close1 {background:url(' . $dir . 'images/close1b.png) no-repeat; width:39px; height:39px;' . $close_btn . 'display:inline; z-index:3200; position:absolute;cursor:pointer;text-decoration:none;}';
        //init btn
        $popbtn = array('close1' => array('39px', 'close1b'), 'close2' => array('52px', 'close2b'), 'close3' => array('62px', 'close3b'), 'close4' => array('39px', 'close1r'), 'close5' => array('52px', 'close2r'), 'close6' => array('62px', 'close3r'), 'close7' => array('263px', 'btn1'), 'close8' => array('263px', 'btn2'));
        if ($is_view) {
            if (isset($optin['optinrev_close_popup_image']) && ($sbtn = $optin['optinrev_close_popup_image'])) {
                if (in_array($sbtn, array_keys($popbtn))) {
                    $pbtn = $popbtn[$sbtn];
                    $w = $pbtn[0];
                    $h = $sbtn == 'close7' || $sbtn == 'close8' ? '47px' : $pbtn[0];
                    $active_close_button = sprintf('#simplemodal-container .%s {background:url(%simages/%s.png) no-repeat;
                                        width:%s; height:%s;' . $close_btn . 'display:inline; z-index:3200;
                                        position:absolute;cursor:pointer;text-decoration:none;}', $sbtn, $dir, $pbtn[1], $w, $h);
                }
            }
        } else {
            foreach ($popbtn as $sbtn => $v) {
                $pbtn = $popbtn[$sbtn];
                $w = $pbtn[0];
                $h = $sbtn == 'close7' || $sbtn == 'close8' ? '47px' : $pbtn[0];
                $active_close_button .= sprintf('#simplemodal-container .%s {background:url(%simages/%s.png) no-repeat;
                                        width:%s; height:%s;' . $close_btn . 'display:inline; z-index:3200;
                                        position:absolute;cursor:pointer;text-decoration:none;}', $sbtn, $dir, $pbtn[1], $w, $h);
            }
        }
        $line_height = optinrev_is_ie() ? '130%' : '110%';
        $round_border = optinrev_is_ie() && optinrev_ie_version() < 9 ? 'border-radius: ' . $optin['optinrev_border_radius'] . 'px;' : '-moz-border-radius: ' . $optin['optinrev_border_radius'] . 'px;-webkit-border-radius: ' . $optin['optinrev_border_radius'] . 'px;border-radius: ' . $optin['optinrev_border_radius'] . 'px;-khtml-border-radius:' . $optin['optinrev_border_radius'] . 'px;';
        //Wait box
        $wait_box = 'background-color: #81FF21;color:#000000;font-size:12px !important;border: 1px solid #000000;font-style: normal !important;padding: 6px 10px 6px 10px !important;';
        header('Content-Type: text/css; charset=utf-8');
        header("cache-control: must-revalidate");
        $offset = 60 * 7200;
        $expire = "expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
        header($expire);
        $modal = <<<LOAD_CSS
#simplemodal-overlay {background-color:{$optin['optinrev_wbg_color']} !important;z-index: 9999 !important;}
#simplemodal-container {box-sizing: content-box !important;-moz-box-sizing: content-box !important;-webkit-box-sizing: content-box !important;}
#simplemodal-container {position:fixed;{$top_margin}height:{$pdim['height']}px;width:{$pdim['width']}px;background-color:{$optin['optinrev_pwbg_color']};border:{$optin['optinrev_border_thickness']}px solid {$border_color};{$round_border}{$htc}z-index:9999 !important;text-shadow: none !important;}
#simplemodal-container img {padding:0px;border:none;-webkit-appearance: none;-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}
#simplemodal-container .simplemodal-data a:link,
#simplemodal-container .simplemodal-data a:visited,
#simplemodal-container .simplemodal-data a:hover
#simplemodal-container .simplemodal-data a:active {color:{$lnk_color};text-decoration:{$lnk_under};}
#simplemodal-container .simplemodal-data span {line-height:{$line_height};margin:0px;padding:0px;}
#simplemodal-container .simplemodal-data ol,
#simplemodal-container .simplemodal-data ul {padding:0px;margin:0px;}
#simplemodal-container .simplemodal-data ol li {list-style: decimal inside !important;{$li_padding}}
#simplemodal-container .simplemodal-data ul li {list-style: disc inside !important;{$li_padding}}
#simplemodal-container .simplemodal-data {font-family: arial !important;font-size: 12px;}
#simplemodal-container .simplemodal-data input[type="text"]{text-transform:none !important;}
{$active_close_button}
{$unrem_css}
{$wm_hand}
{$view_cleaned}
{$resizable}
{$mcebody}
#simplemodal-container #wm {cursor:pointer;border: none !important;text-decoration:none !important;}
#waitbox {position:absolute;left:4px;top:4px;{$wait_box}z-index:99999;}
.wp_themeSkin .mceButtonDisabled .mceIcon {opacity:0.5 !important; filter:alpha(opacity=50) !important;}
#no_thanks_btn {cursor:pointer;display:none;position:absolute;width: 263px; height: 47px;background: url({$dir}images/no-thanks.png) no-repeat left top;z-index:999999;}
#poweredby {position:absolute;color: {$pwd_color} !important;text-decoration:none !important;z-index: 9999}
#poweredby a {cursor:pointer;color: {$pwd_color} !important;text-decoration:none !important;}
#poweredby a:hover {text-decoration:underline;}
LOAD_CSS;
        echo optinrev_cssminify($modal);
    }