This commit is contained in:
2026-04-26 23:47:49 +02:00
parent 1b95f03d1e
commit b073e009d8
5288 changed files with 1112699 additions and 55536 deletions

View File

@@ -0,0 +1,20 @@
<?php
$search_videos_text = __( 'Search Videos', 'feeds-for-youtube' );
$search_placeholder_text = __( 'Search...', 'feeds-for-youtube' );
$submit_text = __( 'Submit', 'feeds-for-youtube' );
?>
<div id="sby_search" class="sby_search">
<div class="sby_sf_label">
<label for="sby_sf_input"><?php echo esc_html( $search_videos_text ); ?></label>
</div>
<div class="sby_sf_input">
<form role="search" action="" method="get">
<input id="sby_sf_input" type="search" name="<?php echo esc_attr( $input_name ); ?>" value="<?php echo esc_attr( $search_term ); ?>" placeholder="<?php echo esc_attr( $search_placeholder_text ); ?>">
<button type="submit"><?php echo esc_html( $submit_text ); ?></button>
</form>
</div>
<?php
include sby_get_feed_template_part( 'results', $sby_settings );
?>
</div>

View File

@@ -0,0 +1,35 @@
<?php
$post_thumbnail = SBY_Parse::get_media_url( $api_data, 'high' );
$title = get_the_title( $youtube_post->ID );
$permalink = get_the_permalink( $youtube_post->ID );
$img_alt = sby_maybe_shorten_text( SBY_Parse::get_caption( $api_data, __( 'Image for post', 'feeds-for-youtube' ) . ' ' . $youtube_post->ID ), array() );
$caption = sby_maybe_shorten_text( SBY_Parse_Pro::get_caption( $api_data, '' ), array() );
$timestamp = SBY_Parse::get_timestamp( $api_data );
$live_broadcast_type = SBY_Parse_Pro::get_live_broadcast_content( $api_data ); // 'none', 'upcoming', 'live', 'completed'
$live_streaming_timestamp = SBY_Parse_Pro::get_live_streaming_timestamp( $api_data, $youtube_post_meta );
$live_streaming_time_string = SBY_Display_Elements_Pro::escaped_live_streaming_time_string( $api_data, $youtube_post_meta );
$formatted_date_string = $live_broadcast_type === 'none' ? SBY_Display_Elements_Pro::format_date( $timestamp, $settings ) : SBY_Display_Elements_Pro::format_date( $live_streaming_timestamp, $settings, true );
?>
<div class="sby_sf_result">
<div class="sby_sf_thumb_wrap">
<a href="<?php echo $permalink; ?>">
<img src="<?php echo esc_url( $post_thumbnail ); ?>" alt="<?php echo esc_attr( $img_alt ); ?>">
</a>
</div>
<div class="sby_sf_info_wrap">
<a href="<?php echo $permalink; ?>">
<h3><?php echo esc_html( $title ); ?></h3>
</a>
<p class="sby_sf_dates">
<?php if ( $live_broadcast_type !== 'none' ) : ?>
<span class="sby_ls_message_wrap"><span class="sby_ls_message"><?php echo $live_streaming_time_string; ?></span></span>
<?php endif; ?>
<span class="sby_date sby_live_broadcast_type_<?php echo esc_attr( $live_broadcast_type ); ?>"><?php echo $formatted_date_string; ?></span>
</p>
<p>
<?php echo $caption; ?>
</p>
</div>
</div>

View File

@@ -0,0 +1,4 @@
<div id="sby_sf_results_wrap" class="sby_sf_results_wrap">
<?php SBY_Search::results_loop( $results ); ?>
</div>