From 6150ac60576f2f3871e00eea3ec12fd4a5ec98bc Mon Sep 17 00:00:00 2001 From: LeonardRuhmann Date: Wed, 21 Jan 2026 19:36:42 -0300 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20adiciona=20o=20shortcode=20para=20c?= =?UTF-8?q?ria=C3=A7=C3=A3o=20din=C3=A2mica=20de=20caixas.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/shortcodes.php | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/inc/shortcodes.php b/inc/shortcodes.php index 871c56c..52ff557 100644 --- a/inc/shortcodes.php +++ b/inc/shortcodes.php @@ -111,4 +111,35 @@ function instrutor_shortcode($atts, $content = null) { return ob_get_clean(); } -add_shortcode('instrutor', 'instrutor_shortcode'); \ No newline at end of file +add_shortcode('instrutor', 'instrutor_shortcode'); + +// Shortcode para caixa de destaque colorida +function color_box_shortcode($atts) { + // 1. Define default values (Attributes) + $atts = shortcode_atts( + array( + 'text' => '28 artigos publicados', // Default text + 'bg_color' => '#f2637e', // Default pink background + 'color' => 'white', // Default text color + ), + $atts, + 'caixa_destaque' // The name of the shortcode + ); + + // 2. Prepare the inline CSS based on the attributes + // We sanitize color inputs to ensure they are safe + $bg_color = esc_attr($atts['bg_color']); + $text_color = esc_attr($atts['color']); + + // 3. Build the HTML output + // I moved the styles into variables to keep the code clean + $style_container = "background-color: {$bg_color}; min-height: 13.5rem; display: flex; align-items: center; justify-content: center; border-radius: 15px;"; + $style_text = "margin-bottom: 0; font-weight: bold; padding: 2rem; color: {$text_color}; text-align: center;"; + + $output = '
'; + $output .= '

' . esc_html($atts['text']) . '

'; + $output .= '
'; + + return $output; +} +add_shortcode('caixa_destaque', 'color_box_shortcode'); \ No newline at end of file From 8ae6ba4aa14e9479bb58650d5f74f9afab73aceb Mon Sep 17 00:00:00 2001 From: Alysson Silva Date: Thu, 12 Mar 2026 18:32:12 -0300 Subject: [PATCH 2/4] feat: Adiciona campos de redes sociais para membros (Instagram, LinkedIn, Lattes) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Adiciona meta boxes no CPT 'membro' para inserção de URLs do LinkedIn, Instagram e Currículo Lattes - Cria função helper 'learninglab_render_membro_socials' para renderização condicional dos links - Atualiza o template 'page-membros.php' para exibir os ícones nas quatro seções de membros - Estiliza os ícones sociais com formato arredondado no 'membro.css' --- assets/css/membro.css | 28 ++++++++++++++++++++++++++ inc/custom-post-types.php | 42 +++++++++++++++++++++++++++++++++++++++ inc/helpers.php | 20 +++++++++++++++++++ page-membros.php | 4 ++++ 4 files changed, 94 insertions(+) diff --git a/assets/css/membro.css b/assets/css/membro.css index 29ead02..da120e5 100644 --- a/assets/css/membro.css +++ b/assets/css/membro.css @@ -113,4 +113,32 @@ .coordenadora .membro-setores span { background-color: #323232; color: #fff; +} + +/* Redes Sociais do Membro */ +.membro-redes-sociais { + display: flex; + justify-content: center; + gap: 10px; + margin-top: 5px; + margin-bottom: 5px; +} + +.membro-redes-sociais a.social-icon { + display: flex; + align-items: center; + justify-content: center; + width: 28px; + height: 28px; + border-radius: 50%; + background-color: #e0e0e0; + color: #333; + text-decoration: none; + font-size: 14px; + transition: all 0.3s ease; +} + +.membro-redes-sociais a.social-icon:hover { + background-color: #009a9a; /* theme color */ + color: #fff; } \ No newline at end of file diff --git a/inc/custom-post-types.php b/inc/custom-post-types.php index 67e6c81..2983a8b 100644 --- a/inc/custom-post-types.php +++ b/inc/custom-post-types.php @@ -71,6 +71,48 @@ function registrar_cpt_cursos() add_action('init', 'registrar_cpt_cursos'); +// Adicionando Meta Box para Redes Sociais no CPT Membros +function registrar_meta_boxes_membros() { + add_meta_box('redes_sociais_membro', 'Redes Sociais', 'render_meta_box_redes_sociais', 'membro', 'normal', 'high'); +} +add_action('add_meta_boxes', 'registrar_meta_boxes_membros'); + +function render_meta_box_redes_sociais($post) { + $instagram = get_post_meta($post->ID, 'instagram_url', true); + $linkedin = get_post_meta($post->ID, 'linkedin_url', true); + $lattes = get_post_meta($post->ID, 'lattes_url', true); + ?> +

+
+ +

+

+
+ +

+

+
+ +

