Changeset 2768657
- Timestamp:
- 08/10/2022 04:22:10 AM (4 years ago)
- Location:
- the-tech-tribe/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (2 diffs)
-
app/Authenticate.php (modified) (1 diff)
-
app/Post.php (modified) (3 diffs)
-
helpers/utilities.php (modified) (1 diff)
-
the-tribal-plugin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
the-tech-tribe/trunk/README.txt
r2723111 r2768657 4 4 Tags: techtribe, content, syndication 5 5 Requires at least: 5.0 6 Tested up to: 5.9.27 Stable tag: 1. 1.16 Tested up to: 6.0.1 7 Stable tag: 1.2.0 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 59 59 60 60 == Changelog == 61 62 = 1.2.0 - August 08, 2022 = 63 * Improve logs for further troubleshoot. 64 * Test on WordPress version 6.0.1 61 65 62 66 = 1.1.1 - May 13, 2022 = -
the-tech-tribe/trunk/app/Authenticate.php
r2627939 r2768657 70 70 tttCustomLogs("api return code : " . $resCode); 71 71 72 $ip_server = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : 'No Server IP Address'; 73 tttCustomLogs("Server IP Address : " . $ip_server); 74 75 $getUserIP = tttGetTheUserIp(); 76 tttCustomLogs("User IP Address : " . $getUserIP); 77 72 78 $resBody = wp_remote_retrieve_body($response); 73 79 tttCustomLogs("api return body : "); -
the-tech-tribe/trunk/app/Post.php
r2627939 r2768657 53 53 $ret = ''; 54 54 $apiKey = WPOptions::get_instance()->apiKey(); 55 56 tttCustomLogs("api key "); 57 tttCustomLogs($apiKey); 58 55 59 if($apiKey != '') { 56 60 tttCustomLogs("api key not empty"); 61 57 62 //move this to function 58 63 $userAccountKeys = \TheTribalPlugin\User::get_instance()->getAccountKeys(); 64 tttCustomLogs("userAccountKeys"); 65 tttCustomLogs($userAccountKeys); 66 59 67 $userAccountKeys['date_import_blog'] = \TheTribalPlugin\WPOptions::get_instance()->dateImportBlog(); 60 68 … … 72 80 ]); 73 81 82 tttCustomLogs("wp_remote_post response"); 83 tttCustomLogs($response); 74 84 75 85 $resCode = wp_remote_retrieve_response_code($response); 86 tttCustomLogs("resCode"); 87 tttCustomLogs($resCode); 76 88 77 89 $resBody = wp_remote_retrieve_body($response); 90 tttCustomLogs("resBody"); 91 tttCustomLogs($resBody); 92 78 93 $toArrayBody = json_decode($resBody, 1); 79 94 80 95 if ( is_wp_error( $response ) ) { 96 tttCustomLogs("has wp error"); 97 tttCustomLogs($response); 98 81 99 $error_message = $response->get_error_message(); 82 100 $ret = $error_message; … … 85 103 } 86 104 } 87 105 106 tttCustomLogs("return"); 107 tttCustomLogs($ret); 88 108 return rest_ensure_response($ret); 89 109 } -
the-tech-tribe/trunk/helpers/utilities.php
r2701685 r2768657 239 239 240 240 } 241 242 function tttGetTheUserIp() 243 { 244 if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { 245 //check ip from share internet 246 $ip = $_SERVER['HTTP_CLIENT_IP']; 247 } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { 248 //to check ip is pass from proxy 249 $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; 250 } else { 251 $ip = $_SERVER['REMOTE_ADDR']; 252 } 253 return apply_filters( 'ttt_wp_get_ip', $ip ); 254 } -
the-tech-tribe/trunk/the-tribal-plugin.php
r2723111 r2768657 17 17 * Plugin URI: thetechtribe.com 18 18 * Description: This plugin is for members of The Tech Tribe to manage features such as Automated Blog Posting etc. 19 * Version: 1. 1.119 * Version: 1.2.0 20 20 * Author: The Tech Tribe 21 21 * Author URI: https://thetechtribe.com … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'THE_TRIBAL_PLUGIN_VERSION', '1. 1.1' );38 define( 'THE_TRIBAL_PLUGIN_VERSION', '1.2.0' ); 39 39 40 40 //date_default_timezone_set(wp_timezone_string());
Note: See TracChangeset
for help on using the changeset viewer.