lightspeeddevelopment /
lsx-health-plan
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Template used to display post content on single pages. |
||
| 4 | * |
||
| 5 | * @package lsx-health-plan |
||
| 6 | */ |
||
| 7 | ?> |
||
| 8 | |||
| 9 | <?php |
||
| 10 | $prep_time = get_post_meta( get_the_ID(), 'recipe_prep_time', true ); |
||
| 11 | $cooking_time = get_post_meta( get_the_ID(), 'recipe_cooking_time', true ); |
||
| 12 | $serves = get_post_meta( get_the_ID(), 'recipe_serves', true ); |
||
| 13 | $portion = get_post_meta( get_the_ID(), 'recipe_portion', true ); |
||
| 14 | $energy = get_post_meta( get_the_ID(), 'recipe_energy', true ); |
||
| 15 | $protein = get_post_meta( get_the_ID(), 'recipe_protein', true ); |
||
| 16 | $carbohydrates = get_post_meta( get_the_ID(), 'recipe_carbohydrates', true ); |
||
| 17 | $fibre = get_post_meta( get_the_ID(), 'recipe_fibre', true ); |
||
| 18 | $fat = get_post_meta( get_the_ID(), 'recipe_fat', true ); |
||
| 19 | |||
| 20 | |||
| 21 | // Getting translated endpoint. |
||
| 22 | $recipe = \lsx_health_plan\functions\get_option( 'endpoint_recipe_single', 'recipe' ); |
||
| 23 | |||
| 24 | $connected_members = get_post_meta( get_the_ID(), ( $recipe . '_connected_team_member' ), true ); |
||
| 25 | $connected_articles = get_post_meta( get_the_ID(), ( $recipe . '_connected_articles' ), true ); |
||
| 26 | ?> |
||
| 27 | |||
| 28 | <?php lsx_entry_before(); ?> |
||
| 29 | |||
| 30 | <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
||
| 31 | |||
| 32 | <?php lsx_entry_top(); ?> |
||
| 33 | |||
| 34 | <div class="entry-meta"> |
||
| 35 | <?php lsx_post_meta_single_bottom(); ?> |
||
| 36 | </div><!-- .entry-meta --> |
||
| 37 | |||
| 38 | <div id="single-recipe" class="entry-content"> |
||
| 39 | <h2 class="title-lined"><?php the_title(); ?> |
||
| 40 | <?php if ( class_exists( 'LSX_Sharing' ) || ( function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) ) : ?> |
||
| 41 | <div class="post-sharing-wrapper"> |
||
| 42 | |||
| 43 | <?php |
||
| 44 | if ( class_exists( 'LSX_Sharing' ) ) { |
||
| 45 | lsx_content_sharing(); |
||
| 46 | } else { |
||
| 47 | if ( function_exists( 'sharing_display' ) ) { |
||
| 48 | sharing_display( '', true ); |
||
| 49 | } |
||
| 50 | |||
| 51 | if ( class_exists( 'Jetpack_Likes' ) ) { |
||
| 52 | $custom_likes = new Jetpack_Likes(); |
||
|
0 ignored issues
–
show
|
|||
| 53 | echo wp_kses_post( $custom_likes->post_likes( '' ) ); |
||
| 54 | } |
||
| 55 | } |
||
| 56 | ?> |
||
| 57 | <?php endif ?> |
||
| 58 | </h2> |
||
| 59 | <?php echo wp_kses_post( lsx_hp_member_connected( $connected_members, 'recipe' ) ); ?> |
||
| 60 | <div class="row"> |
||
| 61 | <div class="col-md-6 recipe-image lsx-hp-shadow"> |
||
| 62 | <?php |
||
| 63 | $featured_image = get_the_post_thumbnail(); |
||
| 64 | if ( ! empty( $featured_image ) && '' !== $featured_image ) { |
||
| 65 | the_post_thumbnail( 'large', array( |
||
| 66 | 'class' => 'aligncenter', |
||
| 67 | ) ); |
||
| 68 | } else { |
||
| 69 | ?> |
||
| 70 | <img loading="lazy" src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . '../assets/images/placeholder.jpg' ); ?>"> |
||
| 71 | <?php |
||
| 72 | } |
||
| 73 | ?> |
||
| 74 | <?php if ( ( ! empty( $prep_time ) ) || ( ! empty( $cooking_time ) ) || ( ! empty( $serves ) ) || ( ! empty( $portion ) ) || ( ! empty( $energy ) ) || ( ! empty( $protein ) ) || ( ! empty( $carbohydrates ) ) || ( ! empty( $fibre ) ) || ( ! empty( $fat ) ) ) { ?> |
||
| 75 | <div class="recipe-data"> |
||
| 76 | <?php lsx_health_plan_recipe_data(); ?> |
||
| 77 | </div> |
||
| 78 | <?php } ?> |
||
| 79 | </div> |
||
| 80 | <div class="col-md-6 recipe-content"> |
||
| 81 | <?php the_content(); ?> |
||
| 82 | <?php echo do_shortcode( '[lsx_health_plan_featured_tips_block]' ); ?> |
||
| 83 | <div class="back-plan-btn"> |
||
| 84 | <?php |
||
| 85 | if ( function_exists( 'wc_get_page_id' ) ) { |
||
| 86 | ?> |
||
| 87 | <a class="btn" href="<?php echo wp_kses_post( get_permalink( wc_get_page_id( 'myaccount' ) ) ); ?>"><?php esc_html_e( 'Back To My Plan', 'lsx-health-plan' ); ?></a> |
||
| 88 | <?php |
||
| 89 | } |
||
| 90 | ?> |
||
| 91 | </div> |
||
| 92 | </div> |
||
| 93 | </div> |
||
| 94 | |||
| 95 | </div><!-- .entry-content --> |
||
| 96 | |||
| 97 | <?php lsx_entry_bottom(); ?> |
||
| 98 | |||
| 99 | </article><!-- #post-## --> |
||
| 100 | |||
| 101 | <?php |
||
| 102 | if ( ! empty( $connected_articles ) ) { |
||
| 103 | lsx_hp_single_related( $connected_articles, __( 'Related articles', 'lsx-health-plan' ) ); |
||
| 104 | } |
||
| 105 | ?> |
||
| 106 | |||
| 107 | <?php |
||
| 108 | lsx_entry_after(); |
||
| 109 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths