php - Wordpress Plugin - T_FUNCTION Error - Why? -
i created wordpress plugin , friend of mine tried activate it. it's weird because don't error friend does. after pressing button gets following error:
parse error: syntax error, unexpected t_function in /home2/tomlibra/public_html/test/wp-content/plugins/ohhh_voting/inc/class-voting.php on line 49
this line 46-52 of file , can't find error:
if ( is_admin() ) { add_action( 'admin_menu', array( $this, 'register_admin_menu') ); //css add_action('admin_print_styles', function() { $mystylefile = plugins_url( 'css/voting_admin.css', dirname(__file__) ) ; wp_enqueue_style( 'stylesheet_voting',$mystylefile,false,'1.0'); });//add_action
this code within class, that's why use (array($this, 'register_admin_menu). line 49 one:
add_action('admin_print_styles', function() {
would glad if can me out. thanks!
anonymous
supported after on php 5.3 + consider updating php installation or avoid using it.
Comments
Post a Comment