+ '; + if ($linkedin) { + echo ''; + } + if ($instagram) { + echo ''; + } + if ($lattes) { + echo ''; + } + echo ''; + } } \ No newline at end of file diff --git a/page-membros.php b/page-membros.php index 83b3da4..ac977f3 100644 --- a/page-membros.php +++ b/page-membros.php @@ -44,6 +44,7 @@

+ @@ -96,6 +97,7 @@

+ + + From 7d8006b099841ff71dd50d5f0751d35d56a9fb98 Mon Sep 17 00:00:00 2001 From: Douglas Nascimento Date: Fri, 13 Mar 2026 16:11:57 -0300 Subject: [PATCH 3/4] removidas redes sociais de membros egressos --- home.php | 1 - page-membros.php | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/home.php b/home.php index 0618cda..ec292f4 100644 --- a/home.php +++ b/home.php @@ -1,5 +1,4 @@ diff --git a/page-membros.php b/page-membros.php index ac977f3..b12cfc0 100644 --- a/page-membros.php +++ b/page-membros.php @@ -231,8 +231,7 @@

- - + Date: Fri, 13 Mar 2026 18:43:53 -0300 Subject: [PATCH 4/4] =?UTF-8?q?edi=C3=A7=C3=A3o=20simples?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/shortcodes.php | 59 ++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 41 deletions(-) diff --git a/inc/shortcodes.php b/inc/shortcodes.php index 52ff557..60b9273 100644 --- a/inc/shortcodes.php +++ b/inc/shortcodes.php @@ -1,43 +1,34 @@ - '', // Atributo para receber os slugs + 'slugs' => '', ), $atts, 'membros' ); - // Converter a string de slugs em um array $slugs = array_map('trim', explode(',', $atts['slugs'])); - // Se não houver slugs, retorna vazio if (empty($slugs)) { return ''; } - // Iniciar a saída HTML $output = '
'; - // Contar quantos membros são retornados $membros_count = 0; - // Loop através dos slugs foreach ($slugs as $slug) { - // Buscar o post pelo slug $args = array( 'name' => $slug, - 'post_type' => 'membro', // Altere para o post type correto, se necessário + 'post_type' => 'membro', 'post_status' => 'publish', 'numberposts' => 1, ); $membro = get_posts($args); - // Se o post existir, gerar a estrutura if ($membro) { $post = $membro[0]; $nome = get_the_title($post->ID); @@ -48,12 +39,9 @@ function membros_shortcode($atts) { $output .= '

' . esc_html($nome) . '

'; $output .= '
'; - // Incrementa a contagem de membros $membros_count++; } } - - // Adicionar a classe dependendo do número de membros if ($membros_count === 2) { $output = str_replace('
', '
', $output); } elseif ($membros_count === 3) { @@ -66,26 +54,22 @@ function membros_shortcode($atts) { $output = str_replace('
', '
', $output); } - // Fechar a estrutura da grid $output .= '
'; - // Retornar o HTML gerado return $output; } add_shortcode('membros', 'membros_shortcode'); -// Shortcode para instrutores nas páginas de cursos -function instrutor_shortcode($atts, $content = null) { - // Define os atributos com valores padrão +function instrutor_shortcode($atts, $content = null) +{ $atts = shortcode_atts(array( 'nome' => 'Nome do Instrutor', - 'imagem' => '', // URL ou nome da imagem na biblioteca + 'imagem' => '', 'descricao' => '' ), $atts, 'instrutor'); - // Se for o nome de uma imagem da biblioteca, pega a URL if (!filter_var($atts['imagem'], FILTER_VALIDATE_URL)) { $img = get_page_by_title($atts['imagem'], OBJECT, 'attachment'); if ($img) { @@ -93,9 +77,8 @@ function instrutor_shortcode($atts, $content = null) { } } - // HTML do bloco ob_start(); - ?> +?>
@@ -107,39 +90,33 @@ function instrutor_shortcode($atts, $content = null) {

- '28 artigos publicados', // Default text - 'bg_color' => '#f2637e', // Default pink background - 'color' => 'white', // Default text color + 'text' => '28 artigos publicados', + 'bg_color' => '#f2637e', + 'color' => 'white', ), $atts, - 'caixa_destaque' // The name of the shortcode + 'caixa_destaque' ); - // 2. Prepare the inline CSS based on the attributes - // We sanitize color inputs to ensure they are safe $bg_color = esc_attr($atts['bg_color']); $text_color = esc_attr($atts['color']); - // 3. Build the HTML output - // I moved the styles into variables to keep the code clean $style_container = "background-color: {$bg_color}; min-height: 13.5rem; display: flex; align-items: center; justify-content: center; border-radius: 15px;"; - $style_text = "margin-bottom: 0; font-weight: bold; padding: 2rem; color: {$text_color}; text-align: center;"; - + $style_text = "margin-bottom: 0; font-weight: bold; padding: 2rem; color: white !important; text-align: center;"; $output = '
'; $output .= '

' . esc_html($atts['text']) . '

'; $output .= '
'; return $output; } -add_shortcode('caixa_destaque', 'color_box_shortcode'); \ No newline at end of file +add_shortcode('caixa_destaque', 'color_box_shortcode');