Wireframe Hooks - mixatheme/Wireframe GitHub Wiki
NOTE: THIS WIKI PAGE WAS WRITTEN WAY BACK IN 2015 FOR WIREFRAME ALPHA. WE ARE CURRENTLY IN THE PROCESS OF UPDATING THESE DOCS HOPEFULLY FOR A JUNE 2017 RELEASE. THANK YOU FOR YOUR PATIENCE.
Filters
Many of Wireframe's functionality can be hooked with Filters. Below is the current up-to-date list of Filters available to Child themes. Copy a filter to your Child theme's functions.php
then modify any of the arguments in the filter.
- Language Filters
- Features Filters
- Enqueue Filters
- Navigation Filters
- Widgets Filters
- Editor Filters
- Customizer Filters
Language Filters
Language Filter: Coming Soon
Filters the @TODO. This filter was introduced in Wireframe 1.0.0.
// @TODO
Features Filters
- Custom Header
- Content Width
- Post Thumbnails
- Post Thumbnails Size
- Feed Links
- Nav Menus
- Post Formats
- Custom Background
- HTML5
- Custom Logo
- Title Tag
- Selective Refresh
Features Filter: Content Width
Filters the $content_width feature. This filter was introduced in Wireframe 1.0.0.
function wireframe_filter_content_width() {
$content_width = 820;
return $content_width;
}
add_filter( 'wireframe_content_width', 'wireframe_filter_content_width' );
Features Filter: Post Thumbnails
Filters the Post Thumbnails feature. This filter was introduced in Wireframe 1.0.0.
function wireframe_filter_post_thumbnails() {
$post_thumbnails = array(
'post',
'page',
'download',
'events',
'products',
);
return $post_thumbnails;
}
add_filter( 'wireframe_post_thumbnails', 'wireframe_filter_post_thumbnails' );
Features Filter: Post Thumbnails Size
Filters the Post Thumbnails Size feature. This filter was introduced in Wireframe 1.0.0.
function wireframe_filter_post_thumbnails_size() {
$post_thumbnails_size = array(
'width' => 150,
'height' => 150,
'crop' => array( 'top', 'left' ),
);
return $post_thumbnails_size;
}
add_filter( 'wireframe_post_thumbnails_size', 'wireframe_filter_post_thumbnails_size' );
Features Filter: Feed Links
Filters the Automatic Feed Links feature. This filter was introduced in Wireframe 1.0.0.
function wireframe_filter_feed_links() {
$feed_links = true;
return $feed_links;
}
add_filter( 'wireframe_feed_links', 'wireframe_filter_feed_links' );
Features Filter: Nav Menus
Filters the Nav Menus feature. This filter was introduced in Wireframe 1.0.0.
function wireframe_filter_nav_menus() {
$nav_menus = array(
'primary' => __( 'Primary Menu', 'wireframe' ),
'secondary' => __( 'Secondary Menu', 'wireframe' ),
'social' => __( 'Social Links Menu', 'wireframe' ),
);
return $nav_menus;
}
add_filter( 'wireframe_nav_menus', 'wireframe_filter_nav_menus' );
Features Filter: Post Formats
Filters the Post Formats feature. This filter was introduced in Wireframe 1.0.0.
function wireframe_filter_post_formats() {
$post_formats = array(
'aside',
'image',
'video',
'quote',
'link',
'gallery',
'status',
'audio',
'chat',
);
return $post_formats;
}
add_filter( 'wireframe_post_formats', 'wireframe_filter_post_formats' );
Features Filter: Custom Background
Filters the Custom Background feature. This filter was introduced in Wireframe 1.0.0.
function wireframe_filter_custom_background() {
$custom_background = array(
'default-color' => 'ffffff',
'default-image' => '',
'wp-head-callback' => '_custom_background_cb',
'admin-head-callback' => '',
'admin-preview-callback' => '',
);
return $custom_background;
}
add_filter( 'wireframe_custom_background', 'wireframe_filter_custom_background' );
Features Filter: HTML5
Filters the HTML5 feature. This filter was introduced in Wireframe 1.0.0.
function wireframe_filter_html5() {
$html5 = array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
);
return $html5;
}
add_filter( 'wireframe_html5', 'wireframe_filter_html5' );
Features Filter: Custom Logo
Filters the Custom Logo feature. This filter was introduced in Wireframe 1.0.0.
function wireframe_filter_custom_logo() {
$custom_logo = array(
'height' => 100,
'width' => 400,
'flex-height' => true,
'flex-width' => true,
'header-text' => array(
'site-title',
'site-description',
),
);
return $custom_logo;
}
add_filter( 'wireframe_custom_logo', 'wireframe_filter_custom_logo' );
Features Filter: Title Tag
Filters the Title Tag feature. This filter was introduced in Wireframe 1.0.0.
function wireframe_filter_title_tag() {
$title_tag = true;
return $title_tag;
}
add_filter( 'wireframe_title_tag', 'wireframe_filter_title_tag' );
Features Filter: Selective Refresh
Filters the Selective Refresh feature. This filter was introduced in Wireframe 1.0.0.
function wireframe_filter_selective_refresh() {
$selective_refresh = true;
return $selective_refresh;
}
add_filter( 'wireframe_selective_refresh', 'wireframe_filter_selective_refresh' );
Enqueue Filters
Enqueue Filter: Style CSS
Filters the Style CSS enqueue. This filter was introduced in Wireframe 1.0.0.
// @TODO
Navigation Filters
Navigation Filter: Coming Soon
Filters the @TODO. This filter was introduced in Wireframe 1.0.0.
// @TODO
Widgets Filters
Widgets Filter: Coming Soon
Filters the @TODO. This filter was introduced in Wireframe 1.0.0.
// @TODO
Editor Filters
Editor Filter: Coming Soon
Filters the @TODO. This filter was introduced in Wireframe 1.0.0.
// @TODO
Customizer Filters
Customizer Filter: Coming Soon
Filters the @TODO. This filter was introduced in Wireframe 1.0.0.
// @TODO