From 76402a87f366838bf06f6e36a552be43dfb5641c Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 4 Nov 2018 22:32:44 +0100 Subject: Removes dist/ folder. --- dist/functions.php | 243 ----------------------------------------------------- 1 file changed, 243 deletions(-) delete mode 100644 dist/functions.php (limited to 'dist/functions.php') diff --git a/dist/functions.php b/dist/functions.php deleted file mode 100644 index eb5f9f3..0000000 --- a/dist/functions.php +++ /dev/null @@ -1,243 +0,0 @@ -posts.post_date_gmt, '$now') > $wait "; - } - return $where; -} -add_filter('posts_where', 'Delay_RSS_After_Publish'); - -/** - * Deaktiviert REST-API und entfernt die Header aus dem HTML. - */ -add_filter('rest_enabled', '_return_false'); -add_filter('rest_jsonp_enabled', '_return_false'); -remove_action( 'wp_head', 'rest_output_link_wp_head', 10 ); -remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 ); - -/** - * Entfernt wlwmanifest.xml (Microsoft Live Writer) - */ -remove_action('wp_head', 'wlwmanifest_link'); -remove_action('wp_head', 'rsd_link'); - -/** - * Disable W3TC footer comment for everyone but Admins (single site & network mode) - */ -if ( !current_user_can( 'activate_plugins' ) ) { - add_filter( 'w3tc_can_print_comment', function( $w3tc_setting ) { return false; }, 10, 1 ); -} - -/** - * Add short code functionality to excerpts. - */ -add_filter( 'the_excerpt', 'shortcode_unautop'); -add_filter( 'the_excerpt', 'do_shortcode'); - -/** - * Adds short code: [glossar "Term"] - */ -function print_glossar_link( $atts ) { - if ( count($atts) == 2 ) { - $linktext = $atts[1]; - } else { - $linktext = $atts[0]; - } - return '' . htmlentities($linktext) . ''; -} -add_shortcode( "glossar", "print_glossar_link" ); - -/** - * Unsure if needed. -function wpsites_attachment_redirect(){ - global $post; - if ( is_attachment() && isset($post->post_parent) && is_numeric($post->post_parent) && ($post->post_parent != 0) ) { - - wp_redirect( get_permalink( $post->post_parent ), 301 ); - exit(); - wp_reset_postdata(); - } -} -*/ - -/** - * Remove tags from tag cloud with zero entries. - */ -function set_widget_tag_cloud_excluded_tags($args){ - $min_count = 1; - if ( "brennerei" == $args['taxonomy'] ) { - $min_count+=1; - } - $excluded_tags=get_tags_termid_to_exclude($args['taxonomy'], $min_count); - $my_args = array( 'exclude'=>$excluded_tags ); - $args = wp_parse_args( $args, $my_args ); - return $args; -} -function get_tags_termid_to_exclude($taxonomy, $max_excluded_count_value){ - $term_ids = array(); - foreach ( - get_terms( array( - 'taxonomy' => $taxonomy, - 'hide_empty' => true) ) - as $category ) - { - if ($category->count < $max_excluded_count_value ){ - $term_ids[]=$category->term_id; - } - } - return $term_ids; -} -add_filter( 'widget_tag_cloud_args', 'set_widget_tag_cloud_excluded_tags' ); - -/** - * Add Matomo support to tag cloud links. - */ -function modify_tag_cloud_add_piwik_class($args) { - $start_s = '