Skip to content

Instantly share code, notes, and snippets.

View bizzthemes's full-sized avatar

BizzThemes bizzthemes

View GitHub Profile
@bizzthemes
bizzthemes / content-limit-html-tags.php
Created February 20, 2014 14:47
Add more HTML tags to content limited by character count
<?php
//* Do NOT include the opening php tag, only copy the code below
//* Add new HTML tags to content, limited by character count
add_filter( 'get_the_content_limit_allowedtags', 'custom_content_limit_allowedtags' );
function custom_content_limit_allowedtags() {
return '<ul>,<ol>,<li>,<script>,<style>';
}
@bizzthemes
bizzthemes / comments-link.php
Created December 10, 2014 12:29
Modify the comments link for the entry header
@bizzthemes
bizzthemes / comments-title.php
Created December 10, 2014 12:35
Modify the Comments title text on your site
<?php
//* Do NOT include the opening php tag, only copy the code below
//* Modify comments title text in comments
add_filter( 'bizznis_title_comments', 'custom_bizznis_title_comments' );
function custom_bizznis_title_comments() {
$title = '<h3>Comments</h3>';
return $title;
}
@bizzthemes
bizzthemes / trackbacks-title.php
Created December 10, 2014 12:38
Modify the Trackbacks title text on your site
<?php
//* Do NOT include the opening php tag, only copy the code below
//* Modify trackbacks title text in comments
add_filter( 'bizznis_title_pings', 'custom_bizznis_title_pings' );
function custom_bizznis_title_pings() {
echo '<h3>Trackbacks</h3>';
}
@bizzthemes
bizzthemes / comment-form-title.php
Created December 10, 2014 12:51
Modify the Comment form title text
<?php
//* Do NOT include the opening php tag
//* Modify the comment form title in comments
add_filter( 'comment_form_defaults', 'custom_comment_form_title' );
function custom_comment_form_title( $defaults ) {
$defaults['title_reply'] = 'Leave a Comment';
return $defaults;
}
@bizzthemes
bizzthemes / author-says.php
Created December 10, 2014 12:53
Modify the author says text
<?php
//* Do NOT include the opening php tag, only copy the code below
//* Modify the author says text in comments
add_filter( 'comment_author_says_text', 'custom_comment_author_says_text' );
function custom_comment_author_says_text() {
return 'author says';
}
@bizzthemes
bizzthemes / gravatar-size.php
Created December 10, 2014 12:55
Modify the size of the Gravatar
<?php
//* Do NOT include the opening php tag
//* Modify the size of the Gravatar in comments
add_filter( 'bizznis_comment_list_args', 'custom_comments_gravatar_size' );
function custom_comments_gravatar_size( $args ) {
$args['avatar_size'] = 52;
return $args;
}
@bizzthemes
bizzthemes / comment-submit-button.php
Created December 10, 2014 12:57
Modify the comment submit button text
<?php
//* Do NOT include the opening php tag
//* Customize the submit button text in comments
add_filter( 'comment_form_defaults', 'custom_comment_submit_button' );
function custom_comment_submit_button( $defaults ) {
$defaults['label_submit'] = 'Submit';
return $defaults;
}
@bizzthemes
bizzthemes / comment-policy.php
Created December 10, 2014 13:02
Add a comment policy box
<?php
//* Do NOT include the opening php tag
//* Add a comment policy box in comments
add_action( 'bizznis_comments', 'custom_comment_policy', 6 );
function custom_comment_policy() {
if ( is_single() && !is_user_logged_in() && comments_open() ) {
?>
<div class="comment-policy-box">
<p class="comment-policy"><small><strong>Comment Policy:</strong>Your words are your own, so be nice and helpful if you can. Please, only use your real name and limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.</small></p>
@bizzthemes
bizzthemes / allowed-tags.php
Created December 10, 2014 13:03
Remove the allowed tags text below the comment form
<?php
//* Do NOT include the opening php tag, only copy the code below
//* Remove comment form allowed tags
add_filter( 'comment_form_defaults', 'custom_remove_comment_form_allowed_tags' );
function custom_remove_comment_form_allowed_tags( $defaults ) {
$defaults['comment_notes_after'] = '';
return $defaults;
}