-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
executable file
·70 lines (46 loc) · 1.47 KB
/
functions.php
File metadata and controls
executable file
·70 lines (46 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
//Menue in Header and Footer
add_action( 'init', 'register_my_menus' );
function register_my_menus() {
register_nav_menus(array('header-menu' => __('Header Menu'),
'footer-menu' => __('Footer Menu')));
}
//enable SVG
function kb_svg ( $svg_mime ){
$svg_mime['svg'] = 'image/svg+xml';
return $svg_mime;
}
add_filter( 'upload_mimes', 'kb_svg' );
//add Class to next & previous Post Link
add_filter('next_posts_link_attributes', 'posts_link_attributes');
add_filter('previous_posts_link_attributes', 'posts_link_attributes');
//
function posts_link_attributes() {
return 'class="postnav window"';
}
//EmbeddedVideo
/*
function wp_embed_handler_video(){
return 'class="EmbeddedVideo_ist_cool"';
}
*/
//remove Image Size from Article
add_filter( 'post_thumbnail_html', 'remove_width_and_height_attribute', 10 );
add_filter( 'image_send_to_editor', 'remove_width_and_height_attribute', 10 );
function remove_width_and_height_attribute( $html ) {
return preg_replace( '/(height|width)="\d*"\s/', "", $html );
}
add_filter('gallery_style', create_function('$a', 'return "
<div class=\'gallery\'>";'));
//Widget-Area
function widgets_init() {
register_sidebar(array(
'name' => 'Footer',
'id' => 'Footer',
'before_title' => '<h2>',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'DM25_widgets_init' );
widgets_init();
?>