Created
November 26, 2018 11:08
-
-
Save drov0/3ace88488d720cd7375d4049980c7e47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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