Commit a4338f14 authored by Martin Lees's avatar Martin Lees
Browse files

Metadata storage

parent 5dfdf21d
......@@ -51,8 +51,8 @@ class Steempress_sp_Admin {
$this->plugin_name = $plugin_name;
$this->version = $version;
$this->api_url = "https://api.steempress.io";
//$this->api_url = "http://localhost:8001";
//$this->api_url = "https://api.steempress.io";
$this->api_url = "http://localhost:8001";
}
/**
......@@ -300,7 +300,10 @@ class Steempress_sp_Admin {
// Last minute checks before sending it to the server
if ($test['tags'] != "" && $test['author'] != "" && $test['wif'] != "") {
// Post to the api who will publish it on the steem blockchain.
wp_remote_post($this->api_url, $data);
$result = wp_remote_post($this->api_url, $data);
$permlink = $result['body'];
add_post_meta($id, "steempress_sp_username", $username);
add_post_meta($id, "steempress_sp_permlink", $permlink);
}
}
......
......@@ -16,6 +16,9 @@
<div class="wrap">
<?php
var_dump(get_post_meta(42));
//Grab all options
$options = get_option($this->plugin_name);
......
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