%PDF- %PDF-
Direktori : /var/www/html/shaban/laviva/wp-content/themes/levelup/templates/ |
Current File : /var/www/html/shaban/laviva/wp-content/themes/levelup/templates/slides-loop.php |
<?php global $levelup_options, $post; $prefix = '_rdy_project_'; $mode = get_post_meta( get_the_ID(), "{$prefix}mode", true ); $subtitle = get_post_meta( get_the_ID(), "{$prefix}subtitle", true ); $alt_link = get_post_meta( get_the_ID(), "{$prefix}link", true ); $link_target_blank = get_post_meta( get_the_ID(), "{$prefix}link_target_blank", true ); $bgcolor = get_post_meta( get_the_ID(), "{$prefix}color", true ); $bgcolor2 = get_post_meta( get_the_ID(), "{$prefix}color2", true ); $gradient_direction = get_post_meta( get_the_ID(), "{$prefix}gradient_direction", true ); $text_color = get_post_meta( get_the_ID(), "{$prefix}text_color", true ); $title_visible = get_post_meta( get_the_ID(), "{$prefix}title_visible", true ); $button = get_post_meta( get_the_ID(), "{$prefix}button", true ); $button_color = get_post_meta( get_the_ID(), "{$prefix}button_color", true ); $bgcolor_mark = get_post_meta( get_the_ID(), "{$prefix}bgcolor", true ); $bgcolor_logo_mark = get_post_meta( get_the_ID(), "{$prefix}bgcolor_logo", true ); $pg_color_mark = get_post_meta( get_the_ID(), "{$prefix}pg_color", true ); $pg_align = get_post_meta( get_the_ID(), "{$prefix}align", true ); $pg_valign = get_post_meta( get_the_ID(), "{$prefix}valign", true ); $revslider_id = get_post_meta( get_the_ID(), "{$prefix}revslider_id", true ); $slider_nav_position = get_post_meta( get_the_ID(), "{$prefix}slider_nav_position", true ); $hide_content = get_post_meta( get_the_ID(), "{$prefix}hide_content", true ); $page_slug = get_post_field( 'post_name', get_the_ID() ); $pg_color_mark_data = $text_color_style = $title_style_hilight = $var_button = ''; $bgcolor_mark_html = ''; $bgcolor_mark_data = ''; if ( $bgcolor_mark == 'light' || $bgcolor_mark == 'dark' ) { $bgcolor_mark_data = 'data-bgcolor-mark="' . esc_attr( $bgcolor_mark ) . '"'; } if ( $bgcolor_logo_mark == 'light' || $bgcolor_logo_mark == 'dark' ) { $bgcolor_mark_data .= ' data-bgcolor-logo-mark="' . esc_attr( $bgcolor_logo_mark ) . '"'; } if ( $pg_color_mark == 'light' || $pg_color_mark == 'dark' ) { $pg_color_mark_data = 'data-pgcolor-mark="' . esc_attr( $pg_color_mark ) . '"'; } $disable_title = ''; if ( $title_visible == 'disable' ) { $disable_title = true; } elseif ( ! $title_visible && $levelup_options['project-list__title_disable'] ) { $disable_title = true; } if ( $button != 'disable' ) { if ( ! $button ) { $var_button = $levelup_options['project-list__button']; } else { $var_button = $button; } } $el_count = 0; if ( ! $disable_title ) { $el_count = 1; $class_e1 = 'class="e_1"'; } if ( $subtitle ) { $el_count ++; $class_e2 = 'class="e_' . $el_count . '"'; } if ( ! empty( $post->post_excerpt ) ) { $el_count ++; $class_e3 = 'class="e_' . $el_count . '"'; } if ( $var_button ) { $el_count ++; $class_e4 = 'class="e_' . $el_count . ' e_button' . (!levelup_get_options('project-list__button_mobile') ? ' mobile_hide' : '') . '"'; } $project_link = $alt_link ? $alt_link : get_permalink() ; $title_class = ''; if ( $levelup_options['project-title-highlight'] ) { $title_class .= " highlight"; if ( $levelup_options['project-title-highlight_color'] ) { $shadow_size = 15; $title_style_hilight = sprintf( ' style="box-shadow: %1$s %2$spx 0 0 0,%1$s -%2$spx 0 0 0; -webkit-box-shadow: %1$s %2$spx 0 0 0, %1$s -%2$spx 0 0 0; background:%1$s;"', esc_attr( $levelup_options['project-title-highlight_color'] ), esc_attr( $shadow_size ) ); } } if ( $el_count = 1 ) { $title_class .= ' without-margin'; } if ( $text_color ) { $text_color_style = ' style="color: ' . esc_attr( $text_color ) . '"'; } if ( $levelup_options['project-title-font_size-responsive'] ) { $title_fontsize = levelup_get_typography_fontsize( 'project_title_font' ); $title_class .= ' ' . levelup_calculate_responsive_font_class( $title_fontsize ); } $classes_align = ''; if ( ! empty( $pg_align ) && $pg_align != 'default' ) { $classes_align .= ' align-' . esc_attr( $pg_align ); } else if ( $levelup_options['project-list__align'] ) { $classes_align .= ' align-' . esc_attr( $levelup_options['project-list__align'] ); } if ( ! empty( $pg_valign ) && $pg_valign != 'default' ) { $classes_align .= ' valign-' . esc_attr( $pg_valign ); } else if ( $levelup_options['project-list__valign'] ) { $classes_align .= ' valign-' . esc_attr( $levelup_options['project-list__valign'] ); } ?> <article id="post-<?php the_ID();?>" data-project-link="<?php if ( isset( $levelup_options['project-slide_link'] ) && $levelup_options['project-slide_link'] && $project_link ) { echo esc_url( $project_link ); } ?>" data-slug="<?php echo esc_attr( $page_slug ); ?>"<?php if( $hide_content == 'enable' ) echo ' data-caption-hide="1"'; ?> class="line project before going-up <?php if ( isset( $levelup_options['project-slide_link'] ) && $levelup_options['project-slide_link'] && $project_link ) { echo ' slide-click'; } if ( ! empty( $slider_nav_position ) ) { echo ' slider-nav-' . $slider_nav_position; } if ( $pos ) echo ' line-' . esc_attr( $pos ); echo esc_attr( $classes_align ); ?>" data-bgcolor="<?php if ( $bgcolor ) echo esc_attr( $bgcolor ); ?>" <?php if ( $pg_color_mark_data ) echo $pg_color_mark_data;?> <?php if ( $bgcolor_mark_data ) echo $bgcolor_mark_data;?> style="display: none;"> <div class="line-left"> <div class="container"> <div class="content"> <?php if ( ! $disable_title ):?><div <?php echo $class_e1;?>><?php the_title( sprintf( '<h2 class="entry-title%s"><a href="%s"' . ($link_target_blank ? ' target="_blank"' : '') . ' rel="bookmark"%s><span%s>', $title_class, esc_url( $project_link ), $text_color_style, $title_style_hilight ), '</span></a></h2>' ); ?></div><?php endif;?> <?php if ( $subtitle ):?><div <?php echo $class_e2;?>><span class="caption"<?php if ( $text_color_style ) { echo $text_color_style; } ?>><?php echo wp_kses( $subtitle, array('a' => array('href' => array(), 'title' => array()), 'br' => array(), 'h1' => array()) ); ?></span></div><?php endif;?> <?php if ( ! empty( $post->post_excerpt ) ):?><div <?php echo $class_e3;?>><span class="description"<?php if ( $text_color_style ) { echo $text_color_style; } ?>><?php the_excerpt();?></span></div><?php endif;?> <?php if ( $var_button ):?> <div <?php echo $class_e4;?>> <div class="project_button"> <?php if ( $levelup_options['project-list__button_text'] ) { $button_text = esc_html( $levelup_options['project-list__button_text'] ); } else { $button_text = esc_html__( 'Read more', 'LEVELUP' ); } $button_color_style = 'dark'; if ( isset($button_color) && $button_color != 'default' ) { $button_color_style = ( $button_color == 'light' ) ? 'light' : 'dark'; } else { if ( $levelup_options['project-list__button_style'] == 'light' ) { $button_color_style = 'light'; } elseif ( $levelup_options['project-list__button_style'] == 'dark' ) { $button_color_style = 'dark'; } elseif ( $levelup_options['project-list__button_style'] == 'from_title' ) { $button_color_style = 'from_title'; } } if ( $var_button == 'button' ) { $btn_style = 'flat'; $btn_radius = ''; $btn_text_color = $btn_text_color_hover = ''; if ( $levelup_options['project-list__button_type'] == 'flat' || $levelup_options['project-list__button_type'] == 'flat_rounded' ) { $btn_style = 'flat'; } elseif ( $levelup_options['project-list__button_type'] == 'outline' || $levelup_options['project-list__button_type'] == 'outline_rounded' ) { $btn_style = 'outline'; } if( $levelup_options['project-list__button_type'] == 'flat_rounded' || $levelup_options['project-list__button_type'] == 'outline_rounded' ) { $btn_radius = '4'; } if ( $button_color_style == 'light' ) { $btn_color = 'light'; $btn_text_color = '#000000'; $btn_background = '#ffffff'; $btn_background_hover = '#f7f7f7'; } else if( $button_color_style == 'from_title') { $btn_color = 'custom'; $btn_background = $levelup_options['project-list__text_hover_color']; $btn_background_hover = $levelup_options['project-list__text_hover_color']; if ( class_exists( 'Rdy_Color' ) ) { $rdyColor = new Rdy_Color( $levelup_options['project-list__text_hover_color'] ); if ( $rdyColor->isLight() ) { $btn_text_color_hover = '#000000'; } else { $btn_text_color_hover = '#ffffff'; } } else { $btn_text_color_hover = '#000000'; } } else { $btn_color = 'dark'; $btn_text_color = '#ffffff'; $btn_background = '#000000'; $btn_background_hover = '#252525'; } $button_html = do_shortcode( '[rdy_button text="' . esc_html( $button_text ) . '" size="large" style="' . $btn_style . '" align="left" background="' . $btn_background . '" background_hover="' . $btn_background_hover . '" text_color_hover="' . $btn_text_color . '" text_color="' . $btn_text_color . '" outline_skin="' . $btn_color . '" outline_active_color="' . $btn_background . '" outline_hover_color="' . $btn_text_color_hover . '" icon_align="disable" margin_top="0" margin_bottom="15" border_size="2" border_radius="' . $btn_radius . '" link="url:' . rawurlencode( esc_url( $project_link ) ) . '||"]' ); echo $button_html; } elseif ( $var_button == 'link' ) { $link_class = $button_color_style == 'light' ? 'link_light' : 'link_dark'; echo '<a class="link_detail ' . esc_attr( $link_class ) . '" href="' . esc_url( $project_link ) . '">' . esc_html( $button_text ) . '</a>'; } ?> </div> </div> <?php endif;?> </div> </div> </div> <?php if ( $levelup_options['project-list__down_button'] && ( (levelup_get_options( 'project-list__down_button_pos' ) == 'all' && $pos != $posts_count ) || (levelup_get_options( 'project-list__down_button_pos' ) == '' && $pos == 1 ) ) ) { echo '<a href="#" class="section-down-arrow"><i class="icon-down-arrow icon-default-style' . ( $levelup_options['project-list__down_button'] == 'dark' ? ' icon-dark-style' : '' ) . '"> </i></a>'; } if ( ! empty( $slider_nav_position ) ) { ?> <a class="slider_nav slider_nav_next" href="#"></a> <a class="slider_nav slider_nav_prev" href="#"></a> <?php } ?> </article>