What is the difference between following two codes? (Directly call a function and call a function using add_action)
function pp_submit__link_form(){
if(isset( $_POST['action']) && $_POST['action']="submit_link" ){
echo "Hello";
}
}
add_action( 'init', 'pp_submit__link_form' );
function pp_submit__link_form(){
if(isset( $_POST['pp_action']) && $_POST['pp_action']="submit_link" ){
echo "Hello";
}
}
pp_submit__link_form();