コード例 #1
0
function meet_mentor_recall_block($user_lk)
{
    $user_data = get_userdata($user_lk);
    $user_login = $user_data->user_login;
    $mentor_id = get_user_meta($user_lk, 'mentor_for_student');
    $mentor_id = $mentor_id[0];
    $mentor_vimeo = get_user_meta($mentor_id, 'vimeo_mentor', 1);
    $mentor_youtube = get_user_meta($mentor_id, 'youtube_mentor', 1);
    $mentor_data = get_userdata($mentor_id);
    ////
    $display_author_info = true;
    if ($mentor_id) {
        $html .= '<div class="container-fluid" id="mentor_tab">';
        $html .= '<div class="row">';
        $html .= '<div class="col-md-7 col-xs-12" id="video_mentor">';
        if ($mentor_youtube != '') {
            $html .= display_youtube_video($mentor_youtube, $display_author_info);
        } elseif ($mentor_vimeo != '') {
            $html .= display_vimeo_video($mentor_vimeo, $display_author_info);
        } else {
            $html .= get_student_thumbnail(false, $display_author_info);
        }
        $html .= '</div>';
        $html .= '<div class="col-md-5 col-xs-12" id="text_mentor">';
        $html .= '<p><strong>' . __('This is your mentor: ') . '</strong>';
        $html .= '<i>' . $mentor_data->display_name . '</i></p>';
        $html .= '<p><strong>' . __('About the mentor: ') . '</strong>';
        $html .= '<i>' . $mentor_data->description . '</i></p>';
        $html .= '<p><strong>' . __('Send an email: ') . '</strong>';
        $html .= '<i>' . $mentor_data->user_email . '</i></p>';
        //$html .= do_shortcode('[CPABC_APPOINTMENT_CALENDAR calendar="2"]');
        $html .= do_shortcode('[APCAL]');
        $html .= '</div>';
        $html .= '</div>';
        $html .= '</div>';
    } else {
        $html .= '<div class="center-block">';
        $html .= '<p class="bg-warning">';
        $html .= 'Sorry, you have no mentor! Be patient!';
        $html .= '</p>';
        $html .= '</div>';
    }
    return $html;
}
コード例 #2
0
    }
    ?>
<article id="post-<?php 
    the_ID();
    ?>
">
    <div class="row">
        <div class="col-md-6 col-xs-12" id="photo-text">
            <?php 
    // echo $amount_goal . ' ' . $amount_have . ' ' . $width_bar; //////////
    //echo '<pre>'; var_dump(get_post_meta($post->ID));  var_dump(get_post()); echo '</pre>';
    if ($give_youtube !== '') {
        //Check if video exist and output it or standart image
        echo display_youtube_video($give_youtube, $display_author_info);
    } elseif ($give_vimeo !== '') {
        echo display_vimeo_video($give_vimeo, $display_author_info);
    } elseif ($give_youtube == '' && $give_vimeo == '' && has_post_thumbnail()) {
        the_post_thumbnail();
    } else {
        echo get_student_thumbnail(false, $display_author_info);
    }
    ?>
        </div>
        <div class="col-md-6 col-xs-12" id="post-text">
            <div id="parent-form">
                <h2><?php 
    the_title();
    ?>
</h2>
                <div id="number-donations">
                    <?php