Skip to content

Commit

Permalink
Merge pull request #65 from manualdousuario/2024-18
Browse files Browse the repository at this point in the history
Novos blocos `.ctx` e outros ajustes
  • Loading branch information
claromes authored Jun 22, 2024
2 parents f9a3672 + ed5fc5a commit 10249f8
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 113 deletions.
8 changes: 5 additions & 3 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

if ( ! defined( '_S_VERSION' ) ) {
define( '_S_VERSION', '3.2.3' );
define( '_S_VERSION', '3.3' );
}

/**
Expand Down Expand Up @@ -157,6 +157,8 @@ function() {
wp_dequeue_style( 'ssp-recent-episodes' );
wp_deregister_style( 'ssp-recent-episodes' );

wp_deregister_style( 'jlad-frontend' );

wp_dequeue_style( 'stcr-style' );
wp_deregister_style( 'stcr-style' );

Expand Down Expand Up @@ -341,13 +343,13 @@ function dez_favicons() {
*/
function dez_mensagem_form_comentarios( $defaults ) {
$logincom = esc_url( wp_login_url( get_permalink() ) );
$defaults['comment_notes_before'] = '<div class="comment-form-alert ctx-atencao"><p>Antes de comentar, leia as <a href="/doc-comentarios/">regras de convivência</a> e o <a href="https://manualdousuario.net/orbita/guia-de-uso/">guia de uso</a> do Órbita. <a href="/cadastro/">Cadastre-se</a> (é grátis!) para verificar seu perfil e interagir no Órbita. Já tem conta? <a href="' . $logincom . '">Entre</a>.</p></div>';
$defaults['comment_notes_before'] = '<p class="comment-form-alert ctx"><label>Atenção!</label>Antes de comentar, leia as <a href="/doc-comentarios/">regras de convivência</a> e o <a href="https://manualdousuario.net/orbita/guia-de-uso/">guia de uso</a> do Órbita. <a href="/cadastro/">Cadastre-se</a> (é grátis!) para verificar seu perfil e interagir no Órbita. Já tem conta? <a href="' . $logincom . '">Entre</a>.</p>';
return $defaults;
}
add_filter( 'comment_form_defaults', 'dez_mensagem_form_comentarios' );

function dez_mensagem_form_comentarios_logado($args_logged_in, $commenter, $user_identity) {
$args_logged_in = '<div class="comment-form-alert ctx-atencao"><p>Antes de comentar, leia as <a href="/doc-comentarios/">regras de convivência</a> e o <a href="https://manualdousuario.net/orbita/guia-de-uso/">guia de uso</a> do Órbita.</div>';
$args_logged_in = '<p class="comment-form-alert ctx"><label>Atenção!</label> Antes de comentar, leia as <a href="/doc-comentarios/">regras de convivência</a> e o <a href="https://manualdousuario.net/orbita/guia-de-uso/">guia de uso</a> do Órbita.</p>';
return $args_logged_in;
}
add_filter('comment_form_logged_in', 'dez_mensagem_form_comentarios_logado', 10, 3);
Expand Down
4 changes: 3 additions & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
<!-- Text Navigation -->
<ul id="primary-menu" class="menu nav-menu link-alt">
<li class="menu-item"><a href="/acompanhe/">Newsletter</a></li>
<li class="menu-item"><a href="/feed/"><img src="/wp-content/themes/dez/img/icone-rss-outline.svg" alt="Feed RSS" width="26" height="26" /></a></li>
<li class="menu-item"><a href="/sobre/">Sobre</a></li>
<li class="menu-item"><a href="/orbita/">Órbita</a></li>
<li class="menu-item"><a href="/apoie/"><strong>Apoie</strong></a></li>
Expand Down Expand Up @@ -115,6 +114,9 @@
// Mode.
$icon_nav .= '<a id="dark-mode-toggle" name="dark-mode-toggle" alt="Alternar Tema (Claro ou Escuro)" title="Alternar Tema (Claro ou Escuro)" onClick="setDezTheme(event)"></a>';

// Feed RSS/Atom
$icon_nav .= '<a id="feed-rss-atom" href="/feed/"></a>';

$icon_nav .= '<div id="secondary-menu" class="menu-item">';

// User Navigation.
Expand Down
20 changes: 9 additions & 11 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,14 @@
get_header();
?>

<?php echo do_shortcode( '[sc name="sextas-feiras"][/sc]' ); ?>

<main id="primary" class="site-main">

<?php
$count = 0;
if ( have_posts() ) :

if ( is_home() && ! is_front_page() ) :
?>
<header>
<h1 class="page-title"><?php single_post_title(); ?></h1>
</header>
<?php
endif;

/* Start the Loop */
while ( have_posts() ) :
the_post();

Expand All @@ -39,14 +32,19 @@
?>
<div class="orbita-manual">
<h2>Destaques do Órbita</h2>
<?php echo do_shortcode( '[orbita-ranking comment-points="1" vote-points="3" days="10" limit="5"]' ); ?>
<?php if ( shortcode_exists( 'orbita-ranking' ) ) {
echo do_shortcode( '[orbita-ranking comment-points="1" vote-points="3" days="10" limit="5"]' );
} ?>
<footer class="entry-footer link-alt">
<a href="/orbita/">Todas as conversas &raquo;</a>
</footer>
</div>
</div>
<?php
endif;

elseif ( 5 == $count && shortcode_exists( 'sc' ) ) :
echo do_shortcode( '[sc name="buttondown-newsletters"][/sc]' );
endif;

$count++;

Expand Down
14 changes: 13 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Tags: featured-images, threaded-comments
Requires at least: 4.5
Tested up to: 8.1.12
Requires PHP: 5.6
Stable tag: 3.2.3
Stable tag: 3.3
License: GNU General Public License v2 or later
License URI: LICENSE

Expand Down Expand Up @@ -43,6 +43,18 @@ Dez includes support for WooCommerce and for Infinite Scroll in Jetpack.

== Changelog ==

= 3.3 - Jun 19 2024 =
* Acrescenta blocos do plugin Shortcoder à capa (`index.php`): 1) aviso de conteúdos novos às sextas-feiras no topo; e 2) newsletters do diretório no meio dos posts
* Exibe datas apenas uma vez por dia na capa (`the_date();` em `template-parts/content.php`) e remove datas dos posts individuais, mantendo-as dentro dos posts
* Adiciona função/condicional `shortcode_exists()` onde precisava
* Corrige datas e permalinks dos resultados da pesquisa (`template-parts/content-search.php`)
* Altera leiaute dos blocos `ctx-`, prevê uso de `label` para sinalizar o tipo de bloco (ajuda na acessibilidade) e nova classe genérica `ctx`, mas mantém as classes antigas para retrocompatibilidade.
* Acrescenta bordas ao menu principal (`ul.nav-menu`) e botão do menu do leitor (`.menu-toggle-icon`)
* Move ícone do feed RSS/Atom do menu em texto para o dos ícones (`header.php`)
* Inverte posições dos links de responder e curtir comentários
* Ajustes no `style.css` para o plugin Just Likes and Dislikes
* Bloqueia o carregamento do arquivo `jlad-frontend.css`, do plugin Just Likes and Dislikes, no front-end (via `functions.php`)

= 3.2.3 - Jun 7 2024 =
* Restabelece o carregamento do jQuery no front-end, bloqueando o jQuery Migrate
* Acrescenta classes no CSS para o plugin Just Like Dislike
Expand Down
Loading

0 comments on commit 10249f8

Please sign in to comment.