pterotype/inc/following.php

18 lines
357 B
PHP
Raw Normal View History

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',
array( 'actor_id' => $actor_id,
2018-09-19 12:54:07 +00:00
'object_id' => wp_json_encode( $object ),
'state' => $PENDING
)
2018-09-04 06:01:34 +00:00
);
}
?>