-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
83 lines (66 loc) · 2.31 KB
/
functions.php
File metadata and controls
83 lines (66 loc) · 2.31 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
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/**
* @package WordPress
* @subpackage Twenty_Seventeen_mm
* @since 1.0
* @version 1.0
* @author Martin Muehlhaeuser
*/
include 'recent-post-widget.php';
include 'tags-widget.php';
add_action( 'after_setup_theme', 'mmone_theme_setup', 11 );
function mmone_theme_setup() {
set_post_thumbnail_size( 150, 150, true );
// for the featured post slider
add_image_size( 'featured-thumb', 500, 281, true);
// for the recent post panes
add_image_size( 'recent-post-thumb', 250, 141, true );
}
add_action( 'wp_enqueue_scripts', 'mmone_enqueue_styles' );
function mmone_enqueue_styles() {
$parent_style = 'twentyseventeen-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
/* rewrite rule for globalexplorer */
add_action('generate_rewrite_rules', 'geotags_add_rewrite_rules');
function geotags_add_rewrite_rules( $wp_rewrite ) {
$new_rules = array(
'dreizehn.swf' => 'index.php?p=2344' . $wp_rewrite->preg_index(1) );
$wp_rewrite->rules = $new_rules + $wp_rewrite->rules;
}
add_action( 'widgets_init', function() {
register_widget( 'RecentPostWidget' );
register_widget( 'TagsWidget' );
} );
function mmone_include_svg_icons() {
$custom_svg_icons = get_theme_file_path( '/assets/images/custom-svg-icons.svg' );
if ( file_exists( $custom_svg_icons ) ) {
require_once( $custom_svg_icons );
}
}
add_action( 'wp_footer', 'mmone_include_svg_icons', 99999 );
function mmone_social_links_icons( $social_links_icons ) {
$social_links_icons['mmone.de'] = 'pencil';
$social_links_icons['500px.com'] = '500px';
$social_links_icons['thingiverse.com'] = 'thingiverse';
return $social_links_icons;
}
add_filter( 'twentyseventeen_social_links_icons', 'mmone_social_links_icons' );
function mmone_widgets_init() {
register_sidebar(array(
'name' => 'Top Navi Right',
'id' => 'mmone_top_nav',
'description' => 'Widget area right side of the main menu',
'before_widget' => '<div class="mmone-top-widgets">',
'after_widget' => '</div>',
'before_title' => '',
'after_title' => '',
) );
}
add_action( 'widgets_init', 'mmone_widgets_init' );
?>