[wp-trac] [WordPress Trac] #52764: Classic editor adding empty <p></p> tags in some media embed situations

WordPress Trac noreply at wordpress.org
Sat Mar 13 07:32:21 UTC 2021


#52764: Classic editor adding empty <p></p> tags in some media embed situations
-----------------------------+---------------------
 Reporter:  jonathanstegall  |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  5.7.1
Component:  Editor           |     Version:  5.7
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+---------------------

Comment (by arskrigitsioniets):

 I also have this problem with my code. If there is no tag in taxonomy, I
 get an empty string.

 My code:
 {{{#!php
 <?php
     <!--tags start-->
 <?php
 if( has_tag() )
         echo '<p class="game-post-has-tags">Метки:</p>';
 ?>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'genre', '<span
 class="post-tags-name-of-tag">Жанр: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'time', '<span class
 ="post-tags-name-of-tag">Время: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'history', '<span
 class="post-tags-name-of-tag">Исторический период: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'wars', '<span class
 ="post-tags-name-of-tag">Война: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'setting', '<span
 class="post-tags-name-of-tag">Сеттинг: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'gameplay', '<span
 class="post-tags-name-of-tag">Принципы геймплея: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'units', '<span
 class="post-tags-name-of-tag">О технике: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'fantasy_peoples',
 '<span class="post-tags-name-of-tag">О фэнтези расах: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'other', '<span
 class="post-tags-name-of-tag">Другое: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'regions', '<span
 class="post-tags-name-of-tag">Место действия: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'countries', '<span
 class="post-tags-name-of-tag">О стране: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'universe', '<span
 class="post-tags-name-of-tag">Вселенная: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'platform', '<span
 class="post-tags-name-of-tag">Платформы: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'modes', '<span
 class="post-tags-name-of-tag">Режимы: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'series', '<span
 class="post-tags-name-of-tag">Серия: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'developer', '<span
 class="post-tags-name-of-tag">Разработчик: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'developer_from',
 '<span class="post-tags-name-of-tag">Разработчик из: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'publisher', '<span
 class="post-tags-name-of-tag">Издатель: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'status_of_game',
 '<span class="post-tags-name-of-tag">Статус: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'year_of_release',
 '<span class="post-tags-name-of-tag">Год выхода: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'year_of_ea', '<span
 class="post-tags-name-of-tag">Год выхода в ранний доступ: </span>',
 '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'score', '<span
 class="post-tags-name-of-tag">Оценка обозревателя: </span>', '');?></p>
 <p class="post-tags-game"><?php the_terms( $post->ID, 'languages', '<span
 class="post-tags-name-of-tag">Языки: </span>', '');?></p>
 <!--tags end-->
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52764#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list