This repository was archived by the owner on Dec 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctions.php
More file actions
123 lines (103 loc) · 5.8 KB
/
functions.php
File metadata and controls
123 lines (103 loc) · 5.8 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
/*------------------------------------*\
Theme Support
\*------------------------------------*/
$homepage = get_page_by_title('Homepage');
if (isset($homepage) && $homepage){
update_option( 'page_on_front', $homepage->ID );
update_option( 'show_on_front', 'page' );
}
if (!isset($content_width))
{
$content_width = 900;
}
if (function_exists('add_theme_support'))
{
// Add Thumbnail Theme Support
add_theme_support('post-thumbnails');
add_image_size('avatar', 64, 64, true);
add_image_size('examples__thumbnail', 400, 300, true);
add_image_size('blog__thumbnail', 720, 200, true);
add_image_size('wrapper', 850, '', true);
add_image_size('wrapper-full', 1560, '', true);
// Enables post and comment RSS feed links to head
add_theme_support('automatic-feed-links');
// Enable HTML5 support
add_theme_support('html5', array('comment-list', 'comment-form', 'search-form', 'gallery', 'caption'));
// Localisation Support
load_theme_textdomain('html5blank', get_template_directory() . '/languages');
}
include_once ('includes/add_link_pattern_library.php');
include_once ('includes/add_post_connections.php');
/* include_once ('includes/add_scripts.php'); */
include_once ('includes/add_slug_body_class.php');
include_once ('includes/add_styles_animation.php');
include_once ('includes/add_styles.php');
include_once ('includes/add_svg_upload.php');
include_once ('includes/category_alphabetical_order.php');
include_once ('includes/comment_custom_gravatar.php');
include_once ('includes/comment_format.php');
include_once ('includes/comment_reply_link.php');
include_once ('includes/comment_threaded.php');
include_once ('includes/custom_post_category.php');
include_once ('includes/custom_post_dashboard_glance.php');
include_once ('includes/custom_post_gameexample.php');
include_once ('includes/custom_post_gameui.php');
/* include_once ('includes/login_force.php'); */
include_once ('includes/login_logo_url.php');
include_once ('includes/login_logo.php');
include_once ('includes/navigation_header.php');
include_once ('includes/navigation_pagination.php');
include_once ('includes/navigation_register.php');
include_once ('includes/plugin_required.php');
include_once ('includes/remove_admin_bar.php');
include_once ('includes/remove_admin_footer.php');
include_once ('includes/remove_category_relationship.php');
include_once ('includes/remove_jquery.php');
include_once ('includes/remove_navigation_attributes.php');
include_once ('includes/remove_navigation_div.php');
include_once ('includes/remove_recent_comments_styles.php');
include_once ('includes/remove_text_css.php');
include_once ('includes/remove_thumbnail_dimensions.php');
include_once ('includes/remove_wp_emoji.php');
include_once ('includes/shortcode_blog_latest.php');
include_once ('includes/shortcode_newsletter.php');
include_once ('includes/shortcode_posts.php');
include_once ('includes/acf_custom.php');
/*------------------------------------*\
Actions + Filters + ShortCodes
\*------------------------------------*/
// Add Actions
add_action('get_header', 'enable_threaded_comments'); // Enable Threaded Comments
add_action('wp_enqueue_scripts', 'gameui_styles'); // Add Theme Stylesheet
add_action('init', 'register_gameui_menu'); // Add HTML5 Blank Menu
add_action('init', 'create_post_type_gameui'); // Add our HTML5 Blank Custom Post Type
add_action('init', 'create_post_type_gameexample'); // Add our HTML5 Blank Custom Post Type
add_action('widgets_init', 'my_remove_recent_comments_style'); // Remove inline Recent Comment Styles from wp_head()
add_action('init', 'html5wp_pagination'); // Add our HTML5 Pagination
// Remove Actions
remove_action('wp_head', 'feed_links_extra', 3); // Display the links to the extra feeds such as category feeds
remove_action('wp_head', 'feed_links', 2); // Display the links to the general feeds: Post and Comment Feed
remove_action('wp_head', 'rsd_link'); // Display the link to the Really Simple Discovery service endpoint, EditURI link
remove_action('wp_head', 'wlwmanifest_link'); // Display the link to the Windows Live Writer manifest file.
remove_action('wp_head', 'index_rel_link'); // Index link
remove_action('wp_head', 'parent_post_rel_link', 10, 0); // Prev link
remove_action('wp_head', 'start_post_rel_link', 10, 0); // Start link
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); // Display relational links for the posts adjacent to the current post.
remove_action('wp_head', 'wp_generator'); // Display the XHTML generator that is generated on the wp_head hook, WP version
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
remove_action('wp_head', 'rel_canonical');
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
// Add Filters
add_filter('body_class', 'add_slug_to_body_class'); // Add slug to body class (Starkers build)
add_filter('widget_text', 'shortcode_unautop'); // Remove <p> tags in Dynamic Sidebars (better!)
add_filter('wp_nav_menu_args', 'my_wp_nav_menu_args'); // Remove surrounding <div> from WP Navigation
add_filter('the_category', 'remove_category_rel_from_category_list'); // Remove invalid rel attribute
add_filter('the_excerpt', 'shortcode_unautop'); // Remove auto <p> tags in Excerpt (Manual Excerpts only)
add_filter('the_excerpt', 'do_shortcode'); // Allows Shortcodes to be executed in Excerpt (Manual Excerpts only)
add_filter('show_admin_bar', 'remove_admin_bar'); // Remove Admin bar
add_filter('style_loader_tag', 'html5_style_remove'); // Remove 'text/css' from enqueued stylesheet
add_filter('post_thumbnail_html', 'remove_thumbnail_dimensions', 10); // Remove width and height dynamic attributes to thumbnails
add_filter('image_send_to_editor', 'remove_thumbnail_dimensions', 10); // Remove width and height dynamic attributes to post images
// Remove Filters
remove_filter('the_excerpt', 'wpautop'); // Remove <p> tags from Excerpt altogether