feat: sitio CV completo v1.0.0
- 4 temas WordPress: persona-cv (activo), lumina, apex-cv, cvolio - Plugin pflores-cv-fields con CMB2 (100% gratuito) — admin editable - Generador PDF dinámico con Chromium headless (?cv_pdf=1) - Datos del CV de Patricia Flores cargados en CMB2 - URL dinámica con soporte proxy SSL (NPM/X-Forwarded-Proto) - WP Mail SMTP instalado (pendiente config SMTP) - Documentación completa: PROMPT_IA.md, DEPLOY_WEB.md, PRODUCCION.md, VERSIONADO.md
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once get_template_directory() . '/inc/customizer.php';
|
||||
require_once get_template_directory() . '/inc/cv-data.php';
|
||||
require_once get_template_directory() . '/inc/patterns.php';
|
||||
require_once get_template_directory() . '/inc/visits.php';
|
||||
|
||||
function cvolio_setup(): void
|
||||
{
|
||||
@@ -24,7 +26,7 @@ function cvolio_enqueue_assets(): void
|
||||
{
|
||||
wp_enqueue_style(
|
||||
'cvolio-fonts',
|
||||
'https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap',
|
||||
'https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Cormorant+Garamond:wght@500;600;700&display=swap',
|
||||
[],
|
||||
null
|
||||
);
|
||||
@@ -58,6 +60,60 @@ function cvolio_body_classes(array $classes): array
|
||||
}
|
||||
add_filter('body_class', 'cvolio_body_classes');
|
||||
|
||||
function cvolio_redirect_default_sample_page(): void
|
||||
{
|
||||
if (! is_page()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$samplePage = get_queried_object();
|
||||
if (! $samplePage instanceof WP_Post) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($samplePage->post_name !== 'pagina-ejemplo') {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_safe_redirect(home_url('/'), 301);
|
||||
exit;
|
||||
}
|
||||
add_action('template_redirect', 'cvolio_redirect_default_sample_page', 1);
|
||||
|
||||
function cvolio_render_primary_menu(): string
|
||||
{
|
||||
if (has_nav_menu('primary')) {
|
||||
return trim((string) wp_nav_menu([
|
||||
'theme_location' => 'primary',
|
||||
'container' => false,
|
||||
'fallback_cb' => false,
|
||||
'menu_class' => 'site-nav__menu',
|
||||
'echo' => false,
|
||||
]));
|
||||
}
|
||||
|
||||
$items = [
|
||||
'#resumen' => __('Resumen', 'cvolio'),
|
||||
'#impacto' => __('Impacto', 'cvolio'),
|
||||
'#experiencia' => __('Experiencia', 'cvolio'),
|
||||
'#formacion' => __('Formación', 'cvolio'),
|
||||
'#certificaciones' => __('Certificaciones', 'cvolio'),
|
||||
'#contacto' => __('Contacto', 'cvolio'),
|
||||
];
|
||||
|
||||
$html = '<ul class="site-nav__menu">';
|
||||
foreach ($items as $href => $label) {
|
||||
$html .= sprintf(
|
||||
'<li><a href="%s">%s</a></li>',
|
||||
esc_url($href),
|
||||
esc_html($label)
|
||||
);
|
||||
}
|
||||
$html .= '</ul>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function cvolio_render_contact_link(string $type, string $value): string
|
||||
{
|
||||
if ($value === '') {
|
||||
|
||||
Reference in New Issue
Block a user