Changeset 2010126
- Timestamp:
- 01/10/2019 05:05:54 PM (7 years ago)
- Location:
- feather-by-katalysis/trunk
- Files:
-
- 5 edited
-
katalysis-sdk/src/http_client.php (modified) (1 diff)
-
katalysis-sdk/src/plugin_api.php (modified) (6 diffs)
-
katalysis-sdk/src/plugin_settings_manager.php (modified) (7 diffs)
-
katalysis.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
feather-by-katalysis/trunk/katalysis-sdk/src/http_client.php
r1998316 r2010126 17 17 private $user_agent = ''; 18 18 19 public function __construct($api_version='2.4. 0')19 public function __construct($api_version='2.4.1') 20 20 { 21 21 $blog_version = get_bloginfo('version'); -
feather-by-katalysis/trunk/katalysis-sdk/src/plugin_api.php
r1998651 r2010126 69 69 { 70 70 $icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAAwBJREFUOBE9k89rXFUUxz/3vjfvza/ODzVtQg3BH7GTScRqRYKKNEWoiAmpSP6BdunWTVfFbdW1C1eCINJgbWjBTaOIGn+BFjtJJkGzSE2bVJtJZpiZ9+t63h30LN793vs9575zv+ccSM0YZdfG4hi3rw9b3Lz6Ks1rly02lzS3rtS4/Zln98vLrl3lMwBKGXugVJsjzgAnqoFRHXveqLu4qsW9ocTuZ2YiGosjeG5B21v/u1Grk7SDp62To6fQyazFfcrgvMLYwcNckmx++7iA400T69Muyp/moYN74riO0T+ilW+DSLJoXbF4iDY97yaPv77H7nKR/fY2hjc4Mfu5srd1tcORQo1uuE6l7BN2KuS9PXrmGG52h17nOPVyk+bhJyLYDbT5CYQP2rEm/0iEW46EKJLLldltHTLxZpMguUwxu0qnr+k6W/wp6WueQ6khxucbklkf/DHF6tWziCToIH2Gh+Ofodf/hZIfETBK3F8jk70vgR8wPnuRn5fyFKKXxbfJxLktjet9xVR5h8Sv4hVDTLzGyYU7JGoeR70rjqm9Q5xct8FO5FGr3ORuZTsldPr534K2wcsMyhgZLf0x4I0xgg1B11AKBzxf2zBNFJzm99YIuv9ATjzCZIL1peMi3iJKXxxcrt6Xiszy4kJXPAJWD2YYfubRlFNs3PBpxQ65cBoym+SLuzw202P92kcUc+dF6Spu2Cf0S6LVt1LmD3ly7j2JKxGETyj7rmLiEJs62WAN40oZqVDM36cbHaMT7lAwI4xXN9g4/BREi0R9J9n9TT6TSBmT50W4ESbnf5C/JMSZxJaxF76ESd7m2XP75Ia32OxWeWruLQm+Ill8L9nXGH3tHxGqv8Ld6h/2rUq/IE0yaXEUB7IeWLy3XSQJzrD55VFOzLXp+qOo5CgbSxdcJhdSx4El4a8MxgVy2VuEQcsSopIM1jfsbz2Qfkir0GHtixUyFAbTmI5zShjpRpOVDhOLw7oEnRW0Qr0R0ZwqcerUnuXS4avN/JXifwEhbDUhuND1jwAAAABJRU5ErkJggg=='; 71 add_menu_page(' Katalysis', 'Katalysis', 'manage_options', __FILE__, function() { $this->settings_manager->echo_plugin_settings_view(); }, $icon);71 add_menu_page('Feather', 'Feather', 'manage_options', __FILE__, function() { $this->settings_manager->echo_plugin_settings_view(); }, $icon); 72 72 return; 73 73 } 74 74 75 add_submenu_page($parent, ' Katalysis', 'Katalysis', 'manage_options', __FILE__, function() { $this->settings_manager->echo_plugin_settings_view(); });75 add_submenu_page($parent, 'Feather', 'Feather', 'manage_options', __FILE__, function() { $this->settings_manager->echo_plugin_settings_view(); }); 76 76 } 77 77 … … 215 215 if (!$this->are_blockchain_settings_valid()) 216 216 { 217 Utility::log(" KATALYSIS_UPDATE_CONTENT: Unable to save post {$post->ID} - blockchain settings are not valid for post");217 Utility::log("FEATHER: Unable to save post {$post->ID} - blockchain settings are not valid for post"); 218 218 return false; 219 219 } … … 221 221 if (!$this->settings_manager->save_post_settings($post->ID, $http_post)) 222 222 { 223 Utility::log(" KATALYSIS_UPDATE_CONTENT: Unable to save post {$post->ID} settings");223 Utility::log("FEATHER: Unable to save post {$post->ID} settings"); 224 224 return false; 225 225 } … … 238 238 try 239 239 { 240 Utility::log(" KATALYSIS_UPDATE_CONTENT: Saving post {$post->ID} to blockchain...");240 Utility::log("FEATHER: Saving post {$post->ID} to blockchain..."); 241 241 $blockchain_client = new BlockchainClient($environment_settings->api_uri, $plugin_settings->seed, $plugin_settings->editor_email); 242 242 $blockchain_client->add_or_update_content( … … 250 250 catch (\Exception $e) 251 251 { 252 Utility::log(" KATALYSIS_UPDATE_CONTENT: " . $e->getMessage());252 Utility::log("FEATHER: " . $e->getMessage()); 253 253 return false; 254 254 } … … 297 297 catch (\Exception $e) 298 298 { 299 Utility::log(" KATALYSIS_AJAX: " . $e->getMessage());299 Utility::log("FEATHER_AJAX: " . $e->getMessage()); 300 300 wp_die(); 301 301 return; -
feather-by-katalysis/trunk/katalysis-sdk/src/plugin_settings_manager.php
r1998548 r2010126 256 256 if (count($json_configs) == 0) 257 257 { 258 Utility::log(" KATALYSIS_SETTINGS: Settings for environment '$environment' are not available");258 Utility::log("FEATHER: Settings for environment '$environment' are not available"); 259 259 return NULL; 260 260 } … … 262 262 if (count($json_configs) > 1) 263 263 { 264 Utility::log(" KATALYSIS_SETTINGS: Settings for environment '$environment' are ambiguous");264 Utility::log("FEATHER: Settings for environment '$environment' are ambiguous"); 265 265 return NULL; 266 266 } … … 269 269 if (count($json_config['wallets']) == 0) 270 270 { 271 Utility::log(" KATALYSIS_SETTINGS: No wallets for environment '$environment'");271 Utility::log("FEATHER: No wallets for environment '$environment'"); 272 272 return NULL; 273 273 } … … 315 315 else 316 316 { 317 Utility::log(" KATALYSIS_SETTINGS: Unknown version of plugin settings ($settings->version)");317 Utility::log("FEATHER: Unknown version of plugin settings ($settings->version)"); 318 318 return new PluginSettings(); 319 319 } … … 351 351 if ($price <= 0 || $num_paragraphs <= 0) 352 352 { 353 Utility::log(" KATALYSIS_SETTINGS: Not saving settings - price=$price, paragraphs=$num_paragraphs");353 Utility::log("FEATHER: Not saving settings - price=$price, paragraphs=$num_paragraphs"); 354 354 return false; 355 355 } … … 390 390 else 391 391 { 392 Utility::log(" KATALYSIS_SETTINGS: Unknown version of post settings ($settings->version)");392 Utility::log("FEATHER: Unknown version of post settings ($settings->version)"); 393 393 return new PostSettings(); 394 394 } … … 401 401 ?> 402 402 <div class="wrap"> 403 <h2> Katalysis Settings</h2>403 <h2>Feather by Katalysis Settings</h2> 404 404 <hr> 405 405 <form method="post" action="options.php"> -
feather-by-katalysis/trunk/katalysis.php
r1998316 r2010126 12 12 * Plugin URI: https://feather.katalysis.io/ 13 13 * Description: Adds micropayments into WordPress. Quick start: 1) Select Katalysis from the left-hand admin menu, 2) customize Plugin settings, 3) edit a post, 4) activate "Paid Content" in Katalysis meta box, 5) set a price and the number of paragraphs to show, 6) publish and view post. The Katalysis wallet will appear below the teaser and allow you to pay for the post. 14 * Version: 2.4. 014 * Version: 2.4.1 15 15 * Author: Katalysis 16 16 * Author URI: https://katalysis.io … … 62 62 $post_types = array_merge(array('post' => 'post'), get_post_types(array('_builtin' => FALSE))); 63 63 add_meta_box( 64 'pwb_meta', ' Katalysis PaymentOptions',64 'pwb_meta', 'Feather by Katalysis Options', 65 65 function($post) 66 66 { -
feather-by-katalysis/trunk/readme.txt
r1998378 r2010126 4 4 Tags: micropayments, micro payments, paywall, paid content, payment, katalysis, widget 5 5 Requires at least: 4.7 6 Tested up to: 4.9.x7 Stable tag: 2. 2.06 Tested up to: 5.0.3 7 Stable tag: 2.4.1 8 8 License: GPL2 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.