* @copyright 2015 Uitz-Mehler EDV-Dienstleistungen * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2 or later * @version 0.8 */ if ( ! isset( $content_width ) ) { $content_width = 945; } add_theme_support( 'menus' ); add_theme_support( 'automatic-feed-links'); $args = array( 'flex-height' => true, 'flex-width' => true, 'height' => 0, 'width' => 0, 'default-image' => get_template_directory_uri() . '/images/bg.png', 'uploads' => true, 'header-text' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', 'random-default' => false, 'default-text-color' => '#fff' ); add_theme_support( 'custom-header', $args ); add_theme_support( 'title-tag'); add_theme_support( 'default-image'); add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption', 'widgets' ) ); register_default_headers( array( 'grid' => array( 'url' => get_template_directory_uri() . '/images/bg.png', 'thumbnail_url' => get_template_directory_uri() . '/images/bg.png', 'description' => _x( 'Grid', 'header image description', 'bootflex' ) ), )); add_filter( 'use_default_gallery_style', '__return_false' ); function bootflex_enqueue_comment_reply() { if ( get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'comment_form_before', 'bootflex_enqueue_comment_reply' ); function bootflex_add_editor_styles() { add_editor_style(); } add_action( 'admin_init', 'bootflex_add_editor_styles' ); add_action( 'widgets_init', 'theme_bootflex_widgets_init' ); function theme_bootflex_widgets_init() { register_sidebar(array( 'before_widget' => '', 'before_title' => '
a little. Full reference of things you can show/remove is here: http://rjpargeter.com/2009/09/removing-wordpress-wp_head-elements/ remove_action('wp_head', 'wp_generator');// Removes the WordPress version as a layer of simple security add_theme_support('post-thumbnails'); add_image_size( 'bootflex-image', 750, 464, true ); // Bootstrap Menu Support require_once('inc/wp_bootstrap_navwalker.php'); function register_my_menu() { register_nav_menu('header-menu',__( 'Header Menu' )); } add_action( 'init', 'register_my_menu' ); // Language Support add_action('after_setup_theme', 'my_theme_setup'); function my_theme_setup(){ load_theme_textdomain('bootflex', get_template_directory() . '/lang'); } require get_template_directory() . '/inc/customizer.php'; add_filter( 'the_content_more_link', 'modify_read_more_link' ); function modify_read_more_link() { return ' …' . __('Read more', 'bootflex') . ' '; } add_theme_support( 'custom-background' ); add_filter('get_avatar','add_gravatar_class'); function add_gravatar_class($class) { $class = str_replace("class='avatar", "class='avatar img-rounded", $class); return $class; } /** * Breadcrumbs * * Prints full Bootstrap compatible HTML for breadcrumbs * */ function bootflex_breadcrumbs() { global $post; echo ''; } /** * Adds pagecount to breadcrumbs if needed * * @return string */ function bootflex_breadcrumbs_paged(){ $bootflex_myreturn = ''; if ( get_query_var('paged') ) { if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) $bootflex_myreturn .= ' ('; $bootflex_myreturn .= __('Page','bootflex') . ' ' . get_query_var('paged'); if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) $bootflex_myreturn .= ')'; } return $bootflex_myreturn; } /** * Adds Glyphs to known Widgets * * @param strin $title * @return string */ function widget_title_glyph( $title ) { if(!$title){ return '';} if( $title == "Categories" OR $title == "Kategorien") { return ' ' . $title; } elseif( $title == "Archive" OR $title == "Archives" ) { return ' ' . $title; } elseif( $title == "Letzte Beiträge" OR $title == "Recent Posts" ) { return ' ' . $title; } elseif( $title == "Letzte Kommentare" OR $title == "Recent Comments" ) { return ' ' . $title; } elseif( $title == "Schlagwörter" OR $title == "Tags" ) { return ' ' . $title; } elseif( $title == "Seiten" OR $title == "Pages" ) { return ' ' . $title; } elseif( $title == "Kalender" OR $title == "Calendar") { return ' ' . $title; } elseif( $title == "Meta") { return ' ' . $title; } elseif( strpos($title,'.com') OR strpos($title,'RSS') OR strpos($title,'.net') OR strpos($title,'.org') OR strpos($title,'.at') OR strpos($title,'.de')) { return ' ' . $title; } else { return ' ' . $title; } } add_filter( 'widget_title', 'widget_title_glyph' ); /** * Get first post with thumbs for frontpage * * @return Object Object with only one post */ function bootflex_get_first(){ $args = array( 'posts_per_page' => 1, 'offset' => 0, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => 'publish', 'post__not_in' => get_option( 'sticky_posts' ), 'meta_query' => array(array( 'key' => '_thumbnail_id', 'value' => '', 'compare' => '!=', )) ); $firstpost = new WP_Query( $args ); $posttemp = new stdClass(); $posttemp->post_id = $firstpost->post->ID; $posttemp->post_date = $firstpost->post->post_date; $posttemp->title = $firstpost->post->post_title; $thumb_id = (int)get_post_thumbnail_id($firstpost->post->ID); $posttemp->image = wp_get_attachment_image_src( $thumb_id, 'bootflex-image'); $posttemp->content = wp_trim_words( $firstpost->post->post_content, 33, ' …' . __('Read more', 'bootflex') . ' ' ); $posttemp->link = get_permalink($firstpost->post->ID); return $posttemp; }
comment_approved == '0' ) : ?>