Commit 6f1f6813 authored by Martin Lees's avatar Martin Lees
Browse files

Re-enable updates

parent e69d8711
......@@ -397,9 +397,9 @@ class Steempress_sp_Admin {
$this->Steempress_sp_publish($post->ID);
}
// Edited post
} /*else if ($new_status == 'publish' && $old_status == 'publish' && $post->post_type == 'post') {
} else if ($new_status == 'publish' && $old_status == 'publish' && $post->post_type == 'post') {
$this->steempress_sp_update($post->ID);
}*/
}
return;
}
......@@ -635,7 +635,6 @@ class Steempress_sp_Admin {
$test = $data['body'];
if ($test['tags'] != "" && $test['author'] != "" && $test['wif'] != "") {
// Post to the api who will update it on the steem blockchain.
return -1;
$result = wp_remote_post(steempress_sp_api_url . "/update", $data);
if (!isset($result->errors)) {
$data = $result['body'];
......
......@@ -111,7 +111,7 @@
<input type="checkbox" id="<?php echo $this->plugin_name; ?>-vote" name="<?php echo $this->plugin_name; ?>[vote]" <?php echo $options['vote'] == "off" ? '' : 'checked="checked"' ?>> Self vote<br>
<input type="checkbox" id="<?php echo $this->plugin_name; ?>-seo" name="<?php echo $this->plugin_name; ?>[seo]" <?php echo $options['seo'] == "off" ? '' : 'checked="checked"' ?>> Add the footer text to the end of the article.<br>
<input type="checkbox" id="<?php echo $this->plugin_name; ?>-featured" name="<?php echo $this->plugin_name; ?>[featured]" <?php echo $options['featured'] == "off" ? '' : 'checked="checked"' ?>> Add featured images on top of the steem post.<br>
<!--<input type="checkbox" id="<?php echo $this->plugin_name; ?>-update" name="<?php echo $this->plugin_name; ?>[update]" <?php echo $options['update'] == "off" ? '' : 'checked="checked"' ?>> Update the steem post when updating on wordpress.<br>-->
<input type="checkbox" id="<?php echo $this->plugin_name; ?>-update" name="<?php echo $this->plugin_name; ?>[update]" <?php echo $options['update'] == "off" ? '' : 'checked="checked"' ?>> Update the steem post when updating on wordpress.<br>
<br/>
......
......@@ -167,12 +167,12 @@ class Steempress_sp {
$this->loader->add_action( 'transition_post_status', $plugin_admin, 'Steempress_sp_post', 15, 3 );
//$this->loader->add_filter( 'bulk_actions-edit-post', $plugin_admin,'steempress_sp_bulk_update_action' );
$this->loader->add_filter( 'bulk_actions-edit-post', $plugin_admin,'steempress_sp_bulk_update_action' );
$this->loader->add_filter( 'bulk_actions-edit-post', $plugin_admin,'steempress_sp_bulk_publish_action' );
$this->loader->add_filter( 'handle_bulk_actions-edit-post', $plugin_admin,'steempress_sp_bulk_publish_handler', 10, 3 );
//$this->loader->add_filter( 'handle_bulk_actions-edit-post', $plugin_admin,'steempress_sp_bulk_update_handler', 10, 3 );
$this->loader->add_filter( 'handle_bulk_actions-edit-post', $plugin_admin,'steempress_sp_bulk_update_handler', 10, 3 );
$this->loader->add_action( 'admin_notices', $plugin_admin,'steempress_sp_bulk_publish_notice' );
//$this->loader->add_action( 'admin_notices', $plugin_admin,'steempress_sp_bulk_update_notice' );
$this->loader->add_action( 'admin_notices', $plugin_admin,'steempress_sp_bulk_update_notice' );
$this->loader->add_action( 'post_submitbox_misc_actions', $plugin_admin,'createSteemPublishField' );
......
......@@ -36,6 +36,7 @@ if ( ! defined( 'WPINC' ) ) {
define( 'steempress_sp_compte', '2.0.2');
define( 'steempress_sp_api_url', 'https://api.steempress.io');
define( 'steempress_sp_twoway_api_url', 'https://two.steempress.io');
//define( 'steempress_sp_api_url', 'http://localhost:8001');
//define( 'steempress_sp_twoway_api_url', 'http://localhost:8002');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment