2019-01-30 05:26:52 +00:00
|
|
|
<?php
|
2022-02-16 04:08:28 +00:00
|
|
|
namespace Code\Module;
|
2019-01-30 05:26:52 +00:00
|
|
|
|
2019-04-15 05:31:07 +00:00
|
|
|
/*
|
|
|
|
* Embed
|
|
|
|
* Given a post_id returns a share tag for inclusion in a post
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-02-16 04:08:28 +00:00
|
|
|
use Code\Web\Controller;
|
2019-01-30 05:26:52 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
class Embed extends Controller
|
|
|
|
{
|
2019-01-30 05:26:52 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
public function init()
|
|
|
|
{
|
|
|
|
$post_id = ((argc() > 1) ? intval(argv(1)) : 0);
|
|
|
|
|
|
|
|
if ($post_id && local_channel()) {
|
|
|
|
echo '[share=' . $post_id . '][/share]';
|
|
|
|
}
|
|
|
|
killme();
|
|
|
|
}
|
2019-01-30 05:26:52 +00:00
|
|
|
}
|