_DIR . "/includes/core/frontend/layouts/sort/sort-posts.php"; if ( file_exists($filepath_sort) ) { require $filepath_sort; } } if ( $ymc_post_layout !== 'post-custom-layout') { $filepath_post_css = YMC_SMART_FILTER_DIR . '/includes/core/frontend/layouts/post-css/'. $ymc_post_layout .'-css.php'; if ( file_exists($filepath_post_css) ) { require $filepath_post_css; } } if ( in_array($ymc_post_layout, $arr_layouts_posts) ) { $breakpoints_classes = 'ymc-xs-col-'.esc_attr($ymc_mobile_xs).' ymc-sm-col-'.esc_attr($ymc_tablet_sm).' ymc-md-col-'.esc_attr($ymc_tablet_md).' ymc-lg-col-'.esc_attr($ymc_desktop_lg).' ymc-xl-col-'.esc_attr($ymc_desktop_xl).' ymc-xxl-col-'.esc_attr($ymc_desktop_xxl); } echo '
'; do_action("ymc_before_post_layout_".$id.'_'.$c_target); echo '
'; do_action("ymc_after_post_layout_".$id.'_'.$c_target); echo '
'; if ( $ymc_popup_status === 'on' ) { $filepath_popup = YMC_SMART_FILTER_DIR . "/includes/core/frontend/layouts/popup/popup-layout.php"; if ( file_exists($filepath_popup) ) { require $filepath_popup; } } echo ''; // Custom JS if( wp_script_is( 'filter-grids-' . wp_create_nonce('filter-grids'), 'enqueued' ) && ! empty(Plugin::$instance->variables->get_ymc_custom_after_js($id)) ) { wp_add_inline_script( 'filter-grids-' . wp_create_nonce('filter-grids')," (function($) { 'use strict' ". Plugin::$instance->variables->get_ymc_custom_after_js($id) ." }(jQuery)); ", 'after' ); } } else { echo "
" . esc_html__('ID parameter is missing or invalid.', 'ymc-smart-filter') ."
"; } $output .= ob_get_contents(); ob_end_clean(); $c_target++; return $output; } /** * @param $atts * Display Extra Filter Layout in external place page * * @return string */ public function ymc_extra_filter( $atts ) { $atts = shortcode_atts( [ 'id' => '', ], $atts ); $output = ''; $id = (int) $atts['id']; static $c_target = 1; $post_status = get_post_status($id); $ymc_post_type = get_post_type($id); $handle_filter = 'filter-inline-css-' . $c_target; $handle_post = 'post-inline-css-' . $c_target; require YMC_SMART_FILTER_DIR . '/includes/core/util/variables.php'; require YMC_SMART_FILTER_DIR . '/includes/core/util/helper.php'; if ( !empty($id) && $ymc_post_type === 'ymc_filters' && $post_status === 'publish' ) { ob_start(); // Replace Layout $ymc_filter_layout = $ymc_filter_extra_layout; echo '
'; if ( $ymc_filter_layout ) { $filepath_filter = YMC_SMART_FILTER_DIR . "/includes/core/frontend/layouts/filter/" . $ymc_filter_layout . ".php"; if ( file_exists($filepath_filter) ) { require $filepath_filter; } } echo "
"; $output .= ob_get_contents(); ob_end_clean(); } else { echo '
' . esc_html__('ID parameter is missing or invalid.', 'ymc-smart-filter') .'
'; } $c_target++; return $output; } /** * @param $atts * Display Extra Search in external place page * * @return string */ public function ymc_extra_search( $atts ) { $atts = shortcode_atts( [ 'id' => '', ], $atts ); $output = ''; $id = (int) $atts['id']; static $c_target = 1; $post_status = get_post_status($id); $ymc_post_type = get_post_type($id); require YMC_SMART_FILTER_DIR . '/includes/core/util/variables.php'; require YMC_SMART_FILTER_DIR . '/includes/core/util/helper.php'; if ( !empty($id) && $ymc_post_type === 'ymc_filters' && $post_status === 'publish' ) { ob_start(); echo '"; $output .= ob_get_contents(); ob_end_clean(); } else { echo '
' . esc_html__('ID parameter is missing or invalid.', 'ymc-smart-filter') .'
'; } $c_target++; return $output; } /** * @param $atts * Display Extra Sort in external place page * * @return string */ public function ymc_extra_sort( $atts ) { $atts = shortcode_atts( [ 'id' => '', ], $atts ); $output = ''; $id = (int) $atts['id']; static $c_target = 1; $post_status = get_post_status($id); $ymc_post_type = get_post_type($id); require YMC_SMART_FILTER_DIR . '/includes/core/util/variables.php'; require YMC_SMART_FILTER_DIR . '/includes/core/util/helper.php'; if ( !empty($id) && $ymc_post_type === 'ymc_filters' && $post_status === 'publish' ) { ob_start(); echo '
'; $filepath_sort = YMC_SMART_FILTER_DIR . "/includes/core/frontend/layouts/sort/sort-posts.php"; if ( file_exists($filepath_sort) ) { require $filepath_sort; } echo "
"; $output .= ob_get_contents(); ob_end_clean(); } else { echo '
' . esc_html__('ID parameter is missing or invalid.', 'ymc-smart-filter') .'
'; } $c_target++; return $output; } }