Let's say I have the following hook function:
function my_function() {
$post_type = isset( $_GET['post_type'] ) ? $_GET['post_type'] : '';
if( !isset( $_REQUEST['mode'] ) )
$_REQUEST['mode'] = ( $post_type == 'my_post_type' ) ? 'excerpt' : 'list';
}
add_action( 'load-edit.php', 'my_function', 10, 1 );
The fourth argument is (from WP Codex):
(int) (optional) The number of arguments the hooked function accepts. In WordPress 1.5.1+, hooked functions can take extra arguments that are set when the matching do_action() or apply_filters() call is run. For example, the action comment_id_not_found will pass any functions that hook onto it the ID of the requested comment.
Default: 1
The default value is 1, however I do not pass any arguments to the hook function.
Should I add an action like that?
add_action( 'load-edit.php', 'my_function', 10, 0 );