/** * ÁREAS PÚBLICAS */ function show_metabox_areas_publicas($post) { wp_nonce_field(__FILE__, 'areas_publicas_nonce'); $activities = new WP_Query(['post_type' => 'actividades', 'posts_per_page' => -1]); if (!empty($activities->posts)) { $activitisShip = orderIndexObject(getActivitisShip($post->ID)); foreach ($activities->posts as $activity) { $checked = isset($activitisShip[$activity->ID]) ? 'checked' : ''; ?> <input type="checkbox" name="activities[]" id="activities[]" value="<?php echo $activity->ID; ?> " <?php echo $checked; ?> /> <?php echo $activity->post_name; ?> <br><br> <?php } } }
?> </p> </div> <?php } } ?> </div> <!-- Áreas publicas --> <h3 class="[ text-center ][ color-primary ][ margin-bottom ]">Áreas públicas</h3> <div class="[ row ][ color-primary grid actividades-archive ]"> <?php $areas_publicas = getActivitisShip($post->ID); if (!empty($areas_publicas)) { foreach ($areas_publicas as $key => $area_publica) { $url_img = attachment_image_url($area_publica->activity_id, 'medium'); ?> <div class="[ col-xs-6 col-md-3 ][ margin-bottom--small grid-item ]"> <img class="[ img-responsive ][ margin-bottom--small ]" src="<?php echo $url_img; ?> "> <?php $actividad_costo = get_post_meta($area_publica->activity_id, 'actividad_costo', true); if ($actividad_costo) { ?> <img class="[ pull-right ][ svg ][ icon icon--iconed--large icon--stroke ][ danger ]" src="<?php