meta function update
This commit is contained in:
parent
f4c0ba7e72
commit
8540a0d1c6
|
@ -39,6 +39,23 @@ if ( ! class_exists( 'AddMetaBox' ) ) {
|
|||
|
||||
|
||||
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();
|
||||
$post_id = $this->get_post_id();
|
||||
|
@ -70,7 +87,7 @@ if ( ! class_exists( 'AddMetaBox' ) ) {
|
|||
endforeach;
|
||||
|
||||
endif;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue