Пример #1
0
								</div>
							<?php 
    }
}
?>
					</div>
					<div class="[ text-center ]">
						<button type="submit" class="[ btn btn-primary btn-small ]">VER MÁS</button>
					</div>
				</section> -->
				<!-- Puertos -->
				<section class="[ col-sm-12 ][ margin-bottom--xlarge ]">
					<h3 class=" [ text-center text-primary ][ margin-bottom ] " >Puertos</h3>
					<div class="[ row ][ margin-bottom--xsmall grid actividades-archive ]">
						<?php 
$ports = getExcursionsOrPorts($post->ID, 'puerto');
if (!empty($ports)) {
    foreach ($ports as $key => $port) {
        ?>
								<div class="[ col-xs-6 col-md-3 grid-item ][ margin-bottom--small ]">
									<a href="<?php 
        echo site_url('/destino/') . $post->post_name . '/' . $port->slug;
        ?>
">
										<?php 
        echo wp_get_attachment_image($port->id_attachmend, 'thumbnail', false, ['class' => '[ img-responsive ][ margin-bottom--small ]']);
        ?>
										<p class="[ text-primary ]" ><?php 
        echo $port->name;
        ?>
</p>
Пример #2
0
/**
 * EDITAR EXCURSION
 */
function show_metabox_excursiones_edit($post)
{
    $id_ex = isset($_GET['id_ex']) ? $_GET['id_ex'] : 0;
    $excursion = getExcursionOrPort($id_ex);
    $settings = array('editor_height' => '200');
    ?>

	<label for="excurcion_puerto" class="label-paquetes">Nombre: </label>
	<input type="text" name="excurcion_puerto" class="widefat" value="<?php 
    echo $excursion->name;
    ?>
" id="name-option_expu"/>
	<input type="hidden" id="expu_id" class="widefat" value="<?php 
    echo $excursion->id;
    ?>
">
	<input type="hidden" id="post_id" class="widefat" value="<?php 
    echo $post->ID;
    ?>
">
	<?php 
    // wp_editor( stripslashes($excursion->description), 'description-option_expu', $settings )
    ?>
	<br>
	<label for="expu_url" class="label-paquetes">Url excursión: </label>
	<input type="text" name="expu_url" class="widefat" value="<?php 
    echo $excursion->url_excursion;
    ?>
" id="expu_url"/>
	<br><br><select id="select-option_puerto">
		<option value="0">Selecciona un puerto</option>
		<?php 
    $ports = getExcursionsOrPorts($post->ID, 'puerto');
    if (!empty($ports)) {
        foreach ($ports as $key => $posrt) {
            $selected = $posrt->id == $excursion->relationship ? 'selected' : '';
            ?>
				<option value="<?php 
            echo $posrt->id;
            ?>
" <?php 
            echo $selected;
            ?>
><?php 
            echo $posrt->name;
            ?>
</option>
			<?php 
        }
    }
    ?>
	</select>
	<br><br><a href="#" class="button button-upload-select button-upload" data-editor="content"><span class="wp-media-buttons-icon" ></span> Agregar Imagen </a>
    <div class="imagen-a-agregar">
    	<?php 
    echo wp_get_attachment_image($excursion->id_attachmend, 'thumbnail', '', ['class' => 'img-exucursion-puerto', 'data-id_attachmend' => $excursion->id_attachmend]);
    ?>
    </div>

    <span class="button-primary editar-excursion">Editar</span>

<?php 
}