2018-09-04 06:01:34 +00:00
|
|
|
<?php
|
|
|
|
namespace following;
|
|
|
|
|
|
|
|
$PENDING = 'PENDING';
|
|
|
|
$FOLLOWING = 'FOLLOWING';
|
|
|
|
|
2018-09-19 12:54:07 +00:00
|
|
|
function request_follow( $actor_id, $object_id ) {
|
2018-09-04 06:01:34 +00:00
|
|
|
global $wpdb;
|
|
|
|
return $wpdb->insert(
|
2018-09-19 21:33:20 +00:00
|
|
|
'pterotype_following',
|
2018-09-05 04:21:22 +00:00
|
|
|
array( 'actor_id' => $actor_id,
|
2018-09-19 12:54:07 +00:00
|
|
|
'object_id' => wp_json_encode( $object ),
|
2018-09-05 04:21:22 +00:00
|
|
|
'state' => $PENDING
|
|
|
|
)
|
2018-09-04 06:01:34 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
?>
|