__( 'Primary Menu' ), 'footer-menu' => __( 'Footer Menu' ), 'footer-cat-menu' => __( 'Footer Cat Menu' ) ) ); } add_action( 'init', 'menus' ); // add categories for attachments function add_options_to_attachments() { register_taxonomy_for_object_type( 'category', 'attachment' ); register_taxonomy_for_object_type( 'post_tag', 'attachment' ); add_post_type_support( 'attachment', 'custom-fields' ); add_post_type_support( 'page', 'excerpt' ); } add_action( 'init' , 'add_options_to_attachments' ); function the_short_string($string = '', $length) { echo mb_strimwidth($string, 0, $length, '…'); } function the_new_excerpt($postId = null) { $permalink = ' Mehr erfahren…'; $excerpt = mb_strimwidth(get_the_excerpt($postId), 0, 250); echo $excerpt . $permalink; } function the_new_meta() { $authorName = get_the_author_meta('first_name') . ' ' . get_the_author_meta('last_name'); if(!(get_the_author_meta('first_name') && get_the_author_meta('last_name'))) { $authorName = get_the_author_meta('display_name'); } echo ' ' . get_the_time( 'd. F Y' ) . ' '. $authorName .' '; } function the_new_thumbnail() { echo ' '; } function the_new_pagination($pages = '', $range = 2) { $showitems = ($range * 2) + 1; global $paged; if(empty($paged)) $paged = 1; if($pages == '') { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { // nav, ul echo ' '; // << arrows $laquoDisabled = ($paged > 1 && $showitems < $pages) ? '' : ' disabled'; echo ' • « Previous '; for ($i=1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) { $isActive = $paged == $i ? ' active' : ''; echo ' • ' . $i . ''; } } // >> arrows $raquoDisabled = ($paged < $pages && $showitems < $pages) ? '' : ' disabled'; echo ' • » Next '; // nav, ul echo ' '; } } function bs_all_news(){ $blogUrl = home_url('/blog/'); echo 'Alle Beiträge'; } add_filter('nav_menu_css_class', 'add_classes_on_li', 1, 3); function add_classes_on_li($classes, $item, $args) { $classes[] = 'nav-item'; return $classes; } remove_action( 'wp_head', 'rsd_link' ); remove_action( 'wp_head', 'wp_generator' ); remove_action( 'wp_head', 'feed_links', 2 ); remove_action( 'wp_head', 'index_rel_link' ); remove_action( 'wp_head', 'wlwmanifest_link' ); remove_action( 'wp_head', 'feed_links_extra', 3 ); remove_action( 'wp_head', 'start_post_rel_link', 10); remove_action( 'wp_head', 'parent_post_rel_link', 10); remove_action( 'wp_head', 'adjacent_posts_rel_link', 10); remove_action( 'wp_head', 'wp_shortlink_wp_head', 10); remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10); remove_action( 'wp_head', '_wp_render_title_tag', 1 ); remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'wp_print_styles', 'print_emoji_styles' ); function remove_json_api () { // Remove the REST API lines from the HTML Header remove_action( 'wp_head', 'rest_output_link_wp_head', 10 ); remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 ); // Remove the REST API endpoint. remove_action( 'rest_api_init', 'wp_oembed_register_route' ); // Turn off oEmbed auto discovery. add_filter( 'embed_oembed_discover', '__return_false' ); // Don't filter oEmbed results. remove_filter( 'oembed_dataparse', 'wp_filter_oembed_result', 10 ); // Remove oEmbed discovery links. remove_action( 'wp_head', 'wp_oembed_add_discovery_links' ); // Remove oEmbed-specific JavaScript from the front-end and back-end. remove_action( 'wp_head', 'wp_oembed_add_host_js' ); } add_action( 'after_setup_theme', 'remove_json_api' ); /** * Disables WordPress Rest API for external requests */ function disable_rest_api() { wp_redirect( home_url(), 301 ); exit; } add_action( 'rest_api_init', 'disable_rest_api', 1 ); Die Mär vom sicheren Schulweg | Stadtteilrat Barmbek Süd
Stadtteilrat Barmbek-Süd - Banner