Файловый менеджер - Редактировать - /home/digitalm/birramastro/wp-content/plugins/lt-ext/shortcodes/services/view.php
Назад
<?php if ( ! defined( 'ABSPATH' ) ) die( 'Forbidden' ); /** * Services Shortcode */ $args = get_query_var('like_sc_services'); $class = ''; if ( !empty($args['class']) ) $class .= ' '. esc_attr($args['class']); if ( !empty($args['id']) ) $id = ' id="'. esc_attr($args['id']). '"'; else $id = ''; $class .= ' layout-'.$args['layout'].' ltx-style-'.$args['style']; $query_args = array( 'post_type' => 'services', 'post_status' => 'publish', 'posts_per_page' => (int)($args['limit']), ); if ( !empty($args['ids']) ) $query_args['post__in'] = explode(',', esc_attr($args['ids'])); else if ( !empty($args['cat']) ) { $query_args['tax_query'] = array( array( 'taxonomy' => 'services-category', 'field' => 'if', 'terms' => array(esc_attr($args['cat'])), ) ); } $query = new WP_Query( $query_args ); if ( $query->have_posts() ) { echo '<div class="services-sc row '.esc_attr($class).'" '.$id.'>'; while ( $query->have_posts() ): $query->the_post(); $subheader = fw_get_db_post_option(get_The_ID(), 'header'); $price = fw_get_db_post_option(get_The_ID(), 'price'); $cut = fw_get_db_post_option(get_The_ID(), 'cut'); $link = fw_get_db_post_option(get_The_ID(), 'link'); $header = get_the_title(); if ( empty($link) ) { $link = get_the_permalink(); } ?> <article id="post-<?php the_ID(); ?>" class="col-lg-4 col-ms-12"> <div class="inner"> <?php if ( has_post_thumbnail() ) { echo '<a href="'.esc_url(get_the_permalink()).'" class="photo">'; the_post_thumbnail(); if ( !empty($price)) { echo '<span class="price">'.esc_html($price).'</span>'; } echo '</a>'; } ?> <div class="description"> <a href="<?php esc_url( the_permalink() ); ?>" class="header"> <?php if ( !empty($subheader) ) echo '<h5 class="subheader">'.esc_html($subheader).'</h5>'; ?> <h3 class="header"><?php the_title(); ?></h3> </a> <p> <?php echo wp_kses_post($cut); ?> </p> <?php if ( !empty($args['more_text']) ) { echo '<a href="'.esc_url( $link ).'" class="btn btn-xs color-hover-white">'.esc_html($args['more_text']).'</a>'; } ?> </div> </div> </article> <?php endwhile; echo '</div>'; wp_reset_postdata(); }
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Генерация страницы: 0.09 |
proxy
|
phpinfo
|
Настройка