Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue 271 sermon_video_embed missing on api #273

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion includes/admin/export/class-sm-export-sm.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ function sermon_return_attachment_id_from_url( $attachment_url ) {
$meta_value_array = array();
$meta_key_name = array(
'sermon_audio',
'sermon_video',
'sermon_video_emebed',
'sermon_video_link',
'sermon_notes',
'sermon_bulletin',
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/import/class-sm-import-sb.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ private function _import_sermons() {
} elseif ( 'code' === $item->type ) {
$this->log( 'Found video embed!', 253 );

update_post_meta( $id, 'sermon_video', base64_decode( $item->name ) );
update_post_meta( $id, 'sermon_video_embed', base64_decode( $item->name ) );
}
}

Expand Down
2 changes: 1 addition & 1 deletion includes/admin/import/class-sm-import-se.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ private function _import_messages() {

// Set video embed.
if ( ! empty( $message->embed_code ) ) {
update_post_meta( $id, 'sermon_video', $message->embed_code );
update_post_meta( $id, 'sermon_video_embed', $message->embed_code );
}

// Set views.
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/sm-cmb-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function wpfc_sermon_metaboxes() {
$sermon_files_meta->add_field( array(
'name' => esc_html__( 'Video Embed Code', 'sermon-manager-for-wordpress' ),
'desc' => esc_html__( 'Paste your embed code for Vimeo, Youtube, Facebook, or direct video file here', 'sermon-manager-for-wordpress' ),
'id' => 'sermon_video',
'id' => 'sermon_video_embed',
'type' => 'textarea_code',
) );
$sermon_files_meta->add_field( apply_filters( 'sm_cmb2_field_sermon_video_link', array(
Expand Down
4 changes: 2 additions & 2 deletions includes/class-sm-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function add_custom_data( $response ) {
'Views' => array( '' ),
'bible_passage' => array( '' ),
'sermon_description' => array( '' ),
'sermon_video' => array( '' ),
'sermon_video_embed' => array( '' ),
'sermon_video_link' => array( '' ),
'sermon_bulletin' => array( '' ),
'_thumbnail_id' => array( '' ),
Expand All @@ -149,7 +149,7 @@ public function add_custom_data( $response ) {
$data['_views'] = $post_meta['Views'][0];
$data['bible_passage'] = $post_meta['bible_passage'][0];
$data['sermon_description'] = $post_meta['sermon_description'][0];
$data['sermon_video_embed'] = $post_meta['sermon_video'][0];
$data['sermon_video_embed'] = $post_meta['sermon_video_embed'][0];
$data['sermon_video_url'] = $post_meta['sermon_video_link'][0];
$data['sermon_bulletin'] = $post_meta['sermon_bulletin'][0];
$data['_featured_url'] = wp_get_attachment_url( $post_meta['_thumbnail_id'][0] );
Expand Down
2 changes: 1 addition & 1 deletion includes/sm-deprecated-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function wpfc_sermon_media() {
$html .= '</div>';
} else {
$html .= '<div class="wpfc_sermon-video cf">';
$html .= do_shortcode( get_wpfc_sermon_meta( 'sermon_video' ) );
$html .= do_shortcode( get_wpfc_sermon_meta( 'sermon_video_embed' ) );
$html .= '</div>';
}

Expand Down
4 changes: 2 additions & 2 deletions views/partials/content-sermon-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@
<?php echo wpfc_render_video( get_wpfc_sermon_meta( 'sermon_video_link' ) ); ?>
</div>
<?php endif; ?>
<?php if ( get_wpfc_sermon_meta( 'sermon_video' ) ) : ?>
<?php if ( get_wpfc_sermon_meta( 'sermon_video_embed' ) ) : ?>
<div class="wpfc-sermon-single-video wpfc-sermon-single-video-embed">
<?php echo do_shortcode( get_wpfc_sermon_meta( 'sermon_video' ) ); ?>
<?php echo do_shortcode( get_wpfc_sermon_meta( 'sermon_video_embed' ) ); ?>
</div>
<?php endif; ?>

Expand Down