Changeset 1994954
- Timestamp:
- 12/14/2018 03:55:24 PM (7 years ago)
- Location:
- satoshipay/trunk
- Files:
-
- 48 added
- 4 edited
-
readme.txt (modified) (2 diffs)
-
satoshipay.php (modified) (4 diffs)
-
src/SatoshiPay/Api/Client.php (modified) (4 diffs)
-
src/SatoshiPay/Constants.php (added)
-
src/SatoshiPay/Gutenberg (added)
-
src/SatoshiPay/Gutenberg/block-article-paywall (added)
-
src/SatoshiPay/Gutenberg/block-article-paywall/editor.scss (added)
-
src/SatoshiPay/Gutenberg/block-article-paywall/index.js (added)
-
src/SatoshiPay/Gutenberg/block-article-paywall/style.scss (added)
-
src/SatoshiPay/Gutenberg/block-base (added)
-
src/SatoshiPay/Gutenberg/block-base/editor.scss (added)
-
src/SatoshiPay/Gutenberg/block-base/index.js (added)
-
src/SatoshiPay/Gutenberg/block-base/style.scss (added)
-
src/SatoshiPay/Gutenberg/block-paid-media (added)
-
src/SatoshiPay/Gutenberg/block-paid-media/components (added)
-
src/SatoshiPay/Gutenberg/block-paid-media/components/AudioEditor.js (added)
-
src/SatoshiPay/Gutenberg/block-paid-media/components/ImageEditor.js (added)
-
src/SatoshiPay/Gutenberg/block-paid-media/components/MediaCoverPreview.js (added)
-
src/SatoshiPay/Gutenberg/block-paid-media/components/MediaEditorLayout.js (added)
-
src/SatoshiPay/Gutenberg/block-paid-media/components/MediaEditors.js (added)
-
src/SatoshiPay/Gutenberg/block-paid-media/components/VideoEditor.js (added)
-
src/SatoshiPay/Gutenberg/block-paid-media/editor.scss (added)
-
src/SatoshiPay/Gutenberg/block-paid-media/index.js (added)
-
src/SatoshiPay/Gutenberg/block-paid-media/style.scss (added)
-
src/SatoshiPay/Gutenberg/blocks.js (added)
-
src/SatoshiPay/Gutenberg/common.scss (added)
-
src/SatoshiPay/Gutenberg/helpers (added)
-
src/SatoshiPay/Gutenberg/helpers/CheckIfBelowPaywall.js (added)
-
src/SatoshiPay/Gutenberg/helpers/If.js (added)
-
src/SatoshiPay/Gutenberg/helpers/Loader.js (added)
-
src/SatoshiPay/Gutenberg/helpers/Notice.js (added)
-
src/SatoshiPay/Gutenberg/helpers/PayButton.js (added)
-
src/SatoshiPay/Gutenberg/helpers/SatoshiResizableBox.js (added)
-
src/SatoshiPay/Gutenberg/helpers/SvgIcon.js (added)
-
src/SatoshiPay/Gutenberg/helpers/index.js (added)
-
src/SatoshiPay/Gutenberg/init.php (added)
-
src/SatoshiPay/SatoshiPayAdminPlugin.php (modified) (5 diffs)
-
src/SatoshiPay/Utils (added)
-
src/SatoshiPay/Utils/DownloadRemoteImage.php (added)
-
src/SatoshiPay/Utils/Metadata.php (added)
-
src/SatoshiPay/Utils/SatoshiPay.php (added)
-
src/SatoshiPay/Utils/getSvgSolidColor.js (added)
-
src/SatoshiPay/Utils/index.js (added)
-
src/SatoshiPay/Utils/jsonToFormData.js (added)
-
src/SatoshiPay/Utils/limitString.js (added)
-
src/SatoshiPay/Utils/makeAjaxRequest.js (added)
-
src/SatoshiPay/Utils/toHumanReadableSize.js (added)
-
src/SatoshiPay/Utils/xlmToEuro.js (added)
-
src/SatoshiPay/dist (added)
-
src/SatoshiPay/dist/blocks.build.js (added)
-
src/SatoshiPay/dist/blocks.editor.build.css (added)
-
src/SatoshiPay/dist/blocks.style.build.css (added)
Legend:
- Unmodified
- Added
- Removed
-
satoshipay/trunk/readme.txt
r1985825 r1994954 4 4 Tags: micropayments, stellar, lumen, blockchain, paypal, paywall, paid content, paid downloads, payment, satoshipay, widget, adblocking, digital goods 5 5 Requires at least: 4.4.5 6 Tested up to: 4.9.87 Stable tag: 1. 66 Tested up to: 5.0.1 7 Stable tag: 1.7 8 8 License: MIT 9 9 License URI: https://opensource.org/licenses/MIT … … 80 80 == Changelog == 81 81 82 = 1.7 = 83 84 * Added support for text paywall and paid media (audio, video, and image) in the Gutenberg editor. 85 82 86 = 1.6 = 83 87 84 * Improved plugin performance. 85 * Improved API communication. 88 * Changed API endpoint for currency conversion. 89 * Added new plugin directory graphics. 90 * Removed unused code. 86 91 87 92 = 1.5 = -
satoshipay/trunk/satoshipay.php
r1985825 r1994954 12 12 * Plugin URI: https://wordpress.org/plugins/satoshipay/ 13 13 * Description: Integrates SatoshiPay's micropayment system into WordPress. 14 * Version: 1. 614 * Version: 1.7 15 15 * Author: SatoshiPay 16 16 * Author URI: https://satoshipay.io … … 30 30 // Plugin version, used in user-agent string for API calls; keep in sync with 31 31 // version in plugin description above! 32 define('SATOSHIPAY_VERSION', '1. 6');32 define('SATOSHIPAY_VERSION', '1.7'); 33 33 34 34 // Plugin root file … … 90 90 require_once __DIR__ . '/src/SatoshiPay/SatoshiPayPlugin.php'; 91 91 require_once __DIR__ . '/src/SatoshiPay/SatoshiPayAdminPlugin.php'; 92 require_once __DIR__ . '/src/SatoshiPay/Gutenberg/init.php'; 92 93 93 94 use SatoshiPay\SatoshiPayPlugin; 94 95 use SatoshiPay\SatoshiPayAdminPlugin; 96 use SatoshiPay\GutenbergEditor; 95 97 96 98 if (is_admin()) { … … 100 102 } 101 103 104 // Initialize Gutenberg Satoshipay blocks 105 GutenbergEditor\init(); 106 102 107 // installation procedure 103 108 include_once __DIR__ . '/src/SatoshiPay/SatoshiPayInstall.php'; -
satoshipay/trunk/src/SatoshiPay/Api/Client.php
r1959692 r1994954 101 101 { 102 102 if (empty($goodId)) { 103 // TODO: add sensible error behaviour104 103 return; 105 104 } … … 126 125 { 127 126 if (empty($goodId)) { 128 // TODO: add sensible error behaviour129 127 return; 130 128 } … … 179 177 { 180 178 if (empty($publisherId)) { 181 // TODO: add sensible error behaviour182 179 return; 183 180 } … … 305 302 if ($json) { 306 303 $message = ''; 307 if ( $json['name']) {304 if (array_key_exists('name', $json)) { 308 305 $message .= $json['name'] . ' / '; 309 306 } -
satoshipay/trunk/src/SatoshiPay/SatoshiPayAdminPlugin.php
r1985825 r1994954 15 15 require_once __DIR__ . '/SatoshiPayException.php'; 16 16 17 // Included to use is_plugin_active 18 include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 19 17 20 use WP_Ajax_Response; 18 21 use WP_Post; … … 106 109 public function init() 107 110 { 111 global $wp_version; 112 108 113 load_plugin_textdomain($this->name, false, WP_PLUGIN_DIR . '/' . $this->name . '/languages/' ); 109 114 … … 115 120 add_action('admin_notices', array($this, 'adminNotices')); 116 121 117 // Register edit post function 118 add_action('load-post.php', array($this, 'onEditPost')); 119 120 // Register update post function 121 add_action('post updated', array($this, 'onUpdatePost')); 122 123 if( 124 !( 125 is_plugin_active( 'gutenberg/gutenberg.php' ) 126 || ( version_compare( $wp_version, '5.0', '>=' ) && !is_plugin_active( 'classic-editor/classic-editor.php' ) ) 127 ) 128 ) { 129 // Disable post hooks if Gutenberg is enabled 130 // check namespace SatoshiPay\GutenbergEditor for Gutenberg handlers 131 132 // Register edit post function 133 add_action('load-post.php', array($this, 'onEditPost')); 134 135 // Register update post function 136 add_action('post updated', array($this, 'onUpdatePost')); 137 add_action('save_post', array($this, 'onSavePost')); 138 add_action('edit_attachment', array($this, 'onSavePost')); 139 } 122 140 123 141 add_action('admin_menu', array($this, 'onAdminMenu')); … … 126 144 127 145 add_action('add_meta_boxes', array($this, 'onAddMetaBoxes')); 128 add_action('save_post', array($this, 'onSavePost'));129 146 add_action('get_post', array($this, 'onPrepareAttachmentForJavascript')); 130 add_action('edit_attachment', array($this, 'onSavePost'));131 147 add_action('before_delete_post', array($this, 'onBeforeDeletePost')); 132 148 … … 550 566 function apiError($message) 551 567 { 552 // TODO: Show admin notice instead553 568 WP_die($message); 554 569 }
Note: See TracChangeset
for help on using the changeset viewer.