Changeset 3215191
- Timestamp:
- 12/31/2024 08:30:53 AM (15 months ago)
- Location:
- tnc-toolbox
- Files:
-
- 21 added
- 4 edited
-
tags/1.3.9 (added)
-
tags/1.3.9/assets (added)
-
tags/1.3.9/assets/index.php (added)
-
tags/1.3.9/assets/tnc-icon.png (added)
-
tags/1.3.9/changelog.txt (added)
-
tags/1.3.9/core (added)
-
tags/1.3.9/core/class-tnc-wp-toolbox.php (added)
-
tags/1.3.9/core/includes (added)
-
tags/1.3.9/core/includes/classes (added)
-
tags/1.3.9/core/includes/classes/class-tnc-wp-toolbox-helpers.php (added)
-
tags/1.3.9/core/includes/classes/class-tnc-wp-toolbox-run.php (added)
-
tags/1.3.9/core/includes/classes/class-tnc-wp-toolbox-settings.php (added)
-
tags/1.3.9/core/includes/classes/index.php (added)
-
tags/1.3.9/core/includes/index.php (added)
-
tags/1.3.9/core/index.php (added)
-
tags/1.3.9/index.php (added)
-
tags/1.3.9/languages (added)
-
tags/1.3.9/languages/index.php (added)
-
tags/1.3.9/license.txt (added)
-
tags/1.3.9/readme.txt (added)
-
tags/1.3.9/tnc-wp-toolbox.php (added)
-
trunk/core/includes/classes/class-tnc-wp-toolbox-run.php (modified) (3 diffs)
-
trunk/core/includes/classes/class-tnc-wp-toolbox-settings.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/tnc-wp-toolbox.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tnc-toolbox/trunk/core/includes/classes/class-tnc-wp-toolbox-run.php
r3209621 r3215191 180 180 $config[$item] = file_get_contents($file_path); 181 181 } else { 182 set_transient('tnc_wp_toolbox_cpanel_action_error', " Problemo! {$item} config seems to be empty - please update it in Settings > TNC Toolbox. Cheers!", 60);182 set_transient('tnc_wp_toolbox_cpanel_action_error', "TNC Toolbox: Problemo! {$item} config seems to be empty - please update it in Settings > TNC Toolbox. Cheers!", 60); 183 183 wp_safe_redirect(admin_url()); 184 184 exit; … … 193 193 // Do the thing, prepare to handle 194 194 $response = wp_remote_post($url, ['headers' => $headers, 'body' => $body]); 195 $response_body = wp_remote_retrieve_body($response); 195 196 $referer = wp_get_referer(); 196 197 197 198 // Match up conditions/errors, relay 198 if (is_wp_error($response)) { 199 set_transient('tnc_wp_toolbox_cpanel_action_error', $response->get_error_message(), 60); 200 } elseif (wp_remote_retrieve_response_code($response) == 200) { 199 if (wp_remote_retrieve_response_code($response) == 200) { 201 200 set_transient('tnc_wp_toolbox_cpanel_action_success', $success_message, 60); 201 } elseif (!empty($response_body)) { 202 set_transient('tnc_wp_toolbox_cpanel_action_error', 'TNC Toolbox: ' . $endpoint . ' hit a snag. The error we received is: ' . $response_body, 60); 202 203 } else { 203 204 set_transient('tnc_wp_toolbox_cpanel_action_error', $error_message, 60); … … 215 216 216 217 function nginx_cache_purge() { 217 $this->cpanel_api_request('NginxCaching/clear_cache', ' NGINX Cache has been successfully purged!', 'TNC Toolbox hit a snag purging the NGINX Cache. If this continues, please contact your Hosting Support.');218 $this->cpanel_api_request('NginxCaching/clear_cache', 'TNC Toolbox: NGINX Cache has been Purged!', 'TNC Toolbox: NginxCaching/clear_cache hit an uncaught snag. If this continues, please contact your Hosting Support.'); 218 219 } 219 220 220 221 function nginx_cache_off() { 221 $this->cpanel_api_request('NginxCaching/disable_cache', ' NGINX Cache has been disabled.', 'TNC Toolbox hit a snag disabling the NGINX Cache. If this continues, please contact your Hosting Support.');222 $this->cpanel_api_request('NginxCaching/disable_cache', 'TNC Toolbox: NGINX Cache has been Disabled.', 'TNC Toolbox: NginxCaching/disable_cache hit an uncaught snag. If this continues, please contact your Hosting Support.'); 222 223 } 223 224 224 225 function nginx_cache_on() { 225 $this->cpanel_api_request('NginxCaching/enable_cache', ' NGINX Cache has been enabled!', 'TNC Toolbox hit a snag enabling the NGINX Cache. If this continues, please contact your Hosting Support.');226 $this->cpanel_api_request('NginxCaching/enable_cache', 'TNC Toolbox: NGINX Cache has been Enabled!', 'TNC Toolbox: NginxCaching/enable_cache hit an uncaught snag. If this continues, please contact your Hosting Support.'); 226 227 } 227 228 -
tnc-toolbox/trunk/core/includes/classes/class-tnc-wp-toolbox-settings.php
r3209621 r3215191 181 181 </tr> 182 182 <tr> 183 <th scope="row"><label for="tnc_toolbox_username">cPanel Username</label><br><small>Plain-text user , as used to log-in.</small></th>183 <th scope="row"><label for="tnc_toolbox_username">cPanel Username</label><br><small>Plain-text user. Not the API user.</small></th> 184 184 <td><input type="text" id="tnc_toolbox_username" name="tnc_toolbox_username" size="45" value="<?php echo esc_attr( $this->get_file_content( TNCWPTBOX_CONFIG_DIR . 'cpanel-username' ) ); ?>" /></td> 185 185 </tr> 186 186 <tr> 187 <th scope="row"><label for="tnc_toolbox_server_hostname">Server Hostname</label><br><small>FQDN of Server , no HTTPS etc.</small></th>187 <th scope="row"><label for="tnc_toolbox_server_hostname">Server Hostname</label><br><small>FQDN of Server. No HTTPS etc.</small></th> 188 188 <td><input type="text" id="tnc_toolbox_server_hostname" name="tnc_toolbox_server_hostname" size="45" value="<?php echo esc_attr( $this->get_file_content( TNCWPTBOX_CONFIG_DIR . 'server-hostname' ) ); ?>" /></td> 189 189 </tr> -
tnc-toolbox/trunk/readme.txt
r3209621 r3215191 8 8 Tested up to: 6.7 9 9 Requires PHP: 10 Stable tag: 1.3. 810 Stable tag: 1.3.9 11 11 License: GPLv3 12 12 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 89 89 == Changelog == 90 90 91 = 1.3.9: Dec 31, 2024 = 92 * Pass-through error from cP API back to WP GUI (#22) 93 * Improve uncaught error wording, and clarify on user type 94 91 95 = 1.3.8: Dec 18, 2024 = 92 96 * Update compatibility to WP 6.7.x sub-major (#20) -
tnc-toolbox/trunk/tnc-wp-toolbox.php
r3209621 r3215191 6 6 * @author The Network Crew Pty Ltd (TNC) 7 7 * @license gplv3 8 * @version 1.3. 88 * @version 1.3.9 9 9 * 10 10 * @wordpress-plugin … … 12 12 * Plugin URI: https://merlot.digital 13 13 * Description: Adds functionality to WP - designed for NGINX-powered Servers on cPanel+WHM. Made to help you fly online! 14 * Version: 1.3. 814 * Version: 1.3.9 15 15 * Author: The Network Crew Pty Ltd (TNC) 16 16 * Author URI: https://tnc.works … … 47 47 48 48 // Plugin version 49 define( 'TNCWPTBOX_VERSION', '1.3. 8' );49 define( 'TNCWPTBOX_VERSION', '1.3.9' ); 50 50 51 51 // Plugin Root File
Note: See TracChangeset
for help on using the changeset viewer.