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

  1. @TODO

Language Filter: Coming Soon

Filters the @TODO. This filter was introduced in Wireframe 1.0.0.

// @TODO

Features Filters

  1. Custom Header
  2. Content Width
  3. Post Thumbnails
  4. Post Thumbnails Size
  5. Feed Links
  6. Nav Menus
  7. Post Formats
  8. Custom Background
  9. HTML5
  10. Custom Logo
  11. Title Tag
  12. 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

  1. Enqueue Style CSS

Enqueue Filter: Style CSS

Filters the Style CSS enqueue. This filter was introduced in Wireframe 1.0.0.

// @TODO

Navigation Filters

  1. @TODO

Navigation Filter: Coming Soon

Filters the @TODO. This filter was introduced in Wireframe 1.0.0.

// @TODO

Widgets Filters

  1. @TODO

Widgets Filter: Coming Soon

Filters the @TODO. This filter was introduced in Wireframe 1.0.0.

// @TODO

Editor Filters

  1. @TODO

Editor Filter: Coming Soon

Filters the @TODO. This filter was introduced in Wireframe 1.0.0.

// @TODO

Customizer Filters

  1. @TODO

Customizer Filter: Coming Soon

Filters the @TODO. This filter was introduced in Wireframe 1.0.0.

// @TODO