Beispiel #1
0
?>

  <?php 
include locate_template('templates/sections/user-info.php');
?>

  <?php 
if (is_user_role('editor') || is_user_role('administrator') || $user_info->ID == get_current_user_id()) {
    $userdata = ['DNI' => get_the_author_meta('dbem_dnie', $user_info->ID), 'Fecha de nacimiento' => get_the_author_meta('bornday', $user_info->ID), 'Teléfono' => get_the_author_meta('dbem_phone', $user_info->ID), 'Dirección' => get_the_author_meta('dbem_address', $user_info->ID), 'Estudios' => get_the_author_meta('titulacion', $user_info->ID), 'Centro de estudios' => get_the_author_meta('centro_de_estudios', $user_info->ID)];
    /* Datos de asociado */
    if ($user_info->ID == get_current_user_id()) {
        $title_section = 'Tus datos de asociado';
    } else {
        $title_section = 'Datos de asociado';
    }
    wpdc_the_section_custom($userdata, 'userdata', $title_section, true);
    /* Messages */
    if ($user_info->ID == get_current_user_id()) {
        $title_section = 'Mensajes con ' . get_option('blogname');
    } else {
        $title_section = 'Mensajes con ' . wpdc_get_user_name($user_info->ID);
    }
    wpdc_the_section_messages(get_user_notification_track($user_info->ID, 'type', 'message'), 'user_messages', $title_section, true);
}
if (is_user_role('editor') || is_user_role('administrator')) {
    /* Historial de registro */
    wpdc_the_section_registry_track(get_user_registry_track($user_info->ID), 'user_track', 'Historial', true);
}
?>

    ?>
		<?php 
    global $post;
    $post_id = $_GET['id'];
    $post = get_post($post_id);
    $job_bussiness = get_post_meta($post_id, 'job_bussiness', true);
    $job_info = get_post_meta($post_id, 'job_info', true);
    ?>
 

		<?php 
    if (is_user_role('editor') || is_user_role('administrator')) {
        $pageoptions = ["postinfo" => "Detalles"];
        wpdc_the_pageoptions($pageoptions);
        $infoarray = ["Publicado" => get_the_date('Y-m-d h:i:s'), "Última modificación" => get_the_date('Y-m-d h:i:s'), "Autor" => wpdc_get_user_name($post->post_author)];
        wpdc_the_section_custom($infoarray, 'postinfo', 'Detalles del artículo', true, true);
    }
    ?>


		<section id="newconcurso" class="wrap wrap--content wrap--form wrap--shadow">
			<h3 class="title title--section">Editar artículo</h3>
			<form method="POST" action="">
			  	<input type="hidden" name="id" value="<?php 
    echo $post_id;
    ?>
">

			    <?php 
    wpdc_the_input_text('post_name', get_the_title($post_id), 'Título del artículo', 'Título');
    ?>