Подтвердить что ты не робот

Синтаксическая ошибка, неожиданный "endif" (T_ENDIF) в строке 288

Я работаю над этой ошибкой кода для моего сайта без проблем.

Ошибка анализа: синтаксическая ошибка, неожиданный "endif" (T_ENDIF) в /homez.541/photoher/marie/wp-content/themes/hemingway/functions.php в строке 288

Строка ошибки кода линии 288: <p class="comment-awaiting-moderation"><?php _e( 'Awaiting moderation', 'hemingway' ); ?></p>

Вот весь код ошибки:

    <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">

        <?php __( 'Pingback:', 'hemingway' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'hemingway' ), '<span class="edit-link">', '</span>' ); ?>

    </li>
    <?php
            break;
        default :
        global $post;
    ?>
    <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">

        <div id="comment-<?php comment_ID(); ?>" class="comment">

            <div class="comment-meta comment-author vcard">

                <?php echo get_avatar( $comment, 120 ); ?>

                <div class="comment-meta-content">

                    <?php printf( '<cite class="fn">%1$s %2$s</cite>',
                        get_comment_author_link(),
                        ( $comment->user_id === $post->post_author ) ? '<span class="post-author"> ' . __( '(Post author)', 'hemingway' ) . '</span>' : ''
                    ); ?>

                    <p><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ) ?>"><?php echo get_comment_date() . ' at ' . get_comment_time() ?></a></p>

                </div> <!-- /comment-meta-content -->

            </div> <!-- /comment-meta -->

            <div class="comment-content post-content">

                <?php if ( '0' == $comment->comment_approved ) : ?>

                    <p class="comment-awaiting-moderation"><?php _e( 'Awaiting moderation', 'hemingway' ); ?></p>

                <?php endif; ?>

                <?php comment_text(); ?>

                <div class="comment-actions">

                    <?php edit_comment_link( __( 'Edit', 'hemingway' ), '', '' ); ?>

                    <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'hemingway' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>

                    <div class="clear"></div>

                </div> <!-- /comment-actions -->

            </div><!-- /comment-content -->

        </div><!-- /comment-## -->
    <?php
        break;
    endswitch;
}
endif;

Пожалуйста, помогите мне.

4b9b3361

Ответ 1

У вас не должно быть } endif;.

Используйте if (...) {} или if (...):/endif;, но не используйте оба.