Skip to content

Commit

Permalink
Merge pull request #50 from manualdousuario/2024-10
Browse files Browse the repository at this point in the history
Remove snippets de Markdown em comentáriso do `functions.php`
  • Loading branch information
claromes authored Apr 7, 2024
2 parents 4c4d9d9 + f33f63b commit 60a136a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 29 deletions.
25 changes: 1 addition & 24 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -779,14 +779,6 @@ function() {
);
}

/**
* Adiciona suporte a Markdown (via Jetpack) ao Órbita.
*/
function dez_markdown_custom_post() {
add_post_type_support( 'orbita_post', 'wpcom-markdown' );
}
add_action('init', 'dez_markdown_custom_post');

/**
* Aumenta o prazo de validade do login para 1 mês (sem marcar o “lembrar-me”) e 1 ano (marcando).
*/
Expand Down Expand Up @@ -830,19 +822,4 @@ function dez_dark_mode_script() {
wp_enqueue_script( 'dez-dark-mode', get_template_directory_uri() . '/js/darkMode.min.js', array() );
}

add_action( 'wp_enqueue_scripts', 'dez_dark_mode_script' );

/**
* Adiciona suporte a Markdown nos comentários
* Via https://akzhy.com/blog/markdown-comments-in-wordpress
*/
function comment_to_markdown( $comment_text, $comment = null ) {
include_once "parsedown.php";

$Parsedown = new Parsedown();
$Parsedown->setSafeMode(true);

$comment_text = $Parsedown->text($comment_text);
return $comment_text;
}
add_filter( 'comment_text', 'comment_to_markdown', 5, 2 );
add_action( 'wp_enqueue_scripts', 'dez_dark_mode_script' );
6 changes: 5 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.0
Stable tag: 3.0.1
License: GNU General Public License v2 or later
License URI: LICENSE

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

== Changelog ==

= 3.0.1 - April 7 2024 =
* Remove snippets de Markdown em comentáriso do `functions.php`
devido a falha na renderização de HTML nos comentários.

= 3.0 - April 2 2024 =
* Correção da chamada do littlefoot.js no `functions.php`
* Inclusão de Markdown nos comentários via `functions.php`
Expand Down
4 changes: 2 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://manualdousuario.net/
Author: Rodrigo Ghedin
Author URI: https://rodrigo.ghed.in/
Description: Manual do Usuário Theme
Version: 3.0
Version: 3.0.1
Tested up to: 8.1.12
Requires PHP: 5.6
License: GNU General Public License v2 or later
Expand Down Expand Up @@ -141,6 +141,7 @@ li {

img,
picture,
figure,
video,
canvas,
svg {
Expand Down Expand Up @@ -270,7 +271,6 @@ a.more-link,
a.comment-reply-link {
font-family: var(--ff-monospace);
font-size: var(--fs-0);
text-transform: capitalize;
line-height: 1.4;
}
a.comment-metadata {
Expand Down
Loading

0 comments on commit 60a136a

Please sign in to comment.