true, 'category__in' => $cat_id, 'post_type' => 'post', 'posts_per_page' => absint( $options['number_of_features'] ), 'orderby' => 'ASC', ); break; default: break; } if ( 'demo' != $feature_content_type && 'custom' != $feature_content_type ) { // Fetch posts. $posts = get_posts( $args ); if ( ! empty( $posts ) ) { $i = 1; foreach ( $posts as $key => $post ) { $post_id = $post->ID; $content[ $i ]['title'] = get_the_title( $post_id ); $content[ $i ]['url'] = get_permalink( $post_id ); $img_array = null; if ( has_post_thumbnail( $post_id ) ) { $img_array = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); } else { $img_array[0] = get_template_directory_uri() . '/assets/uploads/no-featured-image-1300x600.jpg'; } if ( isset( $img_array ) ) { $content[$i]['img_array'] = $img_array; } if ( 'fa-icon' == $options['feature_icon_type'] ) { if ( isset( $options['feature_fa_icon_'.$i] ) ) { $content[ $i ]['fa_icon'] = $options['feature_fa_icon_'.$i]; } } if ( 'img-icon' == $options['feature_icon_type'] ) { if ( isset( $options['feature_image_icon_'.$i] ) ) { $content[ $i ]['img_icon'] = $options['feature_image_icon_'.$i]; } } $i++; } } } if ( ! empty( $content ) ) { $input = $content; } return $input; } endif; // Features section content details. add_filter( 'business_center_pro_filter_feature_section_details', 'business_center_pro_get_feature_section_details' ); if ( ! function_exists( 'business_center_pro_render_feature_section' ) ) : /** * Start feature section * * @return string Features content * @since Business Center Pro 2.0.0 * */ function business_center_pro_render_feature_section( $content_details = array() ) { $options = business_center_pro_get_theme_options(); if ( empty( $content_details ) ) { return; } ?>