-
Notifications
You must be signed in to change notification settings - Fork 0
Theme Support
File: classes/Theme/Support.php
This class handles turning on wordpress theme support. By default, everything is turned on.
Generally, anything that requires a call to add_theme_support() is covered, along with content_width and theme_scandir_exclusions.
The class currently has three public properties
Default: 1600
Can be overridden using the filter 'fluid_support_content_width'.
Default: 'css/editor-style.css'
Default: 'fluid'
A string that is used as a prefix for all applied filters, throughout this class.
Only the __construct method and the three hooked methods have public visibility. All other methods are protected.
Hooks into two actions, 'after_theme_setup' for method 'load_theme_support' and 'init' for method 'post_type_support', and hooks into one filter, 'theme_scandir_exclusions' for method 'theme_scandir_exclusions'.
Runs on the 'after_theme_setup' action. Uses an array to determine which theme support methods should be run. This array can be filtered using 'fluid_load_theme_support'.
Runs on the 'init' action. Calls add_post_type_support for both posts and pages. Has three filters: 'fluid_theme_post_type_support' applied after the feature array is initialized, 'fluid_theme_post_type_support_posts' applied before the add_post_type_support call for 'post', and 'fluid_theme_post_type_support_pages' applied before the call for 'page'. The post and page filters are independent from each other, although 'page-attributes' is added to the array just before the 'page' filter is applied.
Adds some directories for WordPress to exclude when scanning for files. Add more directories to the list if WordPress is looking for page templates. IMPORTANT: Check the directories being returned by this method if your page templates are not being found.
Most of the methods are named after the corresponding theme support option, with the dash being replaced by an underscore. Only the methods containing apply_filters calls are listed here.
filter: 'fluid_support_content_width'
filter: 'fluid_support_custom_background'
filter: 'fluid_support_custom_header'
filter: 'fluid_support_custom_logo'
filter: 'fluid_support_html5'
filter: 'fluid_support_post_formats'
This method also will add 'post-formats' to the array for 'post' in the method 'post_type_support'.
Provides an action, 'fluid_support_post_thumbnails', that can be used to add additional theme support for thumbnail sizes. This method also will add 'thumbnail' to the array for 'post' in the method 'post_type_support'.