2018-10-12 03:21:49 +02:00
|
|
|
<?php
|
|
|
|
$LBRY = LBRY();
|
|
|
|
$unnatributed = (object) array(
|
2018-10-12 09:42:40 +02:00
|
|
|
'name' => 'unattributed',
|
2018-10-12 03:21:49 +02:00
|
|
|
);
|
|
|
|
$channels = LBRY()->daemon->channel_list();
|
|
|
|
array_unshift($channels, $unnatributed);
|
2018-10-12 05:59:01 +02:00
|
|
|
$cur_channels = get_post_meta($post->ID, 'lbry_channels');
|
2018-10-12 03:21:49 +02:00
|
|
|
?>
|
2018-10-12 05:59:01 +02:00
|
|
|
<?php wp_nonce_field('lbry_publish_channels', '_lbrynonce'); ?>
|
2018-10-12 03:21:49 +02:00
|
|
|
<h4>Choose which channels you would like to publish this post to:</h4>
|
|
|
|
<ul class="categorychecklist">
|
|
|
|
<?php if ($channels): ?>
|
|
|
|
<?php foreach ($channels as $channel): ?>
|
|
|
|
<li>
|
|
|
|
<label class="selectit">
|
2018-10-12 09:42:40 +02:00
|
|
|
<input type="checkbox" name="lbry_channels[]" value="<?= $channel->name ?>"
|
|
|
|
<?php if (in_array($channel->name, $cur_channels)): ?>
|
2018-10-12 05:59:01 +02:00
|
|
|
checked="true"
|
|
|
|
<?php endif; ?>
|
|
|
|
>
|
2018-10-12 03:21:49 +02:00
|
|
|
<?= $channel->name ?>
|
|
|
|
</label>
|
|
|
|
<br />
|
|
|
|
</li>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</ul>
|