Changeset 3179950
- Timestamp:
- 11/01/2024 12:51:50 PM (16 months ago)
- Location:
- constellation-client-portal
- Files:
-
- 131 added
- 2 deleted
- 5 edited
-
tags/1.10.0 (added)
-
tags/1.10.0/LICENSE.txt (added)
-
tags/1.10.0/README.txt (added)
-
tags/1.10.0/admin (added)
-
tags/1.10.0/admin/class-ars-constellation-client-portal-admin.php (added)
-
tags/1.10.0/admin/class-ars-constellation-client-portal-client-pages.php (added)
-
tags/1.10.0/admin/class-ars-constellation-client-portal-company.php (added)
-
tags/1.10.0/admin/class-ars-constellation-client-portal-core-authorization.php (added)
-
tags/1.10.0/admin/class-ars-constellation-client-portal-core-file-checks.php (added)
-
tags/1.10.0/admin/class-ars-constellation-client-portal-file.php (added)
-
tags/1.10.0/admin/class-ars-constellation-client-portal-invoice.php (added)
-
tags/1.10.0/admin/class-ars-constellation-client-portal-settings.php (added)
-
tags/1.10.0/admin/class-ars-constellation-client-portal-users.php (added)
-
tags/1.10.0/admin/css (added)
-
tags/1.10.0/admin/css/ars-constellation-client-portal-admin.css (added)
-
tags/1.10.0/admin/css/jquery-ui (added)
-
tags/1.10.0/admin/css/jquery-ui/1.11.1 (added)
-
tags/1.10.0/admin/css/jquery-ui/1.11.1/themes (added)
-
tags/1.10.0/admin/css/jquery-ui/1.11.1/themes/cupertino (added)
-
tags/1.10.0/admin/css/jquery-ui/1.11.1/themes/cupertino/jquery-ui.css (added)
-
tags/1.10.0/admin/css/select2.min.css (added)
-
tags/1.10.0/admin/index.php (added)
-
tags/1.10.0/admin/js (added)
-
tags/1.10.0/admin/js/ars-constellation-client-portal-admin.js (added)
-
tags/1.10.0/admin/js/i18n (added)
-
tags/1.10.0/admin/js/i18n/af.js (added)
-
tags/1.10.0/admin/js/i18n/ar.js (added)
-
tags/1.10.0/admin/js/i18n/az.js (added)
-
tags/1.10.0/admin/js/i18n/bg.js (added)
-
tags/1.10.0/admin/js/i18n/bs.js (added)
-
tags/1.10.0/admin/js/i18n/ca.js (added)
-
tags/1.10.0/admin/js/i18n/cs.js (added)
-
tags/1.10.0/admin/js/i18n/da.js (added)
-
tags/1.10.0/admin/js/i18n/de.js (added)
-
tags/1.10.0/admin/js/i18n/dsb.js (added)
-
tags/1.10.0/admin/js/i18n/el.js (added)
-
tags/1.10.0/admin/js/i18n/en.js (added)
-
tags/1.10.0/admin/js/i18n/es.js (added)
-
tags/1.10.0/admin/js/i18n/et.js (added)
-
tags/1.10.0/admin/js/i18n/eu.js (added)
-
tags/1.10.0/admin/js/i18n/fa.js (added)
-
tags/1.10.0/admin/js/i18n/fi.js (added)
-
tags/1.10.0/admin/js/i18n/fr.js (added)
-
tags/1.10.0/admin/js/i18n/gl.js (added)
-
tags/1.10.0/admin/js/i18n/he.js (added)
-
tags/1.10.0/admin/js/i18n/hi.js (added)
-
tags/1.10.0/admin/js/i18n/hr.js (added)
-
tags/1.10.0/admin/js/i18n/hsb.js (added)
-
tags/1.10.0/admin/js/i18n/hu.js (added)
-
tags/1.10.0/admin/js/i18n/hy.js (added)
-
tags/1.10.0/admin/js/i18n/id.js (added)
-
tags/1.10.0/admin/js/i18n/is.js (added)
-
tags/1.10.0/admin/js/i18n/it.js (added)
-
tags/1.10.0/admin/js/i18n/ja.js (added)
-
tags/1.10.0/admin/js/i18n/km.js (added)
-
tags/1.10.0/admin/js/i18n/ko.js (added)
-
tags/1.10.0/admin/js/i18n/lt.js (added)
-
tags/1.10.0/admin/js/i18n/lv.js (added)
-
tags/1.10.0/admin/js/i18n/mk.js (added)
-
tags/1.10.0/admin/js/i18n/ms.js (added)
-
tags/1.10.0/admin/js/i18n/nb.js (added)
-
tags/1.10.0/admin/js/i18n/nl.js (added)
-
tags/1.10.0/admin/js/i18n/pl.js (added)
-
tags/1.10.0/admin/js/i18n/ps.js (added)
-
tags/1.10.0/admin/js/i18n/pt-BR.js (added)
-
tags/1.10.0/admin/js/i18n/pt.js (added)
-
tags/1.10.0/admin/js/i18n/ro.js (added)
-
tags/1.10.0/admin/js/i18n/ru.js (added)
-
tags/1.10.0/admin/js/i18n/sk.js (added)
-
tags/1.10.0/admin/js/i18n/sl.js (added)
-
tags/1.10.0/admin/js/i18n/sr-Cyrl.js (added)
-
tags/1.10.0/admin/js/i18n/sr.js (added)
-
tags/1.10.0/admin/js/i18n/sv.js (added)
-
tags/1.10.0/admin/js/i18n/th.js (added)
-
tags/1.10.0/admin/js/i18n/tr.js (added)
-
tags/1.10.0/admin/js/i18n/uk.js (added)
-
tags/1.10.0/admin/js/i18n/vi.js (added)
-
tags/1.10.0/admin/js/i18n/zh-CN.js (added)
-
tags/1.10.0/admin/js/i18n/zh-TW.js (added)
-
tags/1.10.0/admin/js/select2.full.min.js (added)
-
tags/1.10.0/admin/js/select2.min.js (added)
-
tags/1.10.0/ars-constellation-client-portal.php (added)
-
tags/1.10.0/assets (added)
-
tags/1.10.0/assets/css (added)
-
tags/1.10.0/assets/css/font-awesome (added)
-
tags/1.10.0/assets/css/font-awesome/css (added)
-
tags/1.10.0/assets/css/font-awesome/css/all.css (added)
-
tags/1.10.0/assets/css/font-awesome/css/all.min.css (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-brands-400.eot (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-brands-400.svg (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-brands-400.ttf (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-brands-400.woff (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-brands-400.woff2 (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-regular-400.eot (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-regular-400.svg (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-regular-400.ttf (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-regular-400.woff (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-regular-400.woff2 (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-solid-900.eot (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-solid-900.svg (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-solid-900.ttf (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-solid-900.woff (added)
-
tags/1.10.0/assets/css/font-awesome/webfonts/fa-solid-900.woff2 (added)
-
tags/1.10.0/assets/img (added)
-
tags/1.10.0/assets/img/accp-full-logo.png (added)
-
tags/1.10.0/includes (added)
-
tags/1.10.0/includes/ars-constellation-client-portal-install-uninstall.php (added)
-
tags/1.10.0/includes/class-ars-constellation-client-portal-activator.php (added)
-
tags/1.10.0/includes/class-ars-constellation-client-portal-deactivator.php (added)
-
tags/1.10.0/includes/class-ars-constellation-client-portal-i18n.php (added)
-
tags/1.10.0/includes/class-ars-constellation-client-portal-loader.php (added)
-
tags/1.10.0/includes/class-ars-constellation-client-portal-utility-functions.php (added)
-
tags/1.10.0/includes/class-ars-constellation-client-portal.php (added)
-
tags/1.10.0/includes/index.php (added)
-
tags/1.10.0/index.php (added)
-
tags/1.10.0/languages (added)
-
tags/1.10.0/languages/ars-constellation-client-portal.pot (added)
-
tags/1.10.0/public (added)
-
tags/1.10.0/public/assets (added)
-
tags/1.10.0/public/assets/index.php (added)
-
tags/1.10.0/public/class-ars-constellation-client-portal-public.php (added)
-
tags/1.10.0/public/css (added)
-
tags/1.10.0/public/css/ars-constellation-client-portal-list-shortcode-styles.css (added)
-
tags/1.10.0/public/css/ars-constellation-client-portal-public.css (added)
-
tags/1.10.0/public/index.php (added)
-
tags/1.10.0/public/js (added)
-
tags/1.10.0/public/js/ars-constellation-client-portal-public.js (added)
-
tags/1.10.0/public/shortcodes (added)
-
tags/1.10.0/public/shortcodes/class-ars-constellation-client-portal-list-shortcodes.php (added)
-
tags/1.10.0/uninstall.php (added)
-
tags/1.8.11 (deleted)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/admin/class-ars-constellation-client-portal-admin.php (modified) (4 diffs)
-
trunk/admin/class-ars-constellation-client-portal-company.php (modified) (1 diff)
-
trunk/admin/class-ars-constellation-client-portal-users.php (modified) (1 diff)
-
trunk/ars-constellation-client-portal.php (modified) (2 diffs)
-
trunk/dev (deleted)
Legend:
- Unmodified
- Added
- Removed
-
constellation-client-portal/trunk/README.txt
r3160933 r3179950 5 5 Requires at least: 6.0.0 6 6 Tested up to: 6.6 7 Stable tag: 1. 9.07 Stable tag: 1.10.0 8 8 Requires PHP: 7.4 9 9 License: GPLv3 or later … … 43 43 * Add internal notes to File and Invoice posts. 44 44 * Export file and invoice lists to CSV. 45 * Create [global client pages](https://adrianrodriguezstudios.com/2023/05/16/how-to-utilize-global-pages/ "Client Portal Global Pages") .45 * Create [global client pages](https://adrianrodriguezstudios.com/2023/05/16/how-to-utilize-global-pages/ "Client Portal Global Pages") that can be accessed by multiple companies. 46 46 * Create global client files that can be accessed by more than one company. 47 47 … … 210 210 211 211 == Changelog == 212 = 1.10.0 (Pro) - 2024-11-1 = 213 * Fix: Fixed nonce issue preventing new post notifications from being sent when posts are created via the Quick Create UI. 214 * Update: Updated the automated email functionality to not send a notification if the company has a status with a prevent-file-access action assigned to it. 215 * Update: Updated the automated email functionality to not send a notification if the primary WP user assigned to a company is not active. 216 * Update: Removed reference to accp_new_file_email_notification that was hooked to the deprecated accp_after_file_upload action. 217 * Fix: Updated the new post email notification function to work with both a new post nonce and a CSV import nonce to fix issue in which new post notification emails were not sent during CSV import. 218 * Fix: Fixed issue with the accp_save_post function that caused errors in automated email post notes, generated via cron, which in turn prevented automated emails from being sent reliably. 219 * Feature: Added new accp_edit_automated_email_cron_event_schedule filter that allows the automated email WP cron event schedule to be edited. 220 * Improvement: Improved the company primary user assignment to prevent cases where an unassigned primary company user could still trigger an automated email notification. 221 * Improvement: Improved the automated email notification digest functionality to ensure that digest emails are grouped properly by company. 222 * Improvement: Improved the automated email date comparisons to ensure that emails are sent for missed cron jobs, and that duplicate emails are not sent when the current date equals the last sent date. 223 * Fix: Fixed issue with undefined item_list variable in automated digest emails. 224 * Update: Removed unneeded instances of wp_doing_cron within automated email functions. 225 * Update: Updated the recurring email date calculation to fix issues in which no post ID's were returned in a set. 226 * Update: Updated the automated email date-before and date-after query arg functions to include a type => date key/value in meta query args that contain a date comparison. 227 228 = 1.10.0 (Core) - 2024-11-1 = 229 * Update: Updated the accp_save_post function to guard against conflicts with other post types, and resolve conflicts with automated email cron note creation. 230 * Fix: Fixed typo in the note that is posted to file and invoice posts when the company is reassigned. 231 * Update: Removed unneeded comment. 232 * Update: Removed extraneous dev file. 233 212 234 = 1.9.0 (Pro) - 2024-10-1 = 213 235 * Update: Updated the syntax to check if wp_cron is disabled in the automated email settings. -
constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-admin.php
r3145386 r3179950 566 566 * 567 567 * @hooked plugin_action_links_{$plugin_file}. 568 *569 * Dev Note: Phpcs flagged the use of unused params. These are related to a WP hook,570 * and the presence of these params is acceptable.571 568 */ 572 569 public function accp_add_links_to_plugin_row_actions_menu( $actions ) { … … 1494 1491 * Append to notes. 1495 1492 */ 1496 $note .= ' A new directory (' . $new_company_path . ') was created.\n';1493 $note .= '<p>A new directory (' . $new_company_path . ') was created.</p>'; 1497 1494 1498 1495 } … … 2237 2234 public function accp_save_post( $post_id, $post = null ) { 2238 2235 2239 if ( ! is_user_logged_in() ) { 2240 return wp_die( 'Invalid command.' ); 2241 } 2242 2243 if ( ! current_user_can( 'upload_files' ) ) { 2236 $post = get_post( $post_id ); 2237 $post_type = $post->post_type; 2238 2239 /** 2240 * Exit early if this is not a client file, 2241 * client invoice, or global file post type. 2242 */ 2243 if ( 'accp_clientfile' !== $post_type && 'accp_clientinvoice' !== $post_type && 'accp_global_file' !== $post_type ) { 2244 2244 return $post_id; 2245 } 2246 2247 if ( ! wp_doing_cron() ) { 2248 2249 if ( ! is_user_logged_in() ) { 2250 return; 2251 } 2252 2253 if ( ! current_user_can( 'upload_files' ) ) { 2254 return $post_id; 2255 } 2245 2256 } 2246 2257 … … 2260 2271 return $post_id; 2261 2272 2262 }2263 2264 $post = get_post( $post_id );2265 $post_type = $post->post_type;2266 2267 if ( 'accp_clientfile' !== $post_type && 'accp_clientinvoice' !== $post_type && 'accp_global_file' !== $post_type ) {2268 return $post_id;2269 2273 } 2270 2274 -
constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-company.php
r3145386 r3179950 1565 1565 wp_mail( filter_var( $email, FILTER_SANITIZE_EMAIL ), esc_html( $subject ), wp_kses_post( $message ), $headers ); 1566 1566 } 1567 1568 1569 /** 1570 * Check if a company has a "prevent_file_access" status saved. 1571 * 1572 * @param int $company_id - The post ID of the company to check. 1573 * 1574 * @return bool $prevent_file_access_enabled - True if the company has a 1575 * status with a "prevent_file_access" action assigned to it. 1576 */ 1577 public function is_prevent_file_access_enabled_for_company( $company_id ) { 1578 1579 if ( ! $company_id || empty( $company_id ) ) { 1580 return false; 1581 } 1582 1583 $company = get_post( $company_id ); 1584 1585 if ( ! $company || empty( $company ) || ! is_object( $company ) ) { 1586 return false; 1587 } 1588 1589 /** 1590 * Get the defined company statuses. 1591 */ 1592 $company_status_settings = get_option( 'accp_company_status_repeater' ) ? get_option( 'accp_company_status_repeater' ) : array(); 1593 1594 if ( ! $company_status_settings || empty( $company_status_settings ) ) { 1595 return false; 1596 } 1597 1598 /** 1599 * Return false if no company status is saved. 1600 */ 1601 $company_status = get_post_meta( $company_id, 'accp_company_status', true ) ? get_post_meta( $company_id, 'accp_company_status', true ) : false; 1602 1603 if ( ! $company_status ) { 1604 1605 return false; 1606 1607 } 1608 1609 /** 1610 * Check the defined statuses to see if the current 1611 * company status has a status action set to prevent_file_access. 1612 */ 1613 foreach ( $company_status_settings as $status_setting ) { 1614 1615 if ( $status_setting['value'] === $company_status ) { 1616 1617 /** 1618 * If the current company status has a defined action of 1619 * "prevent_file_access" in the plugin settings, return 1620 * true here to indicate that "prevent file access" is enabled. 1621 */ 1622 if ( 'prevent_file_access' === $status_setting['status_action'] ) { 1623 1624 $authorized = true; 1625 1626 return $authorized; 1627 1628 } 1629 } 1630 } 1631 1632 /** 1633 * Fallback to false if we have 1634 * made it this far. 1635 */ 1636 return false; 1637 } 1567 1638 } //End ARS_Constellation_Client_Portal_Company Class -
constellation-client-portal/trunk/admin/class-ars-constellation-client-portal-users.php
r3160933 r3179950 781 781 return $users; 782 782 } 783 784 785 /** 786 * Check if WP user is active (i.e. 787 * a Constellation client status of "active" 788 * has been saved to the WP user profile). 789 * 790 * @param int $user_id - The user ID of the user to check. 791 * 792 * @return bool $is_user_active - True if the user has a client status of "active" 793 * saved to their WP user profile. False if no status is saved, or if any 794 * status other than "active" is saved. 795 */ 796 public function is_user_active( $user_id ) { 797 798 if ( ! $user_id || empty( $user_id ) ) { 799 return false; 800 } 801 802 $user = get_user_by( 'id', $user_id ); 803 804 if ( ! $user || empty( $user ) || ! is_object( $user ) ) { 805 return false; 806 } 807 808 $user_status = get_user_meta( $user_id, 'client_status', true ); 809 810 if ( 'active' === $user_status ) { 811 812 return true; 813 } 814 815 return false; 816 } 783 817 } // END ARS_Constellation_Client_Portal_Users -
constellation-client-portal/trunk/ars-constellation-client-portal.php
r3160933 r3179950 7 7 * Plugin URI: https://adrianrodriguezstudios.com/constellation-client-portal/ 8 8 * Description: Create private pages for each of your clients, post private files, and protect your client files from unauthorized users and search engines. <strong>Important:</strong> All Site-level File Protection features will cease to function if the plugin is disabled or uninstalled. 9 * Version: 1. 9.09 * Version: 1.10.0 10 10 * Author: ARS 11 11 * Author URI: https://adrianrodriguezstudios.com … … 57 57 */ 58 58 define('ACCP_PLUGIN_NAME', 'ARS_CONSTELLATION_CLIENT_PORTAL'); 59 define('ACCP_PLUGIN_VERSION', '1. 9.0'); // Change the version in the header as well.59 define('ACCP_PLUGIN_VERSION', '1.10.0'); // Change the version in the header as well. 60 60 define( ACCP_PLUGIN_NAME, ACCP_PLUGIN_VERSION ); 61 61 define( 'ACCP_PLUGIN_FILE_NAME', __FILE__ );
Note: See TracChangeset
for help on using the changeset viewer.