-
-
Save DavidPeralvarez/ba9dec25477cc8359ca936302367eb6d to your computer and use it in GitHub Desktop.
Solución al reto: Acciones y Filtros de Genesis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Child Theme customizations | |
*/ | |
// Modify "says" in comments | |
add_filter( 'comment_author_says_text', 'genesis_sample_comment_author_says_text' ); | |
function genesis_sample_comment_author_says_text( $text ){ | |
return __( 'thinks', 'genesis-sample' ); | |
} | |
// Delete tags from post meta | |
add_filter( 'genesis_post_meta', 'genesis_sample_post_meta' ); | |
function genesis_sample_post_meta( $post_meta ){ | |
return '[post_categories]'; | |
} | |
// Add comments policy | |
add_action( 'genesis_before_comment_form', 'genesis_sample_comments_policy' ); | |
function genesis_sample_comments_policy(){ | |
if( comments_open() ): | |
?> | |
<div class="comment-policy-box"> | |
<p><strong>Política de comentarios:</strong> Por favor, no seas pimpollo, está bien que te expreses líbremente, pero no ofendas a nadie con tu comentario o será fulminado con un rayo de la muerte.</p> | |
</div> | |
<?php | |
endif; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.comment-policy-box { | |
padding: 20px; | |
border: 1px solid #0073e5; | |
margin-bottom: 40px; | |
} | |
.comment-policy-box p { | |
margin-bottom: 0; | |
} | |
.comment-policy-box strong { | |
color: #0073e5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment