Add and update hooks

This commit is contained in:
Brian Miyaji
2015-09-22 21:40:44 +10:00
parent d8417c31d6
commit c3e0a68055
4 changed files with 11 additions and 8 deletions

View File

@@ -320,7 +320,7 @@ class SP_Admin_Meta_Boxes {
if ( is_int( wp_is_post_revision( $post ) ) ) return;
if ( is_int( wp_is_post_autosave( $post ) ) ) return;
if ( empty( $_POST['sportspress_meta_nonce'] ) || ! wp_verify_nonce( $_POST['sportspress_meta_nonce'], 'sportspress_save_data' ) ) return;
if ( ! current_user_can( 'edit_post', $post_id ) ) return;
if ( ! apply_filters( 'sportspress_user_can', current_user_can( 'edit_post', $post_id ), $post_id ) ) return;
if ( ! is_sp_post_type( $post->post_type ) && ! is_sp_config_type( $post->post_type ) ) return;
do_action( 'sportspress_process_' . $post->post_type . '_meta', $post_id, $post );