Skip to content

Instantly share code, notes, and snippets.

@drov0
Created November 26, 2018 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drov0/3ace88488d720cd7375d4049980c7e47 to your computer and use it in GitHub Desktop.
Save drov0/3ace88488d720cd7375d4049980c7e47 to your computer and use it in GitHub Desktop.
<?php
function createSteemPublishField()
{
$post_id = get_the_ID();
if (get_post_type($post_id) != 'post') {
return;
}
if (get_post_status ($post_id) == 'publish')
return;
wp_nonce_field('Steempress_sp_custom_nonce_'.$post_id, 'Steempress_sp_custom_nonce');
$value = get_post_meta($post_id, 'Steempress_sp_steem_publish', true);
if ($value == "0")
$checked = "";
else
$checked = "checked";
?>
<div class="misc-pub-section misc-pub-section-last">
<label><input type="checkbox" value="1" <?php echo $checked; ?> name="Steempress_sp_steem_publish" />Publish to steem </label>
</div>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment