|
@@ 1013-1022 (lines=10) @@
|
| 1010 |
|
} |
| 1011 |
|
|
| 1012 |
|
//if the item author is set and the user is the author... |
| 1013 |
|
if ( $obj->wp_user() && $user_id == $obj->wp_user() ) { |
| 1014 |
|
$caps[] = $cap; |
| 1015 |
|
} elseif ( $status_obj->private && ! empty( $this->private_cap ) ) { |
| 1016 |
|
//the user is trying to view someone else's obj |
| 1017 |
|
$caps[] = $this->private_cap; |
| 1018 |
|
} elseif ( ! empty( $this->others_cap ) ) { |
| 1019 |
|
$caps[] = $this->others_cap; |
| 1020 |
|
} else { |
| 1021 |
|
$caps[] = $cap; |
| 1022 |
|
} |
| 1023 |
|
} else { |
| 1024 |
|
//not a cpt object so handled differently |
| 1025 |
|
if ( method_exists( $obj, 'wp_user' ) && $obj->wp_user() && $user_id == $obj->wp_user() ) { |
|
@@ 1023-1034 (lines=12) @@
|
| 1020 |
|
} else { |
| 1021 |
|
$caps[] = $cap; |
| 1022 |
|
} |
| 1023 |
|
} else { |
| 1024 |
|
//not a cpt object so handled differently |
| 1025 |
|
if ( method_exists( $obj, 'wp_user' ) && $obj->wp_user() && $user_id == $obj->wp_user() ) { |
| 1026 |
|
$caps[] = $cap; |
| 1027 |
|
} elseif ( ! empty( $this->private_cap ) ) { |
| 1028 |
|
$caps[] = $this->private_cap; |
| 1029 |
|
} elseif ( ! empty( $this->others_cap ) ) { |
| 1030 |
|
$caps[] = $this->others_cap; |
| 1031 |
|
} else { |
| 1032 |
|
$caps[] = $cap; |
| 1033 |
|
} |
| 1034 |
|
} |
| 1035 |
|
return $caps; |
| 1036 |
|
} |
| 1037 |
|
} |