Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add support for bbPress in the Theme Layouts extension.

git-svn-id: http://svn.locallylost.com/themes/hybrid-core/trunk@954 dba0f204-706d-4bc1-bc29-8b92e0485636
  • Loading branch information...
commit 259bcf59017ba9ed3d92182c85b1a104cd55bd4e 1 parent b510dfb
greenshady authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 extensions/theme-layouts.php
View
14 extensions/theme-layouts.php
@@ -31,6 +31,7 @@
/* Add post type support for theme layouts. */
add_action( 'init', 'theme_layouts_add_post_type_support' );
+add_action( 'init', 'theme_layouts_remove_post_type_support' );
/* Set up the custom post layouts. */
add_action( 'admin_menu', 'theme_layouts_admin_setup' );
@@ -83,6 +84,19 @@ function theme_layouts_add_post_type_support() {
}
/**
+ * Removes theme layouts support from specific post types created by plugins.
+ *
+ * @since 0.4.0
+ * @return void
+ */
+function theme_layouts_remove_post_type_support() {
+
+ /* Removes theme layouts support of the bbPress 'reply' post type. */
+ if ( function_exists( 'bbp_get_reply_post_type' ) )
+ remove_post_type_support( bbp_get_reply_post_type(), 'theme-layouts' );
+}
+
+/**
* Gets the layout for the current post based off the 'Layout' custom field key if viewing a singular post
* entry. All other pages are given a default layout of 'layout-default'.
*
Please sign in to comment.
Something went wrong with that request. Please try again.