/
functions.php
executable file
·53 lines (37 loc) · 1.98 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
<?php
// ===== CORE THEME INCLUDES
// ================================================================================
require_once('library/theme-includes/bones.php');
require_once('library/theme-includes/admin.php');
require_once('library/theme-includes/functions.php');
require_once('library/custom-post-type/design-project.php');
require_once('library/custom-post-type/employee.php');
require_once('library/custom-post-type/portfolio.php');
// ===== INITIALIZE
// ================================================================================
function bones_ahoy() {
add_action('init', 'bones_head_cleanup'); // launching operation cleanup
add_filter('the_generator', 'bones_rss_version'); // remove WP version from RSS
add_filter('wp_head', 'bones_remove_wp_widget_recent_comments_style', 1); // remove injected css for recent comments widget
add_action('wp_head', 'bones_remove_recent_comments_style', 1); // clean up comment styles in the head
add_filter('gallery_style', 'bones_gallery_style'); // clean up gallery output in wp
add_action('wp_enqueue_scripts', 'bones_scripts_and_styles', 999);
bones_theme_support();
add_filter('the_content', 'bones_filter_ptags_on_images'); // cleaning up random code around images
add_filter('excerpt_more', 'bones_excerpt_more'); // cleaning up excerpt
}
add_action('after_setup_theme', 'bones_ahoy');
// ===== CUSTOM THUMBNAIL IMAGE SIZES
// ================================================================================
// The following image sizes will automatically be created whenever new images
// are added to the media manager.
add_image_size('portfolio-thumb', 300, 9999);
// The following function adds the ability to use the dropdown menu to select
// the new images sizes you have just created from within the media manager.
function bones_custom_image_sizes($sizes) {
return array_merge($sizes, array(
'portfolio-thumb' => 'Portfolio Thumbnail (300px x ?)',
));
}
add_filter('image_size_names_choose', 'bones_custom_image_sizes');
?>