Changeset 3024513
- Timestamp:
- 01/20/2024 03:51:12 PM (2 years ago)
- Location:
- editorify
- Files:
-
- 23 added
- 2 edited
-
tags/1.0.4 (added)
-
tags/1.0.4/assets (added)
-
tags/1.0.4/assets/banner-1544x500.png (added)
-
tags/1.0.4/assets/banner-772x250.png (added)
-
tags/1.0.4/assets/css (added)
-
tags/1.0.4/assets/css/style.css (added)
-
tags/1.0.4/assets/icon-1200.png (added)
-
tags/1.0.4/assets/icon-128x128.png (added)
-
tags/1.0.4/assets/icon-256x256.png (added)
-
tags/1.0.4/assets/images (added)
-
tags/1.0.4/assets/images/editorifyLogo.png (added)
-
tags/1.0.4/assets/images/editorify_icon.png (added)
-
tags/1.0.4/assets/js (added)
-
tags/1.0.4/assets/js/script.js (added)
-
tags/1.0.4/assets/screenshot-1.png (added)
-
tags/1.0.4/assets/screenshot-2.png (added)
-
tags/1.0.4/assets/screenshot-3.png (added)
-
tags/1.0.4/assets/screenshot-4.png (added)
-
tags/1.0.4/assets/screenshot-5.png (added)
-
tags/1.0.4/editorify.php (added)
-
tags/1.0.4/readme.txt (added)
-
tags/1.0.4/views (added)
-
tags/1.0.4/views/editorify_admin_page.php (added)
-
trunk/editorify.php (modified) (10 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
editorify/trunk/editorify.php
r3016643 r3024513 8 8 * Plugin Name: Editorify 9 9 * Description: Boost Your Sales By Adding Products Reviews, Videos & Images to your product page 10 * Version: 1.0. 310 * Version: 1.0.4 11 11 * Author: Editorify 12 12 * Author URI: https://editorify.com … … 20 20 21 21 define("EDITORIFY_API_URL", "https://apps.editorify.com"); 22 define('EDITORIFY_VERSION', '1.0 ');22 define('EDITORIFY_VERSION', '1.0.4'); 23 23 define('EDITORIFY_PATH', dirname(__FILE__)); 24 24 define('EDITORIFY_FOLDER', basename(EDITORIFY_PATH)); … … 26 26 define('EDITORIFY_API_KEY', get_option('editorify_api_key')); 27 27 define("EDITORIFY_DEVELOPMENT", (stripos(EDITORIFY_API_URL, "dev.editorify") !== false ? "dev" : "")); 28 define("EDITORIFY_DEBUG", true);28 define("EDITORIFY_DEBUG", false); 29 29 30 30 register_activation_hook(__FILE__, 'editorify_activation_hook'); … … 34 34 add_action('admin_menu', 'editorify_admin_menu'); 35 35 add_action('wp_head', 'editorify_script'); 36 add_action("wp_ajax_nopriv_editorify_installation", "editorify_installation"); 37 add_action("wp_ajax_editorify_installation", "editorify_installation"); 36 38 37 39 38 function editorify_activation_hook() … … 50 49 if ($response['success'] > 0) { 51 50 52 editorify_log('api key: ' . $response['api_key'], get_site_url()); 53 editorify_log((!get_option('editorify_api_key') ? "yes" : "no"), get_site_url()); 51 54 52 55 53 if (!get_option('editorify_api_key')) { 56 54 add_option('editorify_api_key', $response['api_key']); 57 55 58 editorify_log($response['app_name'] . " " . $response['user_id'] . " " . $response['scope'], get_site_url());56 59 57 60 58 if (class_exists("WC_Auth")) { … … 84 82 } 85 83 86 editorify_log('after auth');84 87 85 } else { 88 86 update_option('editorify_api_key', $response['api_key']); 89 87 } 90 88 } else { 91 editorify_log('invalid response - api key', get_site_url());89 92 90 93 91 if (!get_option('editorify_error')) { … … 97 95 } 98 96 } else { 99 editorify_log('error getting response - api key', get_site_url());97 100 98 101 99 if (!get_option('editorify_error')) { … … 197 195 'body' => json_encode($data), 198 196 ); 199 editorify_log('sending request', $url);197 200 198 $response = wp_remote_post($url, $data); 201 editorify_log('got response', $url);199 202 200 203 201 if (!is_wp_error($response)) { … … 209 207 return 0; 210 208 } catch (Exception $err) { 211 editorify_handle_error('failed sending request', $err, $data); 212 } 213 } 214 215 function editorify_log($message, $data = null) 216 { 217 $log = null; 218 219 if (isset($data)) { 220 $log = "\n[Editorify] " . $message . ":\n" . print_r($data, true); 221 } else { 222 $log = "\n[Editorify] " . $message; 223 } 224 error_log($log); 225 226 if (EDITORIFY_DEBUG) { 227 $plugin_log_file = plugin_dir_path(__FILE__) . 'debug.log'; 228 error_log($log . "\n", 3, $plugin_log_file); 229 } 230 } 231 232 function editorify_handle_error($message, $err, $data = null) 233 { 234 editorify_log($message, $err); 235 } 209 if(EDITORIFY_DEBUG) 210 { 211 echo $err; 212 } 213 } 214 } 215 216 236 217 237 218 function editorify_plugin_redirect() … … 292 273 } 293 274 } 294 function editorify_installation() 295 { 296 if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins'))) && !get_option('editorify_error')) { 297 $json['success'] = 1; 298 $json['api_key'] = get_option('editorify_api_key'); 299 } else { 300 $json["success"] = 0; 301 } 302 303 wp_send_json($json); 304 wp_die(); 305 } 275 306 276 307 277 ?> -
editorify/trunk/readme.txt
r3016643 r3024513 6 6 Requires PHP: 5.4 7 7 Tested up to: 6.4.2 8 Stable tag: 1.0. 38 Stable tag: 1.0.4 9 9 Plugin URI: https://editorify.com 10 10 License: proprietary
Note: See TracChangeset
for help on using the changeset viewer.