-1
どのようにユーザーのプロフィールのカスタムフィールドにBuddy Pressに埋め込みますか?youtubeをカスタムフィールドバディーのプレスに埋め込む方法
どのようにユーザーのプロフィールのカスタムフィールドにBuddy Pressに埋め込みますか?youtubeをカスタムフィールドバディーのプレスに埋め込む方法
は、下のリンクを参照してください、ありがとうございました、これは働いていた
http://snippetbarn.bp-fr.net/how-to-embed-a-video-on-profile/
function set_video_field($field_value) {
$bp_this_field_name = bp_get_the_profile_field_name();
// field name (case sensitive)
if($bp_this_field_name == 'Spotlight') {
$field_value = strip_tags($field_value);
// building the HTML and h/w of the iframe
$field_value = '<iframe width="420" height="315" src="http://www.youtube.com/embed/'.$field_value.'" frameborder="0" allowfullscreen></iframe>';
}
return $field_value;
}
add_filter('bp_get_the_profile_field_value','set_video_field');
、これはあなたを助けることを願っています! –
リンクが今後期限切れになる可能性があるため、コードを追加しました。 –