-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
76 lines (67 loc) · 2.11 KB
/
functions.php
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
<?php
/*
Author: Emil Broll
URL: htp://twitter.com/EmilBroll
This is where you can drop your custom functions or
just edit things like thumbnail sizes, header images,
sidebars, comments, ect.
*/
/************* INCLUDE NEEDED FILES ***************/
/*
1. library/bones.php
- head cleanup (remove rsd, uri links, junk css, ect)
- enqueueing scripts & styles
- theme support functions
- custom menu output & fallbacks
- related post function
- page-navi function
- removing <p> from around images
- customizing the post excerpt
- custom google+ integration
- adding custom fields to user profiles
*/
require_once( 'library/bones.php' ); // if you remove this, bones will break
/*
2. library/custom-post-type.php
- an example custom post type
- example custom taxonomy (like categories)
- example custom taxonomy (like tags)
*/
require_once( 'library/post-types.php' ); // you can disable this if you like
/*
3. library/admin.php
- removing some default WordPress dashboard widgets
- an example custom dashboard widget
- adding custom login css
- changing text in footer of admin
*/
// require_once( 'library/admin.php' ); // this comes turned off by default
/*
4. library/translation/translation.php
- adding support for other languages
*/
// require_once( 'library/translation/translation.php' ); // this comes turned off by default
/************* THUMBNAIL SIZE OPTIONS *************/
// Thumbnail sizes
add_image_size( 'bones-thumb-2560', 2880, 0, false );
add_image_size( 'bones-thumb-1920', 1920, 0, false );
add_image_size( 'bones-thumb-912', 912, 0, false );
add_image_size( 'bones-thumb-456', 456, 0, false );
function bones_image_sizes($sizes) {
unset($sizes['medium']);
unset($sizes['large']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'bones_image_sizes');
@ini_set( 'upload_max_size' , '100M' );
@ini_set( 'post_max_size', '100M');
@ini_set( 'max_execution_time', '500' );
add_filter( 'wp_title', 'baw_hack_wp_title_for_home' );
function baw_hack_wp_title_for_home( $title )
{
if( empty( $title ) && ( is_home() || is_front_page() ) ) {
return; //get_bloginfo('name');
}
return $title;
}
?>