Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix PHP warning when breadcrumb support is off

The breadcrumb action should only run if the theme supports
`breadcrumb-trail`.
Removes the `call_user_func_array() expects parameter 1 to be a valid
callback` warning
  • Loading branch information...
commit 9818c860f33984e33f83b9a70fe4bcd672c501f5 1 parent f5b2dac
@jayj authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 functions.php
View
6 functions.php
@@ -132,8 +132,10 @@ function cakifo_theme_setup() {
add_action( 'template_redirect', 'cakifo_one_column' );
/* Add the breadcrumb trail just after the container is open */
- add_action( "{$prefix}_open_main", 'breadcrumb_trail' );
- add_filter( 'breadcrumb_trail_args', 'cakifo_breadcrumb_trail_args' );
+ if ( current_theme_supports( 'breadcrumb-trail' ) ) {
+ add_action( "{$prefix}_open_main", 'breadcrumb_trail' );
+ add_filter( 'breadcrumb_trail_args', 'cakifo_breadcrumb_trail_args' );
+ }
/* Frontpage javascript loading */
add_action( 'template_redirect', 'cakifo_front_page' );
Please sign in to comment.
Something went wrong with that request. Please try again.