Skip to content

Commit

Permalink
ajuste para evitar warnings #218
Browse files Browse the repository at this point in the history
  • Loading branch information
Thayná Zacharias committed Aug 20, 2024
1 parent 40cc92a commit 2c51494
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ function latest_horizontal_posts_callback( $attributes ) {
} else {
$args = build_posts_query( $attributes, $post__not_in );
}
if (!isset($args)){
$args = [];
}

$posts_query = new \WP_Query( $args );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$user_login = get_post_meta( $coauthor, 'cap-user_login', true );
$display_name = get_post_meta( $coauthor, 'cap-display_name', true );

$link = get_author_posts_url( $author, $user_login );
$link = get_author_posts_url( $coauthor, $user_login );

$bio = get_post_meta( $coauthor, 'cap-description', true );
$bio = explode( ' ', $bio, 15 );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
<a href="<?php echo $args['video']['video_url']; ?>" target="_blank" itemprop="url">
<?php
$video_url = ( isset($args['video']['video_url'])) ? $args['video']['video_url'] : '';
$thumbnail = ( isset($args['video']['thumbnail'])) ? $args['video']['thumbnail'] : '';
$title = ( isset($args['video']['title'])) ? $args['video']['title'] : '';
$description = ( isset($args['video']['description'])) ? $args['video']['description'] : '';
$uploadDate = ( isset($args['video']['uploadDate'])) ? $args['video']['uploadDate'] : '';
$duration = ( isset($args['video']['duration'])) ? $args['video']['duration'] : '';
?>
<a href="<?php echo $video_url; ?>" target="_blank" itemprop="url">
<div class="post videos" itemscope itemtype="http://schema.org/VideoObject">
<div class="post-thumbnail">
<div class="play"></div>
<img src="<?php echo $args['video']['thumbnail']; ?>" alt="<?php echo $args['video']['title']; ?>" itemprop="thumbnailUrl">
<img src="<?php echo $thumbnail; ?>" alt="<?php echo $title; ?>" itemprop="thumbnailUrl">
</div>
<meta itemprop="contentUrl" content="<?php echo $args['video']['video_url']; ?>">
<meta itemprop="name" content="<?php echo $args['video']['title']; ?>">
<meta itemprop="description" content="<?php echo $args['video']['description']; ?>">
<meta itemprop="uploadDate" content="<?php echo $args['video']['uploadDate']; ?>">
<meta itemprop="duration" content="<?php echo $args['video']['duration']; ?>">
<meta itemprop="contentUrl" content="<?php echo $video_url; ?>">
<meta itemprop="name" content="<?php echo $title; ?>">
<meta itemprop="description" content="<?php echo $description; ?>">
<meta itemprop="uploadDate" content="<?php echo $uploadDate; ?>">
<meta itemprop="duration" content="<?php echo $duration; ?>">
</div>
</a>

0 comments on commit 2c51494

Please sign in to comment.