' : ''; echo '
' . $output . '
'; echo $output; } // Custom View Article link to Post function the90sretro_blank_view_article( $more ) { global $post; return '... ' . esc_html__( 'Read More', 'the90sretro' ) . ''; } // Remove 'text/css' from our enqueued stylesheet function the90sretro_style_remove( $tag ) { return preg_replace( '~\s+type=["\'][^"\']++["\']~', '', $tag ); } // Remove thumbnail width and height dimensions that prevent fluid images in the_thumbnail function remove_thumbnail_dimensions( $html ) { $html = preg_replace( '/(width|height)=\"\d*\"\s/', '', $html ); return $html; } // Custom Gravatar in Settings > Discussion function the90sretrogravatar ( $avatar_defaults ) { $myavatar = get_template_directory_uri() . '/img/gravatar.jpg'; $avatar_defaults[$myavatar] = 'Custom Gravatar'; return $avatar_defaults; } // Threaded Comments function enable_threaded_comments() { if ( ! is_admin() ) { if ( is_singular() AND comments_open() AND ( get_option( 'thread_comments' ) == 1 ) ) { wp_enqueue_script( 'comment-reply' ); } } } // Custom Comments Callback function the90sretrocomments( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; extract( $args, EXTR_SKIP ); if ( 'div' == $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ?> < id="comment-">
tags in Dynamic Sidebars (better!) add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' ); // Remove surrounding
tags in Excerpt (Manual Excerpts only) add_filter( 'the_excerpt', 'do_shortcode' ); // Allows Shortcodes to be executed in Excerpt (Manual Excerpts only) add_filter( 'excerpt_more', 'the90sretro_blank_view_article' ); // Add 'View Article' button instead of [...] for Excerpts add_filter( 'style_loader_tag', 'the90sretro_style_remove' ); // Remove 'text/css' from enqueued stylesheet add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10 ); // Remove width and height dynamic attributes to thumbnails add_filter( 'post_thumbnail_html', 'the90sretro_remove_width_attribute', 10 ); // Remove width and height dynamic attributes to post images add_filter( 'image_send_to_editor', 'the90sretro_remove_width_attribute', 10 ); // Remove width and height dynamic attributes to post images add_filter( 'wp_title', 'the90sretro_get_the_title'); // Remove Filters remove_filter( 'the_excerpt', 'wpautop' ); // Remove
tags from Excerpt altogether /*------------------------------------*\ ShortCode Functions \*------------------------------------*/ // Shortcode Demo with Nested Capability function the90sretro_shortcode_demo( $atts, $content = null ) { return '
';
}
}
function the90sretro_print_gif3_if_enabled() {
if (get_option('the90sretro_display_gifs') == 1) {
echo '
';
}
}
function the90sretro_return_gif1_if_enabled() {
if (get_option('the90sretro_display_gifs') == 1) {
return '
';
}
return NULL;
}
function the90sretro_prefix_remove_css_section( $wp_customize ) {
$wp_customize->remove_section( 'custom_css' );
}
function the90sretro_get_the_title($title) {
if (is_front_page()) {
return get_bloginfo('name');
}
global $post;
return $post->post_title;
}