Parse error: syntax error, unexpected T_FUNCTION
-
Getting an error (Parse error: syntax error, unexpected T_FUNCTION) when I add custom conditions.
Here is my code:
add_filter( 'if_menu_conditions', 'my_new_menu_conditions' ); function my_new_menu_conditions( $conditions ) { $conditions[] = array( 'name' => 'If has current subscription', // name of the condition 'condition' => function() { // callback - must return TRUE or FALSE return current_user_can('has_current_subscription'); } ); return $conditions; }
Help!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Parse error: syntax error, unexpected T_FUNCTION’ is closed to new replies.