Esempio n. 1
0
 function traer_profes_selector($defecto = false, $especial = false)
 {
     $html = '<div class="decidir_profe">';
     $ins = get_posts(array('post_type' => 'instructor', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'fields' => 'ids'));
     if ($ins) {
         $html .= $especial ? '<select id="nombre_instructores_r">' : '';
         foreach ($ins as $i) {
             $instructor = new Instructor($i);
             $selected = (string) $defecto === (string) $i ? true : false;
             $html .= $instructor->imprimir_loop(false, $selected, $especial);
         }
         $html .= $especial ? '</select>' : '';
     }
     $html .= '</div>';
     return $html;
 }