-
Notifications
You must be signed in to change notification settings - Fork 6
Actions and Filters—Theme Configuration
ucfwp_init
ucfwp_define_customizer_sections
ucfwp_define_customizer_fields
ucfwp_kill_unused_templates
ucfwp_kill_unused_widgets
ucfwp_kill_comments
Hooks into: after_setup_theme
Priority: 10 (default)
Initialization functions to be fired early when WordPress loads the theme.
add_theme_support()
calls, image size registration, menu location registration, and sidebar registration take place in this hook.
Hooks into: customize_register
Priority: 10 (default)
Defines sections used in the WordPress Customizer.
Hooks into: customize_register
Priority: 10 (default)
Defines settings and controls used in the WordPress Customizer.
Hooks into: template_redirect
Priority: 10 (default)
Disables attachment pages, author pages, daily archive pages, search, and feeds; redirects requests for these pages to the homepage.
If your site requires any of the templates listed above, you should un-register this action in a child theme, like so:
// Your child theme's functions.php
function reenable_templates() {
remove_action( 'template_redirect', 'ucfwp_kill_unused_templates' );
}
add_action( 'after_setup_theme', 'reenable_templates' );
You can then optionally define your own custom behavior for the template_redirect
hook in your child theme if you'd like to still redirect some templates, or add your own custom template redirection behavior.
Hooks into: widgets_init
Priority: 10 (default)
Disable widgets that aren't supported by this theme.
Hooks into: init
Priority: 10 (default)
Provides an opinionated set of overrides for this theme that disables comments, trackbacks, and pingbacks sitewide, and hides references to comments in the WordPress admin to reduce clutter.
If your site requires comments, you should un-register this action in a child theme, like so:
// Your child theme's functions.php
function reenable_comments() {
remove_action( 'init', 'ucfwp_kill_comments' );
}
add_action( 'after_setup_theme', 'reenable_comments' );
Since the UCF WordPress Theme doesn't provide a comment template, your child theme will need to provide one in order to display comments. You'll also need to override the singular.php template, or create a single.php template that displays the comment template.
For more information, see the WordPress Theme Handbook article on comment templates.
Hooks into: upload_mimes
Priority: 10 (default)
Override's WordPress's default list of allowed file types in the media library to allow extra types when using this theme (svg, json).
Hooks into: wp_kses_allowed_html
Priority: 10
Overrides allowed HTML tags and their allowed attributes for HTML added to post content. In particular, this hook enables tags and attributes necessary for Athena component usage, and also re-enables other blacklisted elements for convenience, such as <iframe>
s.
Hooks into: attachment_link
Priority: 20
Modifies attachment links to point directly to individual files instead of single attachment views.
Takes effect only when the ucfwp_kill_unused_templates
hook is registered, and/or if the ucfwp_enable_attachment_link_rewrites
hook has been passed a custom value.
Hooks into: excerpt_more
Priority: 10 (default)
Modifies the string printed at the end of post excerpts.