Changeset 2949495
- Timestamp:
- 08/08/2023 04:51:43 PM (2 years ago)
- Location:
- client-power-tools
- Files:
-
- 110 added
- 6 edited
-
tags/1.7.8 (added)
-
tags/1.7.8/LICENSE (added)
-
tags/1.7.8/admin (added)
-
tags/1.7.8/admin/cpt-admin-messages-table.php (added)
-
tags/1.7.8/admin/cpt-admin-messages.php (added)
-
tags/1.7.8/admin/cpt-admin.php (added)
-
tags/1.7.8/admin/cpt-client-manager-table.php (added)
-
tags/1.7.8/admin/cpt-client-managers.php (added)
-
tags/1.7.8/admin/cpt-clients-table.php (added)
-
tags/1.7.8/admin/cpt-clients.php (added)
-
tags/1.7.8/admin/cpt-edit-client-form.php (added)
-
tags/1.7.8/admin/cpt-edit-client.php (added)
-
tags/1.7.8/admin/cpt-edit-project-form.php (added)
-
tags/1.7.8/admin/cpt-edit-project-type-form.php (added)
-
tags/1.7.8/admin/cpt-edit-project.php (added)
-
tags/1.7.8/admin/cpt-new-client-form.php (added)
-
tags/1.7.8/admin/cpt-new-client.php (added)
-
tags/1.7.8/admin/cpt-new-project-form.php (added)
-
tags/1.7.8/admin/cpt-new-project-type-form.php (added)
-
tags/1.7.8/admin/cpt-new-project.php (added)
-
tags/1.7.8/admin/cpt-project-types-table.php (added)
-
tags/1.7.8/admin/cpt-project-types.php (added)
-
tags/1.7.8/admin/cpt-projects-table.php (added)
-
tags/1.7.8/admin/cpt-projects.php (added)
-
tags/1.7.8/admin/cpt-settings.php (added)
-
tags/1.7.8/admin/fonts (added)
-
tags/1.7.8/admin/fonts/Jost (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-Bold.ttf (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-Bold.woff (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-Bold.woff2 (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-BoldItalic.ttf (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-BoldItalic.woff (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-BoldItalic.woff2 (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-Italic.ttf (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-Italic.woff (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-Italic.woff2 (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-Regular.ttf (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-Regular.woff (added)
-
tags/1.7.8/admin/fonts/Jost/Jost-Regular.woff2 (added)
-
tags/1.7.8/admin/images (added)
-
tags/1.7.8/admin/images/cpt-icon.svg (added)
-
tags/1.7.8/admin/images/cpt-logo.svg (added)
-
tags/1.7.8/assets (added)
-
tags/1.7.8/assets/css (added)
-
tags/1.7.8/assets/css/admin.css (added)
-
tags/1.7.8/assets/css/admin.css.map (added)
-
tags/1.7.8/assets/css/common.css (added)
-
tags/1.7.8/assets/css/common.css.map (added)
-
tags/1.7.8/assets/css/frontend.css (added)
-
tags/1.7.8/assets/css/frontend.css.map (added)
-
tags/1.7.8/assets/css/style.css.map (added)
-
tags/1.7.8/assets/fonts (added)
-
tags/1.7.8/assets/fonts/Jost (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-Bold.ttf (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-Bold.woff (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-Bold.woff2 (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-BoldItalic.ttf (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-BoldItalic.woff (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-BoldItalic.woff2 (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-Italic.ttf (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-Italic.woff (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-Italic.woff2 (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-Regular.ttf (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-Regular.woff (added)
-
tags/1.7.8/assets/fonts/Jost/Jost-Regular.woff2 (added)
-
tags/1.7.8/assets/images (added)
-
tags/1.7.8/assets/images/close.svg (added)
-
tags/1.7.8/assets/images/cpt-icon.svg (added)
-
tags/1.7.8/assets/images/cpt-logo.svg (added)
-
tags/1.7.8/assets/images/expand.svg (added)
-
tags/1.7.8/assets/js (added)
-
tags/1.7.8/assets/js/cpt-admin.js (added)
-
tags/1.7.8/assets/js/cpt-common.js (added)
-
tags/1.7.8/assets/js/cpt-frontend.js (added)
-
tags/1.7.8/assets/js/cpt-stages.js (added)
-
tags/1.7.8/assets/js/cpt-types.js (added)
-
tags/1.7.8/assets/scss (added)
-
tags/1.7.8/assets/scss/_animations.scss (added)
-
tags/1.7.8/assets/scss/_dashboard.scss (added)
-
tags/1.7.8/assets/scss/_fonts.scss (added)
-
tags/1.7.8/assets/scss/_layout.scss (added)
-
tags/1.7.8/assets/scss/_login.scss (added)
-
tags/1.7.8/assets/scss/_messages.scss (added)
-
tags/1.7.8/assets/scss/_modals.scss (added)
-
tags/1.7.8/assets/scss/_navigation.scss (added)
-
tags/1.7.8/assets/scss/_projects.scss (added)
-
tags/1.7.8/assets/scss/_utility.scss (added)
-
tags/1.7.8/assets/scss/_variables.scss (added)
-
tags/1.7.8/assets/scss/admin.scss (added)
-
tags/1.7.8/assets/scss/common.scss (added)
-
tags/1.7.8/assets/scss/frontend.scss (added)
-
tags/1.7.8/changelog.txt (added)
-
tags/1.7.8/client-power-tools.php (added)
-
tags/1.7.8/common (added)
-
tags/1.7.8/common/cpt-common-messages.php (added)
-
tags/1.7.8/common/cpt-common-projects.php (added)
-
tags/1.7.8/common/cpt-common.php (added)
-
tags/1.7.8/common/cpt-login.php (added)
-
tags/1.7.8/common/cpt-status-update-request-button.php (added)
-
tags/1.7.8/frontend (added)
-
tags/1.7.8/frontend/cpt-client-dashboard.php (added)
-
tags/1.7.8/frontend/cpt-frontend.php (added)
-
tags/1.7.8/frontend/images (added)
-
tags/1.7.8/frontend/images/cpt-dismiss-button.svg (added)
-
tags/1.7.8/frontend/images/cpt-icon-bw.svg (added)
-
tags/1.7.8/includes (added)
-
tags/1.7.8/includes/class-wp-list-table.php (added)
-
tags/1.7.8/package.json (added)
-
tags/1.7.8/readme.txt (added)
-
tags/1.7.8/shortcodes.php (added)
-
trunk/assets/js/cpt-frontend.js (modified) (5 diffs)
-
trunk/changelog.txt (modified) (3 diffs)
-
trunk/client-power-tools.php (modified) (3 diffs)
-
trunk/common/cpt-login.php (modified) (3 diffs)
-
trunk/frontend/cpt-frontend.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
client-power-tools/trunk/assets/js/cpt-frontend.js
r2811319 r2949495 66 66 67 67 const messages = document.getElementById('cpt-login-messages'); 68 const nonceField = document.getElementById('cpt-login-nonce'); 68 69 const emailRow = document.getElementById('cpt-login-email'); 69 70 const emailField = document.getElementById('cpt-login-email-field'); … … 113 114 url: cpt_vars.ajaxURL, 114 115 data: { 115 _ajax_nonce: cpt_vars.nonce,116 _ajax_nonce: nonceField.value, 116 117 action: 'send_login_code', 117 118 email: emailField.value … … 147 148 url: cpt_vars.ajaxURL, 148 149 data: { 149 _ajax_nonce: cpt_vars.nonce,150 _ajax_nonce: nonceField.value, 150 151 action: 'check_login_code', 151 152 email: emailField.value ? emailField.value : decodeURIComponent(params.get('user')), … … 170 171 url: cpt_vars.ajaxURL, 171 172 data: { 172 _ajax_nonce: cpt_vars.nonce,173 _ajax_nonce: nonceField.value, 173 174 action: 'check_password', 174 175 email: emailField.value, … … 177 178 // beforeSend: function() {}, 178 179 success: function(response) { 179 //console.debug(response);180 console.debug(response); 180 181 displayMessages(response); 181 182 if (response.success) location.reload(); -
client-power-tools/trunk/changelog.txt
r2947193 r2949495 3 3 All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com). 4 4 5 6 ### 1.7.8 - 2023-08-08 7 8 #### Fixed 9 - The login form would sometimes fail under unusual conditions. Now it should happily log you in as expected, or else deliver error messages instead of just sitting there opaquely. 10 11 5 12 ### 1.7.7 - 2023-08-03 6 13 7 ### Changed14 #### Changed 8 15 - Renamed the primary dashboard page in the navigation tabs to "Home.' 9 16 - Moved the page title filter from /common/cpt-common.php to /frontend/cpt-frontend.php. 10 17 11 ### Fixed18 #### Fixed 12 19 - The home page title would show as "Client Dashboard: Client Dashboard" which was dumb. Fixed. 13 20 … … 15 22 ### 1.7.6 - 2023-07-27 16 23 17 ### Added24 #### Added 18 25 - cpt_is_additional_page() 19 26 - cpt_add_nav_to_addl_pages() 20 27 21 ### Changed28 #### Changed 22 29 - No longer shows projects in the client list table if the Projects module is not active. 23 30 - Consolidated Knowledge Base breadcrumbs logic in the cpt_kb_breadcrumbs() function. … … 26 33 - Page titles within the client dashboard now include both the dashboard title and the name of the page for all pages. 27 34 28 ### Removed35 #### Removed 29 36 - Removed the confusingly named cpt_is_cpt() function from /frontend/frontend.php. cpt_is_client_dashboard() does the same job. (cpt_is_cpt() still works; it just returns the output of cpt_is_client_dashboard()). 30 37 -
client-power-tools/trunk/client-power-tools.php
r2947193 r2949495 5 5 * Plugin URI: https://clientpowertools.com 6 6 * Description: Client Power Tools is an easy-to-use client dashboard, project management, and communication portal built for designers, developers, consultants, lawyers, and other professionals. 7 * Version: 1.7. 77 * Version: 1.7.8 8 8 * Author: Sam Glover 9 9 * Author URI: https://samglover.net … … 20 20 * Constants 21 21 */ 22 define('CLIENT_POWER_TOOLS_PLUGIN_VERSION', '1.7. 7');22 define('CLIENT_POWER_TOOLS_PLUGIN_VERSION', '1.7.8'); 23 23 define('CLIENT_POWER_TOOLS_DIR_PATH', plugin_dir_path(__FILE__)); 24 24 define('CLIENT_POWER_TOOLS_DIR_URL', plugin_dir_url(__FILE__)); … … 61 61 'isCPT' => Common\cpt_is_client_dashboard(), 62 62 'ajaxURL' => admin_url('admin-ajax.php'), 63 'nonce' => wp_create_nonce('cpt-login-nonce'),64 63 ]); 65 64 wp_enqueue_script('cpt-frontend'); -
client-power-tools/trunk/common/cpt-login.php
r2909684 r2949495 3 3 namespace Client_Power_Tools\Core\Common; 4 4 5 add_action('wp_ajax_nopriv_check_password', __NAMESPACE__ . '\check_password');6 function check_password() {7 if (!isset($_POST['_ajax_nonce']) || !wp_verify_nonce($_POST['_ajax_nonce'], 'cpt-login-nonce')) wp_send_json_error(['message' => __('Invalid nonce.', 'client-power-tools')]);8 if (!isset($_POST['email']) || strlen($_POST['email']) < 1) wp_send_json_error(['message' => __('Email address is missing.', 'client-power-tools')]);9 if (!isset($_POST['password']) || strlen($_POST['password']) < 1) wp_send_json_error(['message' => __('Password is missing.', 'client-power-tools')]);10 11 $user = get_user_by('email', sanitize_email($_POST['email']));12 $password = wp_check_password($_POST['password'], $user->data->user_pass, $user->ID);13 if (!$user || !$password) wp_send_json_error(['message' => __('Login failed.', 'client-power-tools')]);14 15 wp_set_current_user($user->ID);16 wp_set_auth_cookie($user->ID, true);17 wp_send_json_success(['message' => __('Logging you in …', 'client-power-tools')]);18 }19 20 21 5 add_action('wp_ajax_nopriv_send_login_code', __NAMESPACE__ . '\send_login_code'); 22 6 function send_login_code() { 23 if (!isset($_POST['_ajax_nonce']) || !wp_verify_nonce($_POST['_ajax_nonce'], 'cpt-login -nonce')) wp_send_json_error(['message' => __('Invalid nonce.', 'client-power-tools')]);7 if (!isset($_POST['_ajax_nonce']) || !wp_verify_nonce($_POST['_ajax_nonce'], 'cpt-login')) wp_send_json_error(['message' => __('Invalid nonce.', 'client-power-tools')]); 24 8 if (!isset($_POST['email']) || strlen($_POST['email']) < 1) wp_send_json_error(['message' => __('Email address is missing.', 'client-power-tools')]); 25 9 if (!is_email(sanitize_email($_POST['email']))) wp_send_json_error(['message' => __('Please enter a valid email address.', 'client-power-tools')]); … … 63 47 add_action('wp_ajax_nopriv_check_login_code', __NAMESPACE__ . '\check_login_code'); 64 48 function check_login_code() { 65 if (!isset($_POST['_ajax_nonce']) || !wp_verify_nonce($_POST['_ajax_nonce'], 'cpt-login -nonce')) wp_send_json_error(['message' => __('Invalid nonce.', 'client-power-tools')]);49 if (!isset($_POST['_ajax_nonce']) || !wp_verify_nonce($_POST['_ajax_nonce'], 'cpt-login')) wp_send_json_error(['message' => __('Invalid nonce.', 'client-power-tools')]); 66 50 if (!isset($_POST['email']) || strlen($_POST['email']) < 1) wp_send_json_error(['message' => __('Email address is missing.', 'client-power-tools')]); 67 51 … … 94 78 wp_send_json_success(['message' => __('Logging you in …', 'client-power-tools')]); 95 79 } 80 81 82 add_action('wp_ajax_nopriv_check_password', __NAMESPACE__ . '\check_password'); 83 function check_password() { 84 if (!isset($_POST['_ajax_nonce']) || !wp_verify_nonce($_POST['_ajax_nonce'], 'cpt-login')) wp_send_json_error(['message' => __('Invalid nonce.', 'client-power-tools')]); 85 if (!isset($_POST['email']) || strlen($_POST['email']) < 1) wp_send_json_error(['message' => __('Email address is missing.', 'client-power-tools')]); 86 if (!isset($_POST['password']) || strlen($_POST['password']) < 1) wp_send_json_error(['message' => __('Password is missing.', 'client-power-tools')]); 87 88 $user = is_email(sanitize_email($_POST['email'])) ? get_user_by('email', sanitize_email($_POST['email'])) : false; 89 $password = wp_check_password($_POST['password'], $user->data->user_pass, $user->ID); 90 if (!$user || !$password) wp_send_json_error(['message' => __('Login failed.', 'client-power-tools')]); 91 92 wp_set_current_user($user->ID); 93 wp_set_auth_cookie($user->ID, true); 94 wp_send_json_success(['message' => __('Logging you in …', 'client-power-tools')]); 95 } -
client-power-tools/trunk/frontend/cpt-frontend.php
r2947193 r2949495 32 32 <div id="cpt-login-messages"></div> 33 33 <form id="cpt-login-form" name="cpt-login-form" action="<?php echo get_permalink(); ?>" method="post"> 34 <?php wp_nonce_field('cpt-login', 'cpt-login-nonce'); ?> 34 35 <p id="cpt-login-email"> 35 36 <label for="cpt-login-email-field">Email Address</label> -
client-power-tools/trunk/readme.txt
r2947193 r2949495 116 116 == Changelog == 117 117 118 ### 1.7.8 - 2023-08-08 119 120 #### Fixed 121 - The login form would sometimes fail under unusual conditions. Now it should happily log you in as expected, or else deliver error messages instead of just sitting there opaquely. 122 123 118 124 ### 1.7.7 - 2023-08-03 119 125 120 ### Changed126 #### Changed 121 127 - Renamed the primary dashboard page in the navigation tabs to "Home.' 122 128 123 ### Fixed129 #### Fixed 124 130 - The home page title would show as "Client Dashboard: Client Dashboard" which was dumb. Fixed. 125 131 - Moved the page title filter from /common/cpt-common.php to /frontend/cpt-frontend.php. … … 127 133 ### 1.7.6 - 2023-07-27 128 134 129 ### Added135 #### Added 130 136 - cpt_is_additional_page() 131 137 - cpt_add_nav_to_addl_pages() 132 138 133 ### Changed139 #### Changed 134 140 - No longer shows projects in the client list table if the Projects module is not active. 135 141 - Consolidated Knowledge Base breadcrumbs logic in the cpt_kb_breadcrumbs() function. … … 138 144 - Page titles within the client dashboard now include both the dashboard title and the name of the page for all pages. 139 145 140 ### Removed146 #### Removed 141 147 - Removed the confusingly named cpt_is_cpt() function from /frontend/frontend.php. cpt_is_client_dashboard() does the same job. (cpt_is_cpt() still works; it just returns the output of cpt_is_client_dashboard()). 142 148
Note: See TracChangeset
for help on using the changeset viewer.