Пример #1
0
 public function check_name_custom_field($data)
 {
     global $mf_domain;
     $name = $data['field_name'];
     $post_type = $data['post_type'];
     $id = $data['field_id'];
     $resp = array('success' => 1);
     $check = mf_custom_fields::check_group($name, $post_type, $id);
     if ($check) {
         $resp = array('success' => 0, 'msg' => __('The name of Field exist in this post type, Please choose a different name.', $mf_domain));
     }
     echo json_encode($resp);
 }