文件操作 - proj-single.php
返回文件管理
返回主菜单
删除本文件
文件: /home/tecnoht/public_html/fratellibartesaghi--it/wp-content/themes/architek/proj-single.php
编辑文件内容
<?php $architek_thisPostID = get_the_ID(); $architek_color_code = get_option("architek_style_color"); if (get_post_meta($architek_thisPostID, "architek_enable_custom_pagetitle_options_value", true) == "no" || !get_post_meta($architek_thisPostID, "architek_enable_custom_pagetitle_options_value", true)){ $type = get_option("architek_header_type"); $thecolor = architek_hex2rgb(str_replace("__USE_THEME_MAIN_COLOR__", $architek_color_code, get_option("architek_header_color"))); $opacity = intval(str_replace("%","",get_option("architek_header_opacity")))/100; $color = "rgba(".$thecolor[0].",".$thecolor[1].",".$thecolor[2].",".$opacity.")"; $image = get_option("architek_header_image"); $background_position = get_option("architek_pagetitle_background_position"); $pattern = is_string(get_option("architek_header_pattern")) ? ARCHITEK_PATTERNS_URL.get_option("architek_header_pattern") : ""; $custompattern = get_option("architek_header_custom_pattern"); $margintop = get_option("architek_header_text_margin_top"); $banner = get_option("architek_banner_slider"); $showtitle = get_option("architek_hide_pagetitle") == "on" ? true : false; $showsectitle = get_option("architek_hide_sec_pagetitle") == "on" ? true : false; $tcolor = get_option("architek".'_header_text_color'); $tsize = intval(str_replace(" ", "", get_option("architek".'_header_text_size')),10)."px"; $tfont = get_option("architek".'_header_text_font'); $stcolor = get_option("architek".'_secondary_title_text_color'); $stsize = intval(str_replace(" ", "", get_option("architek".'_secondary_title_text_size')),10)."px"; $stfont = get_option("architek".'_secondary_title_font'); $stmargin = intval(str_replace(" ", "", get_option("architek".'_header_sec_text_margin_top')),10)."px"; $originalalign = get_option("architek_header_text_alignment"); $pt_parallax = get_option("architek_pagetitle_image_parallax") == "on" ? true : false; $pt_overlay = get_option("architek_pagetitle_image_overlay") == "on" ? true : false; $pt_overlay_type = get_option("architek_pagetitle_overlay_type"); $pt_overlay_the_color = architek_hex2rgb(str_replace("__USE_THEME_MAIN_COLOR__", $architek_color_code, get_option("architek_pagetitle_overlay_color"))); $pt_overlay_pattern = (is_string(get_option("architek_pagetitle_overlay_pattern"))) ? ARCHITEK_PATTERNS_URL.get_option("architek_pagetitle_overlay_pattern") : ""; $pt_overlay_opacity = intval(str_replace("%","",get_option("architek_pagetitle_overlay_opacity")))/100; $pt_overlay_color = "rgba(".$pt_overlay_the_color[0].",".$pt_overlay_the_color[1].",".$pt_overlay_the_color[2].",".$pt_overlay_opacity.")"; $breadcrumbs = get_option("architek_breadcrumbs"); $breadcrumbs_margintop = get_option('architek_breadcrumbs_text_margin_top'); $pagetitlepadding = get_option('architek_page_title_padding'); } else { $type = get_post_meta($architek_thisPostID, "architek_header_type_value", true); $thecolor = architek_hex2rgb(get_post_meta($architek_thisPostID, "architek_header_color_value", true)); $opacity = intval(str_replace("%","",get_post_meta($architek_thisPostID, "architek_header_color_opacity_value", true)))/100; $color = "rgba(".$thecolor[0].",".$thecolor[1].",".$thecolor[2].",".$opacity.")"; $image = get_post_meta($architek_thisPostID, "architek_header_image_value", true); $image = explode('|!|',$image); if (isset($image[1])) $image = explode('|*|',$image[1]); $image = $image[0]; $background_position = get_post_meta($architek_thisPostID, "architek_header_background_position_value", true); $pattern = ARCHITEK_PATTERNS_URL.get_post_meta($architek_thisPostID, "architek_header_pattern_value", true).".jpg"; $custompattern = get_option("architek_header_custom_pattern_value"); $margintop = get_post_meta($architek_thisPostID, "architek_header_text_margin_top_value", true); $banner = get_post_meta($architek_thisPostID, "architek_banner_slider_value", true); $showtitle = get_post_meta($architek_thisPostID, "architek_hide_pagetitle_value", true) == "yes" ? true : false; $showsectitle = get_post_meta($architek_thisPostID, "architek_hide_sec_pagetitle_value", true) == "yes" ? true : false; $tcolor = get_post_meta($architek_thisPostID, "architek_header_text_color_value", true); $tsize = intval(str_replace(" ", "", get_post_meta($architek_thisPostID, "architek_header_text_size_value", true)),10)."px"; $tfont = get_post_meta($architek_thisPostID, "architek_header_text_font_value", true); $stcolor = get_post_meta($architek_thisPostID, "architek_secondary_title_text_color_value", true); $stsize = intval(str_replace(" ", "", get_post_meta($architek_thisPostID, "architek_secondary_title_text_size_value", true)),10)."px"; $stfont = get_post_meta($architek_thisPostID, "architek_secondary_title_font_value", true); $stmargin = intval(str_replace(" ", "", get_post_meta($architek_thisPostID, "architek_header_secondary_text_margin_top_value", true)),10)."px"; $originalalign = get_post_meta($architek_thisPostID, "architek_header_text_alignment_value", true); $pt_parallax = get_post_meta($architek_thisPostID, "architek_pagetitle_image_parallax_value", true) == "on" ? true : false; $pt_overlay = get_post_meta($architek_thisPostID, "architek_pagetitle_image_overlay_value", true) == "on" ? true : false; $pt_overlay_type = get_post_meta($architek_thisPostID, "architek_pagetitle_overlay_type_value", true); $pt_overlay_the_color = architek_hex2rgb(get_post_meta($architek_thisPostID, "architek_pagetitle_overlay_color_value", true)); $pt_overlay_pattern = ARCHITEK_PATTERNS_URL.get_post_meta($architek_thisPostID, "architek_pagetitle_overlay_pattern_value", true).".jpg"; $pt_overlay_opacity = intval(str_replace("%","",get_post_meta($architek_thisPostID, "architek_pagetitle_overlay_opacity_value", true)))/100; $pt_overlay_color = "rgba(".$pt_overlay_the_color[0].",".$pt_overlay_the_color[1].",".$pt_overlay_the_color[2].",".$pt_overlay_opacity.")"; $breadcrumbs = get_post_meta($architek_thisPostID, "architek_enable_breadcrumbs_value", true) == "yes" ? "on" : "off"; $breadcrumbs_margintop = intval(str_replace(" ", "", get_post_meta($architek_thisPostID, "architek_breadcrumbs_margin_top_value", true)),10)."px"; $pagetitlepadding = intval(str_replace(" ", "", get_post_meta($architek_thisPostID, "architek_page_title_padding_value", true)),10)."px"; } $height = "auto"; $textalign = $originalalign; if ($originalalign == "titlesleftcrumbsright") $textalign = "left"; if ($originalalign == "titlesrightcrumbsleft") $textalign = "right"; if (is_array($tfont)) $tfont = ""; $architek_import_fonts[] = $tfont; $principalfont = explode("|",$tfont); $principalfont[0] = $principalfont[0]."', 'Arial', 'sans-serif"; if (!isset($principalfont[1])) $principalfont[1] = ""; if (is_array($stfont)) $stfont = ""; $architek_import_fonts[] = $stfont; $secondaryfont = explode("|",$stfont); $secondaryfont[0] = $secondaryfont[0]."', 'Arial', 'sans-serif"; if (!isset($secondaryfont[1])) $secondaryfont[1] = ""; architek_set_import_fonts($architek_import_fonts); if ($type != "without"){ $ptitleaux = $bcaux = ""; if ($originalalign == "titlesleftcrumbsright" || $originalalign == "titlesrightcrumbsleft"){ $ptitleaux .= "max-width: 50%;"; $bcaux .= "max-width: 50%;"; if ($originalalign == "titlesleftcrumbsright"){ $ptitleaux .= "float:left;"; $bcaux .= "float:right;"; } else { $ptitleaux .= "float:right;"; $bcaux .= "float:left;"; } } $bcaux .= "margin-top:".intval($breadcrumbs_margintop,10)."px;"; switch($originalalign){ case "left": case "titlesrightcrumbsleft": $bcaux .= "text-align: left;"; break; case "right": case "titlesleftcrumbsright": $bcaux .= "text-align:right;"; break; case "center": $bcaux .= "text-align:center;"; break; } ?> <div class="fullwidth-container <?php if ($type == "pattern") echo "bg-pattern"; ?> <?php if ($pt_parallax) echo "parallax"; ?><?php if (($type == "image" || $type == "pattern") && get_option('architek_enable_grayscale') == 'on') echo " architek_grayscale "; ?>" <?php if ($pt_parallax) echo 'data-stellar-ratio="0.5"'; ?> <?php $architek_output = ".fullwidth-container{"; if ($height != "") $architek_output.= "height: ". $height . ";"; if ($type == "none") $architek_output.= "background: none;"; if ($type == "color") $architek_output.= "background: " . $color . ";"; if ($type == "image") $architek_output.= "background: url(" . $image . ") no-repeat; background-size: 100% auto;"; if ($type == "pattern") $architek_output.= "background: url('" . $pattern . "') 0 0 repeat;"; $architek_output .= "}"; architek_set_custom_inline_css($architek_output); ?> <?php if ($type == "image" && !$pt_parallax) echo ' data-background-alignment="'. esc_attr( $background_position ) .'" '; ?>> <?php if ($type == "image" && $pt_overlay){ $architek_output = ".pagetitle_overlay{"; echo '<div class="pagetitle_overlay"></div> '; if ($pt_overlay_type == "color") $architek_output.= 'background-color:'.$pt_overlay_color.' !important'; else $architek_output.= 'background:url('.$pt_overlay_pattern.') repeat;opacity:'.$pt_overlay_opacity.' !important;'; $architek_output .= "}"; architek_set_custom_inline_css($architek_output); } if ($type === "banner"){ ?> <div class="revBanner"> <?php if (substr($banner, 0, 10) === "revSlider_"){ if (!function_exists('putRevSlider')){ echo esc_html__('Please install the missing plugin - Revolution Slider.', 'architek'); } else { putRevSlider(substr($banner, 10)); } } if (substr($banner, 0, 13) === "masterSlider_"){ if (!function_exists('masterslider')){ echo esc_html__('Please install the missing plugin - MasterSlider.', 'architek'); } else { echo do_shortcode( '[masterslider alias="'.substr($banner, 13).'"]' ); } } if (substr($banner, 0, 12) === "layerSlider_"){ if (!function_exists('layerslider')){ echo esc_html__('Please install the missing plugin - LayerSlider.', 'architek'); } else { echo do_shortcode( '[layerslider id="'.substr($banner, 12).'"]' ); } } ?> </div> <?php } else { ?> <div class="container present-container <?php echo esc_attr($originalalign); ?>"> <?php $architek_output = ".present-container{padding: ".esc_attr($pagetitlepadding)." 15px;}"; architek_set_custom_inline_css($architek_output); ?> <div class="pageTitle"> <?php $architek_output = ".present-container .pageTitle{text-align: ".esc_attr($textalign).";".esc_attr($ptitleaux)."}"; architek_set_custom_inline_css($architek_output); if ($showtitle){ ?> <h1 class="page_title"> <?php if (is_front_page() && is_home()) echo wp_kses(get_option('architek_blog_single_primary_title'), 'post'); else echo wp_kses(get_the_title($architek_thisPostID), 'post'); ?> </h1> <?php $architek_output = ".present-container h1.page_title{color: #$tcolor; font-size: $tsize; font-family: '{$principalfont[0]}';font-weight: {$principalfont[1]};"; if ($margintop != "") $architek_output .= esc_attr("margin-top: ".intval($margintop,10)."px;"); $architek_output .= "}"; architek_set_custom_inline_css($architek_output); } if ($showsectitle){ if (get_post_meta($architek_thisPostID, 'secondaryTitle_value', true) != "" || get_option('architek_blog_secondary_title') != ""){ ?> <h2 class="secondaryTitle"> <?php echo wp_kses(get_post_meta($architek_thisPostID, 'secondaryTitle_value', true), 'post'); ?> </h2> <?php $architek_output = ".present-container .secondaryTitle{color: #$stcolor; font-size: $stsize; line-height: $stsize; font-family: '{$secondaryfont[0]}';font-weight:{$secondaryfont[1]}; margin-top:{$stmargin};}"; architek_set_custom_inline_css($architek_output); } } ?> </div> <?php if ($breadcrumbs == "on"){ ?> <div class="architek_breadcrumbs"> <?php architek_the_breadcrumb(); $architek_output = ".architek_breadcrumbs{".esc_attr($bcaux)."}"; architek_set_custom_inline_css($architek_output); ?> </div> <?php } ?> </div> <?php } ?> </div> <?php } ?> <div class="master_container master_container_bgwhite"> <?php $singleLayout = get_post_meta($architek_thisPostID, 'singleLayout_value', true); if ($singleLayout == "default"){ $singleLayout = get_option("architek_single_layout"); } if (get_post_meta($architek_thisPostID, "portfolioType_value", true) != "other") { $pj_cols = " col-md-6"; $ct_cols = " col-md-6"; if ($singleLayout != "left_media"){ $pj_cols = " col-md-12"; $ct_cols = " col-md-12"; } ?> <article id="post-<?php esc_attr(the_ID()); ?>" <?php post_class(); ?> role="article"> <div class="proj-content"> <div class="projects_description"> <div class="projects_media <?php echo esc_attr($singleLayout . $pj_cols); ?>"> <?php $output = ""; if ($singleLayout == 'fullwidth_media'){ $output .= "[vc_row full_width='stretch_row_content_no_spaces' video_opts='' multi_color_overlay=''][vc_column width='1/1'][vc_column_text]"; } if (get_post_meta($architek_thisPostID, "portfolioType_value", true) == "image"){ $output .= "<div id='p-slider-".esc_attr(get_the_ID())."' class='flexslider clearfix flex-not-ready'><ul class='slides da-thumbs-plus'>"; $sliderData = get_post_meta($architek_thisPostID, "sliderImages_value", true); $slide = explode("|*|",$sliderData); foreach ($slide as $s){ if ($s != ""){ $url = explode("|!|",$s); $output .= "<li><img src='".esc_url($url[1])."' alt='rp_style1_img' width='100%' class='rp_style1_img'></li>"; } } $output .= "</ul></div>"; } if (get_post_meta($architek_thisPostID, "portfolioType_value", true) == "video") { $videosType = get_post_meta($architek_thisPostID, "videoSource_value", true); if ($videosType != "embed"){ $videos = get_post_meta($architek_thisPostID, "videoCode_value", true); $videos = preg_replace( '/\s+/', '', $videos ); $vid = explode(",",$videos); } switch (get_post_meta($architek_thisPostID, "videoSource_value", true)){ case "media": $output .= "<video id='html5video' preload='metadata' controls='controls'>"; $media = get_post_meta($architek_thisPostID, 'videoMediaLibrary_value', true); $media = explode("|*|",$media); foreach ($media as $m){ if (strlen($m) > 0){ $videoattrs = explode("|!|",$m); $ext = explode('.',$videoattrs[1]); $ext = $ext[count($ext)-1]; $output .= "<source src=".esc_url($videoattrs[1])." type='video/".esc_attr($ext)."'>"; } } $output .= "</video>"; $architek_output = "#html5video{ position:relative;float:left;width:100%; }"; architek_set_custom_inline_css($architek_output); break; case "youtube": $output .= "<div id='the_movies' class='vendor'></div>"; foreach ($vid as $v){ $output .= "<div class='v_links'>https://www.youtube.com/embed/".esc_attr($v)."?autoplay=1&wmode=transparent&autohide=1&showinfo=0&rel=0</div>"; } break; case "vimeo": $output .= "<div id='the_movies' class='vendor'></div>"; foreach ($vid as $v){ $output .= "<div class='v_links'>https://player.vimeo.com/video/".esc_attr($v)."?autoplay=1&title=0&byline=0&portrait=0</div>"; } break; case "embed": $output .= "<div class='embedded'>".get_post_meta($architek_thisPostID, "videoCode_value", true)."</div>"; break; } } if ($singleLayout == "fullwidth_media"){ $output .= "[/vc_column_text][/vc_column][/vc_row]"; echo do_shortcode($output); } else { echo do_shortcode( $output, false ); } ?> </div> <div class="content_container <?php echo esc_attr($ct_cols); ?>"> <?php $content = get_the_content(get_the_ID()); $upper_theme_main_color = "#".get_option('architek_style_color'); $content = str_replace( '__USE_THEME_MAIN_COLOR__', $upper_theme_main_color, $content ); $content = apply_filters('the_content', $content); architek_content_shortcoder($content); $content = wp_kses_no_null( $content, array( 'slash_zero' => 'keep' ) ); $content = wp_kses_normalize_entities($content); echo wp_kses_hook($content, 'post', array()); // WP changed the order of these funcs and added args to wp_kses_hook $shortcodes_custom_css = get_post_meta( get_the_ID(), '_wpb_shortcodes_custom_css', true ); if ( isset($shortcodes_custom_css) && ! empty( $shortcodes_custom_css ) ) { architek_set_custom_inline_css($shortcodes_custom_css); } ?> </div> </div> </div> <?php if (get_option("architek_project_single_social_shares") == "on" && get_option('architek_project_single_socials') != ""){ $proj_single_socials = explode(",",get_option('architek_project_single_socials')); ?> <div class="share-buttons"> <h5><?php if (function_exists('icl_t')){ echo sprintf(esc_html__("%s","architek"), icl_t( 'architek', 'SHARE THIS PROJECT', get_option('architek_share_proj_text'))); } else { echo sprintf(esc_html__("%s","architek"), get_option("architek_share_proj_text")); } ?></h5> <!-- NEW STUFF --> <div class="posts-shares"> <div class="social-shares clearfix"> <ul> <?php if (in_array("facebook", $proj_single_socials)){ ?> <li> <a href="<?php echo esc_url("https://www.facebook.com/sharer.php?u=".get_the_permalink()."&t=".get_the_title()); ?>" class="share-facebook" target="_blank" title="facebook"><i class="fa fa-facebook"></i><?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (in_array("twitter", $proj_single_socials)){ ?> <li> <a href="<?php echo esc_url("https://twitter.com/intent/tweet?text=".get_the_title()."&url=".get_the_permalink()); ?>" class="share-twitter" target="_blank" title="twitter"><i class="fa fa-twitter"></i><?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (in_array("linkedin", $proj_single_socials)){ ?> <li> <a href="<?php echo esc_url("https://linkedin.com/shareArticle?mini=true&url=".get_the_permalink()."&title=".get_the_title()); ?>" target="_blank" class="share-linkedin" title="linkedin"><i class="fa fa-linkedin"></i><?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (in_array("pinterest", $proj_single_socials)){ ?> <li> <a href="<?php $url = wp_get_attachment_url( get_post_thumbnail_id(get_the_ID()) ); echo esc_url("https://www.pinterest.com/pin/create/button/?url=".get_the_permalink()."&media=".$url."&") ?>" target="_blank" class="share-pinterest" title="pinterest"><i class="fa fa-pinterest"></i><?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (in_array("tumblr", $proj_single_socials)){ ?> <li> <a href="<?php echo esc_url("https://www.tumblr.com/share/?url=".get_the_permalink()."&title=".get_the_title()); ?>" target="_blank" title="tumblr"><i class="fa fa-tumblr"></i><?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (in_array("email", $proj_single_socials)){ ?> <li> <a href="<?php echo esc_url("mailto:?subject=".get_the_title()."&body=".get_the_permalink()); ?>" class="share-mail" title="email"><i class="fa fa-envelope-o"></i> <?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (!isset($architek_inline_script)) $architek_inline_script = ''; $architek_inline_script .= ' jQuery(document).ready(function(){ "use strict"; // Open social-shares links in Popup jQuery(".social-shares a[target=\'_blank\']").on("click", function(){ newwindow=window.open(jQuery(this).attr("href"),"","height=450,width=700"); if (window.focus) {newwindow.focus()} return false; }); }); '; ?> </ul> </div> </div> </div> <?php } ?> <nav id="nav-below" role="article" class="navigation"> <?php ob_start(); $prevPost = get_previous_post(); $prevthumbnail = $prevPost != "" ? get_the_post_thumbnail($prevPost->ID, 'full') : false; $prevtitle = $prevPost != "" ? "<div class='nav-title'>".esc_html($prevPost->post_title)."</div>" : ""; $nextPost = get_next_post(); $nextthumbnail = $nextPost != "" ? get_the_post_thumbnail($nextPost->ID, 'full') : false; $nexttitle = $nextPost != "" ? "<div class='nav-title'>".esc_html($nextPost->post_title)."</div>" : ""; if ($prevPost == "" || $nextPost == "") echo "<div class='full-width-nav'>"; if (function_exists('icl_t')){ if ($prevPost != "") previous_post_link( '<div class="nav-previous"><div class="nav-previous-thumb">'.$prevthumbnail.'</div><div class="navcontentens-side">%link'.$prevtitle.'</div></div>', sprintf(esc_html__("%s",'architek'), icl_t( 'architek', 'Previous post', get_option('architek_prev_single_proj')))); if ($nextPost != "") next_post_link( '<div class="nav-next"><div class="nav-next-thumb">'.$nextthumbnail.'</div><div class="navcontentens-side">'.'%link'.$nexttitle.'</div></div>', sprintf(esc_html__("%s",'architek'), icl_t( 'architek', 'Next post', get_option('architek_next_single_proj')) )); } else { if ($prevPost != "") previous_post_link( '<div class="nav-previous"><div class="nav-previous-thumb">'.$prevthumbnail.'</div><div class="navcontentens-side">%link'.$prevtitle.'</div></div>', sprintf(esc_html__("%s",'architek'), get_option('architek_prev_single_proj'))); if ($nextPost != "") next_post_link( '<div class="nav-next"><div class="nav-next-thumb">'.$nextthumbnail.'</div><div class="navcontentens-side">'.'%link'.$nexttitle.'</div></div>', sprintf(esc_html__("%s",'architek'), get_option('architek_next_single_proj') )); if ($prevPost == "" || $nextPost == "") echo "</div>"; } if (get_option('architek_header_style_type') == 'style8') $nav_output = '[vc_row][vc_column]'.ob_get_clean().'[/vc_column][/vc_row]'; else $nav_output = '[vc_row full_width="stretch_row_content_no_spaces"][vc_column]'.ob_get_clean().'[/vc_column][/vc_row]'; echo do_shortcode($nav_output); ?> </nav> <div class="the_comments"> <?php if (comments_open()) { remove_action('comment_form','wp_comment_form_unfiltered_html_nonce'); comments_template( '', true ); } ?> </div> </article> <?php if (!isset($architek_inline_script)) $architek_inline_script = ''; $architek_inline_script .= ' jQuery(document).ready(function(){ "use strict"; '; //image if (get_post_meta($architek_thisPostID, "portfolioType_value", true) == "image"){ if (get_post_meta($architek_thisPostID, "custom_slider_opts_value", true) == "on"){ $animation = get_post_meta($architek_thisPostID, "projs_flex_transition_value", true); $directionNav = get_post_meta($architek_thisPostID, "projs_flex_navigation_value", true); $slideshowSpeed = get_post_meta($architek_thisPostID, "projs_flex_slide_duration_value", true) != "" ? get_post_meta($architek_thisPostID, "projs_flex_slide_duration_value", true) : 3000; $pauseOnHover = get_post_meta($architek_thisPostID, "projs_flex_pause_hover_value", true); $controlNav = get_post_meta($architek_thisPostID, "projs_flex_controls_value", true); $slideshow = get_post_meta($architek_thisPostID, "projs_flex_autoplay_value", true); $height = get_post_meta($architek_thisPostID, "projs_flex_height_value", true); $animationDuration = get_post_meta($architek_thisPostID, "projs_flex_transition_duration_value", true) != "" ? get_post_meta($architek_thisPostID, "projs_flex_transition_duration_value", true) : 1000; } else { $animation = get_option("architek_projs_flex_transition"); $directionNav = get_option("architek_projs_flex_navigation"); $slideshowSpeed = get_option("architek_projs_flex_slide_duration") ? get_option("architek_projs_flex_slide_duration") : 3000; $pauseOnHover = get_option("architek_projs_flex_pause_hover"); $controlNav = get_option("architek_projs_flex_controls"); $slideshow = get_option("architek_projs_flex_autoplay"); $height = get_option("architek_projs_flex_height"); $animationDuration = get_option("architek_projs_flex_transition_duration") ? get_option("architek_projs_flex_transition_duration") : 1000; } if ($directionNav == "on" || $directionNav == "true") $directionNav = true; else $directionNav = false; if ($pauseOnHover == "on" || $pauseOnHover == "true") $pauseOnHover = true; else $pauseOnHover = false; if ($controlNav == "on" || $controlNav == "true") $controlNav = true; else $controlNav = false; if ($slideshow == "on" || $slideshow == "true") $slideshow = true; else $slideshow = false; $architek_inline_script .= ' if (jQuery("#p-slider-'.esc_js($architek_thisPostID).'").find("li").length > 1){ jQuery("#p-slider-'.esc_js($architek_thisPostID).'").css("opacity",0).flexslider({ animation: "'.esc_js($animation).'", slideDirection: "horizontal", directionNav: "'.esc_js($directionNav).'", slideshowSpeed: '.esc_js($slideshowSpeed).', controlsContainer: "#p-slider-'.esc_js($architek_thisPostID).' .flex-viewport", pauseOnAction: false, pauseOnHover: "'.esc_js($pauseOnHover).'", keyboardNav: false, controlNav: "'.esc_js($controlNav).'", slideshow: "'.esc_js($slideshow).'", animationSpeed: '.esc_js($animationDuration).', start: function(slider){ jQuery(slider).removeClass("flex-not-ready").find(".flex-direction-nav").css({"position":"absolute","width":"100%","top":"50%"}); jQuery(window).resize(); jQuery("#p-slider-'.esc_js($architek_thisPostID).'").css("opacity",1); if (typeof window.lastcube != "undefined" && typeof window.lastcube.resizeSinglePageInline == "function"){ window.lastcube.resizeSinglePageInline(); } }, after:function(slider){ if (typeof window.lastcube != "undefined" && typeof window.lastcube.resizeSinglePageInline == "function"){ window.lastcube.resizeSinglePageInline(); } } }); jQuery("#p-slider-'.esc_js($architek_thisPostID).' ul.slides").css({"max-height":"'.esc_js($height).'"}); } else { jQuery("#p-slider-'.esc_js($architek_thisPostID).'").find("ul li").css("display","block"); jQuery("#p-slider-'.esc_js($architek_thisPostID).'").find("li a img").css("opacity",1); jQuery("#p-slider-'.esc_js($architek_thisPostID).'").find(".magnifier").on("click", function(){ jQuery("#p-slider-'.esc_js($architek_thisPostID).'").find("li a").trigger("click"); }); } '; } //video if (get_post_meta($architek_thisPostID, "portfolioType_value", true) == "video") { if (get_post_meta($architek_thisPostID, "videoSource_value", true) != "embed" && get_post_meta($architek_thisPostID, "videoSource_value", true) != "media"){ $architek_inline_script .= ' var aux_html = "<iframe src=\'"+jQuery(".v_links").eq(0).html()+"\' width=\'560\' height=\'349\' frameborder=\'0\' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>"; jQuery("#the_movies").html(aux_html).fitVids(); '; } $architek_inline_script .= ' if (jQuery("#the_movies").css({"position":"relative","float":"left","width":"100%"}).siblings(".v_links").length > 1){ jQuery(".projects_media #the_movies").siblings(".movies-nav").remove(); jQuery(".projects_media #the_movies").append("<ul class=\'flex-direction-nav movies-nav\'><li><a class=\'prev\' href=\'javascript:;\'>Previous</a></li><li><a class=\'next\' href=\'javascript:;\'>Next</a></li></ul>"); jQuery(".projects_media #the_movies .flex-direction-nav").css({ "position": "absolute", "width":"100%", "top":"50%", }).find("li").css({"margin":0,"padding":0}).find("a").css({"display":"inline-block","position":"relative","opacity":1}); jQuery(".projects_media #the_movies .flex-direction-nav li").eq(0).css("float","left"); jQuery(".projects_media #the_movies .flex-direction-nav li").eq(1).css("float","right"); jQuery(".projects_media #the_movies").siblings(".current_movie").remove(); jQuery(".projects_media #the_movies").after("<div hidden class=\'current_movie upper_hidden\'>0</div>"); jQuery(".movies-nav").find(".prev").on("click",function(e){ e.preventDefault(); var index = parseInt(jQuery(".current_movie").html()); var nextIndex = 0; if (index == 0) nextIndex = jQuery(".projects_media #the_movies").siblings(".v_links").length - 1; else nextIndex = index-1; jQuery("#the_movies iframe").attr("src", jQuery(".projects_media #the_movies").siblings(".v_links").eq(nextIndex).html() ); jQuery(".projects_media #the_movies").siblings(".current_movie").html(nextIndex); }); jQuery(".movies-nav").find(".next").on("click",function(e){ e.preventDefault(); var index = parseInt(jQuery(".current_movie").html()); var nextIndex = 0; if (index == jQuery(".projects_media #the_movies").siblings(".v_links").length - 1) nextIndex = 0; else nextIndex = index+1; jQuery("#the_movies iframe").attr("src", jQuery(".projects_media #the_movies").siblings(".v_links").eq(nextIndex).html() ); jQuery(".projects_media #the_movies").siblings(".current_movie").html(nextIndex); }); } '; } $architek_inline_script .= ' if (!jQuery(".nav-previous-nav1").length){ jQuery(".nav-previous-nav1").html("<a href=\'javascript:;\' rel=\'prev\'>l</a>"); } if (!jQuery(".nav-next-nav1").length){ jQuery(".nav-next-nav1").html("<a href=\'javascript:;\' rel=\'next\'>r</a>"); } if (typeof window.lastcube != "undefined" && typeof window.lastcube.resizeSinglePageInline == "function"){ window.lastcube.resizeSinglePageInline(); } }); '; wp_add_inline_script('architek-global', $architek_inline_script, 'after'); $architek_output = ".nav-previous-nav1 a, .nav-next-nav1 a{ color: rgb(102, 102, 102); opacity: 0.3; filter: alpha(opacity=30); }"; architek_set_custom_inline_css($architek_output); } else { ?> <article id="post-<?php esc_attr(the_ID()); ?>" <?php post_class('proj-content'); ?> role="article"> <div class="content_container col-md-12"> <?php $content = get_the_content(get_the_ID()); $upper_theme_main_color = "#".get_option('architek_style_color'); $content = str_replace( '__USE_THEME_MAIN_COLOR__', $upper_theme_main_color, $content ); $content = apply_filters('the_content', $content); architek_content_shortcoder($content); $content = wp_kses_no_null( $content, array( 'slash_zero' => 'keep' ) ); $content = wp_kses_normalize_entities($content); echo wp_kses_hook($content, 'post', array()); // WP changed the order of these funcs and added args to wp_kses_hook $shortcodes_custom_css = get_post_meta( get_the_ID(), '_wpb_shortcodes_custom_css', true ); if ( isset($shortcodes_custom_css) && ! empty( $shortcodes_custom_css ) ) { architek_set_custom_inline_css($shortcodes_custom_css); } ?> </div> <?php if (get_option("architek_project_single_social_shares") == "on" && get_option('architek_project_single_socials') != ""){ $proj_single_socials = explode(",",get_option('architek_project_single_socials')); ?> <div class="share-buttons"> <h5><?php if (function_exists('icl_t')){ echo sprintf(esc_html__("%s","architek"), icl_t( 'architek', 'SHARE THIS PROJECT', get_option('architek_share_proj_text'))); } else { echo sprintf(esc_html__("%s","architek"), get_option("architek_share_proj_text")); } ?></h5> <!-- NEW STUFF --> <div class="posts-shares"> <div class="social-shares clearfix"> <ul> <?php if (in_array("facebook", $proj_single_socials)){ ?> <li> <a href="<?php echo esc_url("https://www.facebook.com/sharer.php?u=".get_the_permalink()."&t=".get_the_title()); ?>" class="share-facebook" target="_blank" title="facebook"><i class="fa fa-facebook"></i><?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (in_array("twitter", $proj_single_socials)){ ?> <li> <a href="<?php echo esc_url("https://twitter.com/home?status=".get_the_title()."_".get_the_permalink()); ?>" class="share-twitter" target="_blank" title="twitter"><i class="fa fa-twitter"></i><?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (in_array("linkedin", $proj_single_socials)){ ?> <li> <a href="<?php echo esc_url("https://linkedin.com/shareArticle?mini=true&url=".get_the_permalink()."&title=".get_the_title()); ?>" target="_blank" class="share-linkedin" title="linkedin"><i class="fa fa-linkedin"></i><?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (in_array("googleplus", $proj_single_socials)){ ?> <li> <a href="<?php echo esc_url("https://google.com/bookmarks/mark?op=edit&bkmk=".get_the_permalink()."&title=".get_the_title()); ?>" target="_blank" class="share-google" title="googleplus"><i class="fa fa-google-plus"></i><?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (in_array("pinterest", $proj_single_socials)){ ?> <li> <a href="<?php $url = wp_get_attachment_url( get_post_thumbnail_id(get_the_ID()) ); echo esc_url("https://www.pinterest.com/pin/create/button/?url=".get_the_permalink()."&media=".$url."&") ?>" target="_blank" class="share-pinterest" title="pinterest"><i class="fa fa-pinterest"></i><?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (in_array("tumblr", $proj_single_socials)){ ?> <li> <a href="<?php echo esc_url("https://www.tumblr.com/share/?url=".get_the_permalink()."&title=".get_the_title()); ?>" target="_blank" title="tumblr"><i class="fa fa-tumblr"></i><?php esc_html_e( '', 'architek' )?></a> </li> <?php } if (in_array("email", $proj_single_socials)){ ?> <li> <a href="<?php echo esc_url("mailto:?subject=".get_the_title()."&body=".get_the_permalink()); ?>" class="share-mail" title="email"><i class="fa fa-envelope-o"></i> <?php esc_html_e( '', 'architek' )?></a> </li> <?php } ?> </ul> </div> </div> </div> <?php } ?> <nav id="nav-below" role="article" class="navigation"> <?php ob_start(); $prevPost = get_previous_post(); $prevthumbnail = $prevPost != "" ? get_the_post_thumbnail($prevPost->ID, 'full') : false; $prevtitle = $prevPost != "" ? "<div class='nav-title'>".esc_html($prevPost->post_title)."</div>" : ""; $nextPost = get_next_post(); $nextthumbnail = $nextPost != "" ? get_the_post_thumbnail($nextPost->ID, 'full') : false; $nexttitle = $nextPost != "" ? "<div class='nav-title'>".esc_html($nextPost->post_title)."</div>" : ""; if ($prevPost == "" || $nextPost == "") echo "<div class='full-width-nav'>"; if (function_exists('icl_t')){ if ($prevPost != "") previous_post_link( '<div class="nav-previous"><div class="nav-previous-thumb">'.$prevthumbnail.'</div><div class="navcontentens-side">%link'.$prevtitle.'</div></div>', sprintf(esc_html__("%s",'architek'), icl_t( 'architek', 'Previous post', get_option('architek_prev_single_proj')))); if ($nextPost != "") next_post_link( '<div class="nav-next"><div class="nav-next-thumb">'.$nextthumbnail.'</div><div class="navcontentens-side">'.'%link'.$nexttitle.'</div></div>', sprintf(esc_html__("%s",'architek'), icl_t( 'architek', 'Next post', get_option('architek_next_single_proj')) )); } else { if ($prevPost != "") previous_post_link( '<div class="nav-previous"><div class="nav-previous-thumb">'.$prevthumbnail.'</div><div class="navcontentens-side">%link'.$prevtitle.'</div></div>', sprintf(esc_html__("%s",'architek'), get_option('architek_prev_single_proj'))); if ($nextPost != "") next_post_link( '<div class="nav-next"><div class="nav-next-thumb">'.$nextthumbnail.'</div><div class="navcontentens-side">'.'%link'.$nexttitle.'</div></div>', sprintf(esc_html__("%s",'architek'), get_option('architek_next_single_proj') )); if ($prevPost == "" || $nextPost == "") echo "</div>"; } if (get_option('architek_header_style_type') == 'style8') $nav_output = '[vc_row][vc_column]'.ob_get_clean().'[/vc_column][/vc_row]'; else $nav_output = '[vc_row full_width="stretch_row_content_no_spaces"][vc_column]'.ob_get_clean().'[/vc_column][/vc_row]'; //$nav_output = '[vc_row full_width="stretch_row_content_no_spaces"][vc_column]'.ob_get_clean().'[/vc_column][/vc_row]'; echo do_shortcode($nav_output); ?> </nav> <div class="the_comments"> <?php if (comments_open()) { remove_action('comment_form','wp_comment_form_unfiltered_html_nonce'); comments_template( '', true ); } ?> </div> </article> <?php if (!isset($architek_inline_script)) $architek_inline_script = ''; $architek_inline_script .= ' jQuery(document).ready(function(){ "use strict"; if (typeof window.lastcube != "undefined" && typeof window.lastcube.resizeSinglePageInline == "function"){ setTimeout(function(){ window.lastcube.resizeSinglePageInline(); },1000); } }); '; wp_add_inline_script('architek-global', $architek_inline_script, 'after'); } ?> </div> <!-- endof master_container -->
修改文件时间
将文件时间修改为当前时间的前一年
删除文件