@@ 949-964 (lines=16) @@ | ||
946 | * @since 1.8.8 |
|
947 | */ |
|
948 | function give_get_meta( $id, $meta_key = '', $single = false, $default = false, $meta_type = '' ) { |
|
949 | switch ( $meta_type ) { |
|
950 | case 'donation': |
|
951 | $meta_value = Give()->payment_meta->get_meta( $id, $meta_key, $single ); |
|
952 | break; |
|
953 | ||
954 | case 'form': |
|
955 | $meta_value = Give()->form_meta->get_meta( $id, $meta_key, $single ); |
|
956 | break; |
|
957 | ||
958 | case 'donor': |
|
959 | $meta_value = Give()->donor_meta->get_meta( $id, $meta_key, $single ); |
|
960 | break; |
|
961 | ||
962 | default: |
|
963 | $meta_value = get_post_meta( $id, $meta_key, $single ); |
|
964 | } |
|
965 | ||
966 | /** |
|
967 | * Filter the meta value |
|
@@ 1030-1045 (lines=16) @@ | ||
1027 | * @since 1.8.8 |
|
1028 | */ |
|
1029 | function give_delete_meta( $id, $meta_key, $meta_value = '', $meta_type = '' ) { |
|
1030 | switch ( $meta_type ) { |
|
1031 | case 'donation': |
|
1032 | $status = Give()->payment_meta->delete_meta( $id, $meta_key, $meta_value ); |
|
1033 | break; |
|
1034 | ||
1035 | case 'form': |
|
1036 | $status = Give()->form_meta->delete_meta( $id, $meta_key, $meta_value ); |
|
1037 | break; |
|
1038 | ||
1039 | case 'donor': |
|
1040 | $status = Give()->donor_meta->delete_meta( $id, $meta_key, $meta_value ); |
|
1041 | break; |
|
1042 | ||
1043 | default: |
|
1044 | $status = delete_post_meta( $id, $meta_key, $meta_value ); |
|
1045 | } |
|
1046 | ||
1047 | /** |
|
1048 | * Filter the meta value delete status |