/** * Return post content with read more link (if needed) * * @param int|string $limit * @param string $more_text * * @return string */ function yit_content($what = 'content', $limit = 25, $more_text = '', $split = '[...]', $in_paragraph = 'true') { if ($what == 'content') { $content = get_the_content('[...]'); } else { if ($what == 'excerpt') { $content = get_the_excerpt(); } else { $content = $what; } } if ($limit == 0) { if ($what == 'content') { $content = preg_replace('/<img[^>]+./', '', $content); //remove images $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); } elseif ($what == 'excerpt') { $content = apply_filters('the_excerpt', $content); } else { $content = yit_addp($content); } return $content; } // remove the tag more from the content if (preg_match("/<(a)[^>]*class\\s*=\\s*(['\"])more-link\\2[^>]*>(.*?)<\\/\\1>/", $content, $matches)) { if (strpos($matches[0], '[button')) { $more_link = str_replace('href="#"', 'href="' . get_permalink() . '"', do_shortcode($matches[3])); } else { $more_link = $matches[0]; } $content = str_replace($more_link, '', $content); $split = ''; } if (empty($content)) { return; } $content = explode(' ', $content); if (!empty($more_text) && !isset($more_link)) { //array_pop( $content ); $more_link = strpos($more_text, '<a class="btn"') ? $more_text : '<a class="read-more' . apply_filters('yit_simple_read_more_classes', ' ') . '" href="' . get_permalink() . '">' . $more_text . '</a>'; $split = ''; } elseif (!isset($more_link)) { $more_link = ''; } // split if (count($content) >= $limit) { $split_content = ''; for ($i = 0; $i < $limit; $i++) { $split_content .= $content[$i] . ' '; } $content = $split_content . $split; } else { $content = implode(" ", $content); } // TAGS UNCLOSED $tags = array(); // get all tags opened preg_match_all("/(<([\\w]+)[^>]*>)/", $content, $tags_opened, PREG_SET_ORDER); foreach ($tags_opened as $tag) { $tags[] = $tag[2]; } // get all tags closed and remove it from the tags opened.. the rest will be closed at the end of the content preg_match_all("/(<\\/([\\w]+)[^>]*>)/", $content, $tags_closed, PREG_SET_ORDER); foreach ($tags_closed as $tag) { unset($tags[array_search($tag[2], $tags)]); } // close the tags if (!empty($tags)) { foreach ($tags as $tag) { $content .= "</{$tag}>"; } } //$content = preg_replace( '/\[.+\]/', '', $content ); if ($in_paragraph == true) { $content .= $more_link; } $content = preg_replace('/<img[^>]+./', '', $content); //remove images $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); // echo str_replace( array( '<', '>' ), array( '<', '>' ), $content ); if ($in_paragraph == false) { $content .= $more_link; } return $content; }
<?php $classes = array('two-fourth'); // additional classes if ($class != '') { $classes[] = $class; } // last $classes[] = isset($last) && strcmp($last, 'yes') == 0 ? 'last' : ''; ?> <div class="<?php echo implode($classes, ' '); ?> "><?php echo yit_addp($content); ?> </div>
/** * Features tab shortcode * * @return string * @since 1.0.0 */ public function print_tab($name_or_id, $echo = true) { global $yit_is_feature_tab; $yit_is_feature_tab = true; $this->current_featurestab = is_int($name_or_id) ? $name_or_id : yit_post_id_from_slug($name_or_id, 'featurestab'); $tab_id = yit_post_slug_from_id($this->current_featurestab); $fields = $this->get('fields'); if (!is_array($fields) or empty($fields)) { return null; } $features_label = ''; $features_content = ''; $i = 0; foreach ($fields as $id => $field) { $current = !$i ? 'current-feature' : ''; $the_label = '<li class="features-tab-' . $i . ' ' . $current . '">'; if (!empty($field['icon'])) { $the_label .= '<img src="' . $field['icon'] . '" title="' . $field['title'] . '" alt="' . $field['title'] . '" />'; } $the_label .= $field['title']; $the_label .= '</li>'; $the_content = '<div class="features-tab-content features-tab-' . $i . ' ' . $current . '">' . yit_addp($field['content']) . '</div>'; $features_label .= $the_label; $features_content .= $the_content; $i++; } $without_sidebar = yit_get_sidebar_layout() == 'sidebar-no' ? 'without-sidebar' : ''; $html = '<div class="row">'; $html .= '<div id="features-tab-' . $name_or_id . '" class="features-tab-container group span' . (yit_get_sidebar_layout() == 'sidebar-no' ? '12' : '9') . ' margin-bottom">'; $html .= '<div class="row">'; $html = apply_filters('yit_before_features_tab_menu', $html); $html .= '<ul class="features-tab-labels span3">' . $features_label . '</ul>'; $html .= '<div class="features-tab-wrapper span' . (yit_get_sidebar_layout() == 'sidebar-no' ? '9' : '6') . '">' . $features_content . '</div>'; $html = apply_filters('yit_after_features_tab_content', $html); $html .= '</div>'; $html .= '</div>'; $html .= '</div>'; if ($echo) { echo $html; } return $html; $yit_is_feature_tab = false; }
$icon_size = $icon_size == '' ? '14' : $icon_size; $icon = '<span class="icon-circle" style="width:' . $circle_size . 'px; height:' . $circle_size . 'px; border-color:' . $color . '"> <i class="fa fa-' . $icon_theme . '" style="color:' . $color . '; font-size: ' . $icon_size . 'px"></i></span>'; } else { $icon = '<img src="' . $icon_url . '" alt="" width="52" height="52" />'; } ?> <div class="random-numbers <?php echo esc_attr($animate . $vc_css); ?> " <?php echo $animate_data; ?> > <?php echo $icon; ?> <span class="number"><?php echo $number; ?> </span> <?php if (function_exists('yit_addp')) { echo yit_addp($text); } else { echo $text; } ?> </div>
<?php do_action('yit_before_center_copyright'); ?> <div class="centered"> <?php echo yit_convert_tags(yit_addp(stripslashes(yit_ssl_url(yit_get_option('footer-center-text'))))); ?> </div> <?php do_action('yit_after_center_copyright'); } else { ?> <?php do_action('yit_before_left_copyright'); ?> <div class="left span6"> <?php echo yit_convert_tags(yit_addp(stripslashes(yit_ssl_url(yit_get_option('footer-left-text'))))); ?> </div> <?php do_action('yit_after_left_copyright'); ?> <div class="right span6"> <?php echo yit_convert_tags(yit_addp(stripslashes(yit_ssl_url(yit_get_option('footer-right-text'))))); ?> </div> <?php do_action('yit_after_right_copyright'); }
_e('Author', 'yit'); ?> </span> <?php } ?> <span class="date"><?php echo date('F d, Y', strtotime($comment->comment_date)); ?> </span> </span> </div> <div class="content arrow"> <?php echo yit_addp($comment->comment_content); ?> <?php if (comments_open()) { ?> <span class="reply_link"> <i class="fa fa-reply"></i> <?php comment_reply_link($args, $comment->comment_ID, $comment->comment_post_ID); ?> </span> <?php } ?> </div> </li>
<div class="section services margin-top margin-bottom section-services-bandw"> <div class="services-row row group"> <div class="span3 service-wrapper"> <div class="service group"> <div class="image-wrapper"> <a href="<?php echo esc_url( $url ); ?>" class="bwWrapper"><?php echo $img ? "<img src=\"$img\" />" : yit_image( 'src=' . YIT_CORE_ASSETS_URL . '/images/no-featured-175.jpg&title=' . __( '(this post does not have a featured image)', 'yit' ) . '&alt=no featured image', false ) ?></a> </div> <?php if( $show_title == "1" || $show_title == 'yes' ): ?><h4><a href="<?php echo esc_url( $url ); ?>"><?php echo yit_decode_title($title); ?></a></h4><?php endif ?> <?php if( $show_content == "1" || $show_content == 'yes' ) echo yit_addp($content); ?> <?php if( $show_services_button == "1" || $show_services_button == 'yes' ): ?> <div class="read-more"><a href="<?php echo esc_url( $url ); ?>"><?php echo $services_button_text ?></a></div> <?php endif; ?> </div> </div> </div> </div>
<p><?php echo __( 'The page you requested was not found, and we have a fine guess why.<br /><br />- If you typed the URL directly, please make sure the spelling is correct.<br />- If you clicked on a link to get here, the link is outdated.', 'yit' ); ?></p> </div> <div class="error-404-text group right-text"> <h2><?php echo __( 'WHAT CAN I DO?', 'yit' ); ?></h2> <p><?php printf( __( 'There are many ways you can get back on track with %s<br />- Go to the <a href="%s">home page</a><br />- Use the search form below', 'yit' ), get_bloginfo( 'title' ), home_url() ) ?></p> <?php get_search_form() ?> </div> <?php else : if( yit_get_option( '404-image-position' ) == 'left' ) : ?> <div class="border-bold span<?php echo $span_image; ?> no-margin"> <div class="border"> <div class="border-img"> <img class="error-404-image group" src="<?php echo yit_get_option( '404-image' ); ?>" title="<?php _e( '404 Error', 'yit' ) ?>" alt="<?php _e( '404 Error', 'yit' ) ?>" /> </div> </div> </div> <div class="error-404-text group left-text span<?php echo $span_text; ?>"><?php echo yit_convert_tags( yit_addp( do_shortcode( stripslashes( yit_get_option( '404-text' ) ) ) ) ); get_search_form() ?></div> <?php else : ?> <div class="error-404-text group right-text span<?php echo $span_text; ?> no-margin"><?php echo yit_convert_tags( yit_addp( do_shortcode( stripslashes( yit_get_option( '404-text' ) ) ) ) ); get_search_form() ?></div> <div class="border-bold span<?php echo $span_image; ?>"> <div class="border"> <div class="border-img"> <img class="error-404-image group" src="<?php echo yit_get_option( '404-image' ); ?>" title="<?php _e( '404 Error', 'yit' ) ?>" alt="<?php _e( '404 Error', 'yit' ) ?>" /> </div> </div> </div> <?php endif; endif; ?>
?> </div> <div class="row"> <?php $workspan = $skills && $skills_label || $year || $customer ? 9 : 12; ?> <div class="work-description span<?php echo $workspan; ?> "> <h3><?php yit_work_the('title'); ?> </h3> <?php echo yit_addp(yit_work_get('content')); ?> </div> <?php if ($skills && $skills_label || $year || $customer) { ?> <div class="work-skillsdate span3"> <h4><?php _e('Project Details', 'yit'); ?> </h4> <?php if (!empty($skills) && !empty($skills_label)) { ?> <p class="categories paragraph-links"><span class="meta-label"><?php echo $skills_label;
* * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-3.0.txt */ $image_url = ""; $text = ""; $is_custom_content = yit_get_option('content-enable-404') == "no"; //--------------------------------------------------------------------- if ($is_custom_content) { $image_url = get_template_directory_uri() . "/images/404.png"; $text = __('I suggest you to use this search box below:', 'yit'); } else { $image_url = yit_get_option('content-404-image'); $text = yit_convert_tags(yit_addp(do_shortcode(stripslashes(yit_get_option('content-404-text'))))); } ?> <div class="error-404-image-container"> <?php if (isset($image_url) && $image_url != '') { ?> <img class="error-404-image group" src="<?php echo $image_url; ?> " title="<?php _e('Error 404', 'yit'); ?> " alt="404" /> <?php
?> " alt="<?php _e('404 Error', 'yit'); ?> " /> <div class="error-404-text group"><?php echo yit_convert_tags(yit_addp(do_shortcode(stripslashes(yit_get_option('404-text'))))); get_search_form(); ?> </div> <?php } else { ?> <div class="error-404-text group"><?php echo yit_convert_tags(yit_addp(do_shortcode(stripslashes(yit_get_option('404-text'))))); get_search_form(); ?> </div> <img class="error-404-image group" src="<?php echo yit_get_option('404-image'); ?> " title="<?php _e('404 Error', 'yit'); ?> " alt="<?php _e('404 Error', 'yit'); ?> " /> <?php }
<?php /* * Custom Tabs */ echo yit_addp($tab['custom_tab']["value"]);
<?php $icon = (isset($icon) && $icon != '') ? esc_url($icon) : ''; $text = (isset($text) && $text != '') ? $text : ''; $number = (isset($number) && $number != '') ? $number : ''; $last = (isset($last) && $last != '' && $last == 'yes') ? 'last' : ''; ?> <div class="one-fourth <?php echo $last; ?>"> <div class="random-numbers"> <img src="<?php echo $icon; ?>" alt="" width="52" height="52" /> <?php echo yit_addp($text); ?> <span class="number"><?php echo $number; ?></span> </div> </div>
$name = sanitize_title($name); $open = abs((int) $open); if (empty($name)) { return false; } $args = array('post_type' => $name, 'posts_per_page' => -1, 'order' => 'ASC'); $ft = new WP_Query($args); $features_label = ''; $features_content = ''; $i = 0; while ($ft->have_posts()) { $ft->the_post(); $current = $open == $i + 1 ? 'current-feature' : ''; $the_label = '<li class="features-tab-' . $i . ' ' . $current . '">'; if (has_post_thumbnail()) { $the_label .= get_the_post_thumbnail(get_the_ID(), 'features_tab_icon'); } $the_label .= get_the_title(); $the_label .= '</li>'; $the_content = '<div class="features-tab-content features-tab-' . $i . ' ' . $current . '">' . yit_addp(get_the_content()) . '</div>'; $features_label .= $the_label; $features_content .= $the_content; $i++; } $without_sidebar = yit_sidebar_layout() == 'sidebar-no' ? 'without-sidebar' : ''; $html = '<div id="features-tab-' . $name . '" class="features-tab-container ' . $without_sidebar . ' group">'; $html .= '<ul class="features-tab-labels">' . $features_label . '</ul>'; $html .= '<div class="features-tab-wrapper">' . $features_content . '</div>'; $html .= '</div>'; echo $html; $yit_is_feature_tab = false;
<?php if (isset($number) && $number != ''): if ( strlen($number) == 1 ) : $left = 'zero'; $right = substr($number, 0, 1); else : $left = substr($number, 0, 1); $left = ($left == 0) ? 'zero' : $left; $right = substr($number, 1, 1); $right = ($right == 0) ? 'zero' : $right; endif; else : $left = $right = 'zero'; endif; $last_class = (isset($last) && strcmp($last, 'yes') == 0) ? ' last' : ''; ?> <div class="box-sections numbers-sections margin-bottom <?php echo $last_class ?>"> <div class="number number-left number-<?php echo $left ?>"></div> <div class="number number-right number-<?php echo $right ?>"></div> <?php if( !empty( $title ) ) yit_string( '<h4>', yit_decode_title($title), '</h4>' ); ?> <?php echo yit_addp($content) ?> </div>