| Conditions | 2 |
| Paths | 2 |
| Total Lines | 24 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | function receive( $data, $token = null ) { |
||
| 22 | $events = $this->codec->decode( $data ); |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Fires when an array of actions are received from a remote Jetpack site |
||
| 26 | * |
||
| 27 | * @since 4.1 |
||
| 28 | * |
||
| 29 | * @param array Array of actions received from the remote site |
||
| 30 | */ |
||
| 31 | do_action( "jetpack_sync_remote_actions", $events, $token ); |
||
| 32 | foreach ( $events as $event ) { |
||
| 33 | list( $action_name, $args ) = $event; |
||
| 34 | /** |
||
| 35 | * Fires when an action is received from a remote Jetpack site |
||
| 36 | * |
||
| 37 | * @since 4.1 |
||
| 38 | * |
||
| 39 | * @param string $action_name The name of the action executed on the remote site |
||
| 40 | * @param array $args The arguments passed to the action |
||
| 41 | */ |
||
| 42 | do_action( "jetpack_sync_remote_action", $action_name, $args, $token ); |
||
| 43 | } |
||
| 44 | } |
||
| 45 | } |