Getting error Parse error: syntax error, unexpected 'add_filter' (T_STRING), expecting function (T_FUNCTION)
I am getting error
Parse error: syntax error, unexpected 'add_filter' (T_STRING), expecting function (T_FUNCTION)
when i write the below code in my plugin class file. but this is the only easiest method i saw to get the screen options working. is that code needs to be placed somewhere else?
function pippin_set_screen_option($status, $option, $value) {
if ( 'pippin_per_page' == $option ) return $value;
}
add_filter('set-screen-option', 'pippin_set_screen_option', 10, 3);
Topic screen-columns screen-layout screen-options plugins Wordpress
Category Web