| Conditions | 7 |
| Paths | 13 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 56 | public function isSatisfied( RequestInterface $request ) { |
||
| 57 | if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { |
||
| 58 | return false; |
||
| 59 | } |
||
| 60 | |||
| 61 | $authenticated = is_user_logged_in(); |
||
| 62 | $private_match = $this->private && $authenticated; |
||
| 63 | $public_match = $this->public && !$authenticated; |
||
| 64 | $action_match = $this->action === $request->post( 'action', $request->get( 'action' ) ); |
||
| 65 | |||
| 66 | return ($private_match || $public_match) && $action_match; |
||
| 67 | } |
||
| 76 |