meta function update

This commit is contained in:
magepeopleteam 2020-12-22 06:20:56 +00:00
parent f4c0ba7e72
commit 8540a0d1c6
1 changed files with 18 additions and 1 deletions

View File

@ -39,6 +39,23 @@ if ( ! class_exists( 'AddMetaBox' ) ) {
public function save_post( $post_id ) { public function save_post( $post_id ) {
if (!isset($_POST['mep_event_ricn_text_nonce']) || !wp_verify_nonce($_POST['mep_event_ricn_text_nonce'], 'mep_event_ricn_text_nonce')) {
return;
}
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
return;
}
if (!current_user_can('edit_post', $post_id)) {
return;
}
/**
* If the saving post is event then go on
*/
if (get_post_type($post_id) == 'mep_events') {
$get_option_name = $this->get_option_name(); $get_option_name = $this->get_option_name();
$post_id = $this->get_post_id(); $post_id = $this->get_post_id();
@ -70,7 +87,7 @@ if ( ! class_exists( 'AddMetaBox' ) ) {
endforeach; endforeach;
endif; endif;
}
} }