'image/jpeg',
'png' => 'image/png',
'gif' => 'image/gif',
);
// dejamos que wp haga el chequeo de los archivos...
$status = wp_handle_upload($_FILES['user_avatar'], array('mimes' => $allowed_image_types));
// ¿Sin errores? Dejado que se suba el archivo y lo cambiamos de tamaño
if(empty($status['error'])){
// cambio de tamaño
$resized = image_resize($status['file'], MAX_AVATAR_WIDTH, MAX_AVATAR_HEIGHT, $crop = true);
// Si el cambio de tamaño de la imagen falló, dígame por qué
if(is_wp_error($resized))
wp_die($resized->get_error_message());
// Porfavor deme la url de la imagen con el tamaño cambiado
$uploads = wp_upload_dir();
$resized_url = $uploads['url'].'/'.basename($resized);
// insertar la url del archivo en el actual usuario
update_user_meta($current_user_id, 'custom_avatar', $resized_url);
// error, muéstrate
}else{
wp_die(sprintf(__("Error al Subir el Archivo: %s", "Baobab"), $status['error']));
}
}
get_header(); ?>
first_name; echo " $curauth->last_name"; ?>
ID == $current_user->ID){ ?>'?>
ID ); if ($post_type == 'evento'){
echo '';
echo '
' .get_post_type( $post->ID ); '
';
}
?>
ID ); if ($post_type == 'proyecto'){
echo '';
echo '
' .get_post_type( $post->ID ); '
';
}
?>
ID ); if ($post_type == 'debate'){
echo '';
echo '
' .get_post_type( $post->ID ); '
';
}
?>
ID ); if ($post_type == 'mercado'){
echo '';
echo '
' .get_post_type( $post->ID ); '
';
}
?>
ID ); if ($post_type == 'idea'){
echo '';
echo '
' .get_post_type( $post->ID ); '
';
}
?>
ID ); if ($post_type == 'post'){
echo '';
echo '
' .get_post_type( $post->ID ); '
';
}
?>
ID ); if ($post_type == 'evento')
echo ''.the_modified_date('j F, Y'); ?>
ID ); if ($post_type == 'proyecto')
echo _e("Estado: ", "Baobab").get_post_meta($post->ID, 'Estado', true); ?>
ID ); if ($post_type == 'debate')
echo ''._e(" concluye el ", "Baobab");?>
ID ); if ($post_type == 'debate')
echo''.the_modified_date('j F, Y');?>
ID ); if ($post_type == 'mercado')
echo ''.get_post_meta($post->ID, 'Condicion', true);?>
ID ); if ($post_type == 'mercado')
echo ''.get_post_meta($post->ID, 'Valor', true);?>