-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
81 lines (72 loc) · 3.43 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
77
78
79
80
81
<?php
//* Start the engine
require_once( get_template_directory() . '/lib/init.php' );
require ('inc/theme_functions.php');
//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', 'Bethel, Clydach' );
define( 'CHILD_THEME_URL', 'http://www.markbarnes.net/' );
define( 'CHILD_THEME_VERSION', '0.11.1' );
/**
* Add theme support
*/
add_theme_support( 'html5', array('comment-list', 'comment-form', 'search-form', 'gallery', 'caption'));
add_theme_support( 'custom-background', bethel_get_default_background_args()); //* Add support for custom background
add_theme_support( 'genesis-footer-widgets', 3 ); //* Add support for 3-column footer widgets
/**
* Remove default actions
*/
remove_action( 'wp_head', 'genesis_load_favicon' ); // Don't use the default favicon
remove_action( 'genesis_meta', 'genesis_responsive_viewport' ); // Turn off responsive stylying
remove_action( 'genesis_site_title', 'genesis_seo_site_title' ); // Remove the site title
remove_action( 'genesis_site_description', 'genesis_seo_site_description' ); // Remove the subtitle
remove_action( 'genesis_after_header', 'genesis_do_subnav' ); // Remove the subnav from below the header
remove_action( 'genesis_footer', 'genesis_do_footer' ); // Remove the default footer
/**
* Add actions
*/
add_action ('wp_head', 'bethel_add_gallery_filters');
add_action( 'wp_enqueue_scripts', 'bethel_enqueue_fonts' ); // Enqueue fonts
add_action( 'wp_enqueue_scripts', 'bethel_add_frontend_javascript' );
add_action ('admin_enqueue_scripts', 'bethel_admin_enqueue_fonts');
add_action ('login_enqueue_scripts', 'bethel_add_login_logo'); // Add CSS for login logo
add_action( 'genesis_meta', 'bethel_add_favicons'); // Add favicons
add_action( 'genesis_meta', 'bethel_add_viewport' );
add_action( 'genesis_site_title', 'bethel_do_logo' , 10); // Add the logo header
add_action( 'genesis_site_title', 'bethel_do_header_right_top', 11); // Add "next on"
add_action( 'genesis_site_title', 'genesis_do_subnav', 12); // Add subnav
add_action( 'genesis_after_header', 'bethel_filter_menu_items', 0 );
add_action( 'genesis_after_header', 'bethel_stop_filtering_menu_items', 15 );
add_action ('genesis_entry_header', 'bethel_add_image_to_stories', 9);
add_action( 'genesis_entry_content', 'bethel_add_submenu_to_post', 9);
add_action ('genesis_footer', 'bethel_do_footer_bottom');
add_action ('genesis_meta', 'bethel_add_image_to_pages', 11);
add_action ('admin_head', 'bethel_add_favicons');
add_action ('admin_head', 'bethel_add_admin_css');
add_action ('template_redirect', 'bethel_custom_template');
add_action ('genesis_after_footer', 'bethel_move_jquery');
/**
* Add filters
*/
add_filter ('wp_nav_menu_args', 'bethel_restrict_depth_of_primary_menu'); // Restricts the menu menu to two levels
add_filter ('image_size_names_choose', 'bethel_choose_image_sizes');
add_filter ('genesis_edit_post_link', create_function ('$args', 'return false;'));
add_filter ('sidebars_widgets', 'bethel_randomize_widget_order');
add_filter ('widget_text', 'do_shortcode');
/**
* Add image sizes
*/
add_image_size ('bethel_narrow_column', 360);
add_image_size ('bethel_column_width', 400);
add_image_size ('bethel_full_width', 720);
add_image_size ('bethel_supersize', 800);
add_image_size ('bethel_fullscreen', 1920, 1080);
/**
* Register widget areas
*/
bethel_register_widget_areas();
/**
* Add shortcodes
*/
add_shortcode ('pullquote', 'bethel_pullquote');
add_shortcode ('gallery_list', 'bethel_gallery_list' );
add_shortcode ('admin_url', 'bethel_admin_url');