Hi guys,
Ik heb even een vraagje. Ik krijg een Warning in beeld op een WP website.
Quote:
Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in [naam locatie] on line 30
Codeblok (voorbeeld.php):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* Single Product tabs
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.0.0
*/
if ( ! defined( ABSPATH ) ) exit; // Exit if accessed directly
/**
* Filter tabs and allow third parties to add their own
*
* Each tab is an array containing title, callback and priority.
* @see woocommerce_default_product_tabs()
*/
$tabs = apply_filters( woocommerce_product_tabs, array() );
if ( ! empty( $tabs ) ) : ?>
foreach ( $tabs as $key => $tab ) : ?>
endforeach; ?>
endif; ?>
Wat gaat er fout? Zelf kan ik namelijk geen PHP, dus daarom vraag ik het hier.
Alvast bedankt.
Groet,
Patrick
Ik heb even een vraagje. Ik krijg een Warning in beeld op een WP website.
Quote:
Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in [naam locatie] on line 30
Codeblok (voorbeeld.php):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* Single Product tabs
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.0.0
*/
if ( ! defined( ABSPATH ) ) exit; // Exit if accessed directly
/**
* Filter tabs and allow third parties to add their own
*
* Each tab is an array containing title, callback and priority.
* @see woocommerce_default_product_tabs()
*/
$tabs = apply_filters( woocommerce_product_tabs, array() );
if ( ! empty( $tabs ) ) : ?>
foreach ( $tabs as $key => $tab ) : ?>
echo $key ?>" class="section clearfix">
echo apply_filters( woocommerce_product_ . $key . _tab_title, $tab[title], $key ) ?>
call_user_func( $tab[callback], $key, $tab ) ?>
endforeach; ?>
endif; ?>
Wat gaat er fout? Zelf kan ik namelijk geen PHP, dus daarom vraag ik het hier.
Alvast bedankt.
Groet,
Patrick