Admin and Site Enhancements (ASE)

Admin and Site Enhancements (ASE) 8.8.3

No permission to download
* **[FIXED in Free and Pro] Security >> Limit Login Attempts**: fixed an error related to failed cron execution for scheduled clean up of the failed log attempts log table. Props to [DJABHipHop](https://wordpress.org/support/users/pressthemes1/) for [reporting](https://wordpress.org/support/topic/the-scheduled-event-asenha_failed_login_attempts_log_cleanup_by_amount-failed/) this.

* **[FIXED in Free and Pro] Content Management >> Media Replacement**: fix an issue where Media Replacement outputs media library Underscore templates (#tmpl-media-frame, #tmpl-media-modal, #tmpl-uploader-inline, etc.) in the frontend in a certain scenario. Props to Corey M. for reporting this in detail.

* **[FIXED in Pro] Custom Code >> Code Snippets Manager**: fixed missing "Source Code" button since WordPress 7.0 in the snippet description toolbar. Props to Elmira T. for reporting the issue along with the code fix for it!

* **[IMPROVED and FIXED in Pro] Content Management >> Custom Content Types**:
* In the custom field group feature, implemented conditional display for custom fields when inputting values in post / term screens and frontend forms. Props to Henry R., Eric, Ben T. and Himanshu A. for prompting this improvement.
* Fixed PHP fatal error that occurs in MasterStudy LMS analytics pages when the Custom Content Types module is enabled. Props to George N. for reporting the issue in detail and facilitating the troubleshooting process.

* **[IMPROVED in Pro] Content Management >> Public Preview for Drafts**:
* Preview link expiry is now tied to individual posts and in the post edit screen, a reset button has been added next to the "Public Preview" button/link to reset the expiry to the max days set in the module settings. Props to Greg F. for prompting the following improvements.
* Additionally, in the post edit screen, added a button to copy the preview link to the clipboard and also added an "Expires in..." note below the "Public Preview" button/link to check the remaining time before the preview link expires.

* **[TRANSLATION in Free and Pro]** ASE is now being translated into [38 languages](https://translate.wpase.com/):
* **Added new/improved translation** for:
* ASE Free: Added Estonian, props to [Aleksander K.](https://profiles.wordpress.org/itagentuur/). Updated Turkish, Serbian, Portuguese (Brazil), Polish, Persian, Norwegian, German, Norwegian.
* **[FIXED in Free and Pro] Security >> Limit Login Attempts**: fixed an error related to failed cron execution for scheduled clean up of the failed log attempts log table. Props to [DJABHipHop](https://wordpress.org/support/users/pressthemes1/) for [reporting](https://wordpress.org/support/topic/the-scheduled-event-asenha_failed_login_attempts_log_cleanup_by_amount-failed/) this.

* **[FIXED in Free and Pro] Content Management >> Media Replacement**: fix an issue where Media Replacement outputs media library Underscore templates (#tmpl-media-frame, #tmpl-media-modal, #tmpl-uploader-inline, etc.) in the frontend in a certain scenario. Props to Corey M. for reporting this in detail.

* **[FIXED in Pro] Custom Code >> Code Snippets Manager**: fixed missing "Source Code" button since WordPress 7.0 in the snippet description toolbar. Props to Elmira T. for reporting the issue along with the code fix for it!

* **[IMPROVED and FIXED in Pro] Content Management >> Custom Content Types**:
* In the custom field group feature, implemented conditional display for custom fields when inputting values in post / term screens and frontend forms. Props to Henry R., Eric, Ben T. and Himanshu A. for prompting this improvement.
* Fixed PHP fatal error that occurs in MasterStudy LMS analytics pages when the Custom Content Types module is enabled. Props to George N. for reporting the issue in detail and facilitating the troubleshooting process.

* **[IMPROVED in Pro] Content Management >> Public Preview for Drafts**:
* Preview link expiry is now tied to individual posts and in the post edit screen, a reset button has been added next to the "Public Preview" button/link to reset the expiry to the max days set in the module settings. Props to Greg F. for prompting the following improvements.
* Additionally, in the post edit screen, added a button to copy the preview link to the clipboard and also added an "Expires in..." note below the "Public Preview" button/link to check the remaining time before the preview link expires.

* **[TRANSLATION in Free and Pro]** ASE is now being translated into [38 languages](https://translate.wpase.com/):
* **Added new/improved translation** for:
* ASE Free: Added Estonian, props to [Aleksander K.](https://profiles.wordpress.org/itagentuur/). Updated Turkish, Serbian, Portuguese (Brazil), Polish, Persian, Norwegian, German, Norwegian.
* **[IMPROVED in Pro] Disable Components >> Disable REST API**: Fixed a regression that caused a logged-in user with eligible user role(s) who tries to perform a standard GET request in the browser to get the `rest_api_authentication_required` error.

* **[IMPROVED and FIXED in Pro] Content Management >> Custom Content Types >> Custom Field Groups**:
* `update_cf()` now works with custom fields placed on taxonomy terms. Please read the [documentation](https://www.wpase.com/documentation/custom-field-types/#update_cf) for details. Props to Matteo C. for prompting this improvement.
* Custom field values can now be exposed in the REST API when they are placed on taxonomy terms. They can also be updated via the REST API. Please read the [documentation](https://www.wpase.com/documentation/custom-field-types/#rest-api) for details. Props to Matteo C. for prompting this improvement.
* added a mechanism to ensure the `asenha_cfgroup_values` and `asenha_cfgroup_sessions` tables exist / are being created so saving custom field values will properly work. Props to Matteo C. for reporting a related issue and prompting this improvement.
* Added "Visual | Code" tabs for WYSIWYG field. Props to Stéphane N. for prompting this improvement.
* Enable rich-text for field instructions. Props to Stéphane N. for prompting this improvement.
* Added "Add Media" button/feature to the WYSIWYG field when the custom field group is placed on taxonomy terms.
* Fixed an error related to loading the WYSIWYG field in the block editor when on a WordPress sub-folder install. Props to David G. for reporting the issue in detail, with a great clue at the source of the problem.
* Fixed WYSIWYG field's toolbar button color becoming white on click/focus.
* Fixed PHP deprecation that occurs in certain scenarios when rendering the text (oembed) field.

* **[IMPROVED in Pro] Utilities >> Site Backup and Migration**:
* Improve the robustness and reliability of backup operation when there are volatile files involved, i.e. files that got updated and changed their size, temporary files that got deleted, or problematic files that can not be reliably read. These files are now listed properly in the backup logs and to a certain treshold, will no longer cause the backup to fail. Props to Duncan H. for prompting this improvement.
* Improve the robustness and reliability of restore operation from remote locations (Amazon S3, S3-compatible storage, Google Drive, Dropbox, WebDAV, SFTP, WP Site). Props to @melisgs for prompting this improvement.

* **[TRANSLATION in Free and Pro]** ASE is now being translated into [38 languages](https://translate.wpase.com/):
* **Added new/improved translation** for:
* ASE Free: Updated Vietnamese, Swedish, Spanish, Romanian, Portuguese (Brazil), Norwegian, Dutch
* ASE Pro: Updated Portuguese (Brazil). Special props to [Valdemir M.](https://profiles.wordpress.org/valdemirmaran/) for completing the translation to Portuguese (Brazil) of the Site Backup and Migration module with 1,900+ strings!
* **[IMPROVED in Free and Pro] WordPress 7.0 Compatibility and Adjustments**:
* Confirmed compatibility with WordPress 7.0
* CSS adjustments across ASE settings page and various module pages / UI components to better align with the new 'Modern' theme introduced with WordPress 7.0.

* **[IMPROVED in Free and Pro] Disable Components >> Disable REST API**:
* [ASE Free] Improved the fidelity of error type and message returned when trying to access REST API route/endpoint. Props to Kris H. for prompting this improvement.
* [ASE Pro] Improved normalization of whitelisted routes, so the inclusion of 'wp-json' in front of the route no longer silently fails. Props to Kris H. for prompting this improvement.

* **[FIXED in Free and Pro] Log In/Out & Register >> Disable User Account**: Fixed an issue where browser's "Leave site?" dialog is triggerred when navigating away from the profile edit screen after marking the account as disabled. Props to Jayron C. for reporting the issue in detail with a screen recording.

* **[IMPROVED in Pro] Admin Interface >> Hide Admin Bar**: add an option for user roles the admin bar is not always hidden for, to auto-hide it on the frontend on first page load and add an arrow icon to toggle the visibility. Props to Richard S. for prompting this improvement.

* **[IMPROVED in Pro] Utilities >> Site Backup and Migration**: improved the UX when adding or editing a backup location, so there is little to no chance that a location is not being tested and connected properly. Props to Kenneth S. for prompting this improvement.

* **[IMPROVED in Pro] Custom Code >> Code Snippets Manager**: fixed an issue where admin heartbeat repeatedly performs unnecessary attempt at syncing capabilities related to the Code Snippets Editor role. Props to Timothy L. for reporting the issue in detail.

* **[TRANSLATION in Free and Pro]** ASE is now being translated into [38 languages](https://translate.wpase.com/):
* **Added new/improved translation** for:
* ASE Free: Updated Turkish, Swedish, Romanian, Portuguese (Brazil), Polish, Norwegian, Dutch (Netherlands), Dutch (Belgium), Catalan, Azerbaijani.
* ASE Pro: Updated Norwegian, Danish, Polish.
no change log for this version
* **[IMPROVED in Free and Pro] PHP 8.5 compatibility**: Fixed a particular type of PHP deprecation when ASE is installed in a site with PHP 8.5. Props to [@skoen](https://wordpress.org/support/users/skoen/) for [reporting](https://wordpress.org/support/topic/case-statements-followed-by-a-semicolon-are-deprecated-2/) this.

* **[IMPROVED in Pro] Security >> Two-Factor Authentication (2FA)**: Added a mechanism to detect invalid stored TOTP key causing fatal error on logging in with the authenticator app 2FA method. Login in such a scenario will no longer result in a fatal error and will now show a custom error message asking user to reset their authenticator app 2FA settings in the profile edit screen. Props to Thorsten H. for reporting the error with the full error stack trace, which was very helpful to diagnose the issue.

* **[IMPROVED in Pro] Content Management >> Open All External Links in New Tab**:
* Added an option to exclude links that contain certain domains / subdomains from opening in a new tab. Props to Sunny T. and Julian S. for prompting this improvement.
* Added an option to not add `rel="nofollow"` to links that contain certain domains / subdomains. Props to Sunny T. and Stijn V. for prompting this improvement.

* **[FIXED in Pro] Utilities >> Form Builder**: Fixed Cloudflare Turnstile failing to validate on the second submission attempt when a required field was empty on the first submmission and triggerred a validation error. This necessitated a page reload and re-filling all the form field. With the fix, user can fill the empty required field and re-submit immediately. Props to Marcellus J. for reporting the issue and facilitating the troubleshooting process.

* **[FIXED in Pro] Content Management >> Custom Content Types >> Custom Field Groups**: Fixed datetime field output formatting in the Bricks builder not following the field settings. Props to David W. for reporting the issue in detail.

* **[TRANSLATION in Free and Pro]** ASE is now being translated into [38 languages](https://translate.wpase.com/):
* **Added new/improved translation** for:
* ASE Free: Updated Portuguese (Brazil), Polish, Norwegian, Czech.
* ASE Pro: Updated Norwegian, Indonesian.
[IMPROVED in Free and Pro] Disable Components >> Disable Smaller Components: add an option to disable admin email notification after password change by a user.
[IMPROVED in Pro] Utilities >> Site Backup and Migration:

Backup: Improved the reliability of the high-compatibility mode in both manual backup and policy-run backup. Props to Ian F. for prompting this improvement.
Backup: folders with the name 'cache' but is not /wp-content/cache/ are no longer auto-excluded from the backup archive in backup and migration operations, and also not marked as auto-excluded in sync operation. Props to Denis G.F. for prompting this improvement.
Sync: Added handling for post ID collission in post types scoped sync. If a post ID is already used in the target site, a new ID is created for the synced post, and terms and ASE custom fields data will be associated with the new post ID.

[FIXED in Pro] Utilities >> Form Builder: fixed selection in the "Submit Button Alignment" field not being properly saved and displayed on page reload when "Center" or "Stretch" is selected. props to Marvin A. for reporting the issue.
[TRANSLATION in Free and Pro] ASE is now being translated into 38 languages:

Added new/improved translation for:
ASE Free: Update Portuguese (Brazil), Polish, Norwegian, Dutch, Hungarian.
ASE Pro: Update Romanian, Danish, Norwegian, Hungarian.
* **[IMPROVED in Free and Pro] Disable Components >> Disable Smaller Components**: added an option to disable user email notification after password change.

* **[IMPROVED in Pro] Utilities >> Site Backup and Migration**:
* Added "Upload a Backup Archive" and "Transfer a Backup Archive from URL" actions in the emergency restore script.
* Added checks in the "Restore" tab and emergency restore's "Upload a Backup Archive" and "Transfer a Backup Archive from URL" actions so archive for another site with different domain will be rejected. Props to David M.C. for prompting this improvement.
* Improved the robustness and reliability of sync operation. Props to David M.C. for prompting this improvement.
* Scoped media sync: when syncing "Selected post types only", the "Media Library" component now will auto-select a new option "Only files used by selected posts", so there is no need to sync the whole media library for this scenario. Props to David M.C. for prompting this improvement.
* Scoped terms sync: when selecting to sync only certain post type posts, it's now possible to also sync only taxonomy terms in use / related to those posts.
* Scoped custom field values sync: when selecting to sync only certain post type posts (whose CPT is configured by ASE), it's now possible to also sync only custom field values related to those posts.
* Add option to sync all or some custom post type configurations created via ASE's Custom Content Types module in the "Settings >> Custom Post Types" admin page.
* Add option to sync all or some custom taxonomy configurations created via ASE's Custom Content Types module in the "Settings >> Custom Taxonomies" admin page.
* Add option to sync all or some custom field group configurations created via ASE's Custom Content Types module in the "Settings >> Custom Field Groups" admin page.

* **[IMPROVED in Pro] Content Management >> Custom Content Types >> Custom Field Groups**: when no specific placement rules have been selected for a custom field group, the associated meta box will no longer show up in unrelated locations, e.g. all post types post edit screen.

* **[TRANSLATION in Free and Pro]** ASE is now being translated into [38 languages](https://translate.wpase.com/):
* **Added new/improved translation** for:
* ASE Free: Updated Portuguese (Brazil), Polish, Norwegian, Indonesian.
* ASE Pro: Updated Arabic, Indonesian, Danish.
* **[ADDED in Pro] Utilities >> Site Backup and Migration**: Backup site files and database, restore from backups, and migrate or sync to another server. [Find out more >>](https://www.wpase.com/?page_id=21378&preview=true).

* **[FIXED in Free and Pro] Log In/Out | Register >> Change Login URL**: fixed a regression that exposes the custom login URL when a certain URL pattern is loaded by a public visitor. Props to @dariobros for reporting the issue.

* **[IMPROVED in Pro] Utilities >> File Manager**: add option to put the folder tree on the left side, and another option to add the File Manager as a top-level menu item instead of submenu under Tools. Props to Christian S. for prompting these improvements.

* **[FIXED and IMPROVED in Pro] Custom Code >> Code Snippets Manager**:
* default snippets storage folder to the /wp-content/ root for when there are no snippets created yet.
* prevent stripping valid backslashes on saving a snippet and restoring from revision. Props to Martin S. for reporting the issue in detail.

* **[IMPROVED in Pro] Utilities >> Form Builder**:
* Enable "Tags" for email notification's "From Name" field, which can be useful if you want to use the "Name" field in a form as the "From Name" of the email notification. Props to Duncan H. for prompting this improvement.
* Field labels in "Tags" selector in email notification and auto-responder settings pages now are properly stripped from raw HTML tags.
* Hidden fields are no longer included in auto-responder emails.
* Add option to customize placeholder for dropdowns in matrix fields (the default is "Choose one"). Props to Uli L. for prompting this improvement.

* **[FIXED in Pro] Admin Interface >> Admin Menu Organizer**: fixed an issue where the "Options" toggle is not working for submenu items when the site language is set to 简体中文 (zh_CN) or 繁體中文 (zh_TW). Props to John Y. for reporting this and for facilitating the troubleshooting process.

* **[TRANSLATION in Free and Pro]** ASE is now being translated into [38 languages](https://translate.wpase.com/):
* **Added new/improved translation** for:
* ASE Free: Updated Portuguese (Brazil), Polish, Norwegian.
* **[FIXED in Free and Pro] Admin Interface >> Hide Admin Notices**: fixed notices not being hidden in Admin Columns plugin's admin pages. Props to John D. for reporting the issue.

* **[IMPROVED in Free and Pro] Utilities >> Password Protection**: cron requests now bypasses password protection.

* **[IMPROVED in Pro] Content Management >> Custom Content Types >> Custom Field Group**: Added the ability to expose / update custom field values in / via WP REST API ([docs >>](https://www.wpase.com/documentation/custom-field-types/#rest-api)). Props to Gabriel, Tadeas, Ale M., Richard W., Riza M.A., Rahul S., Matt E., Jesús, Liza C. and Matteo C. for prompting this improvement.

* **[FIXED and IMPROVED in Pro] Custom Code >> Code Snippets Manager**:
* fixed a bug with the "Disable the Code Snippets Editor role" is checked that, in a certain scenario, causes administrator users to not see the "Code Snippets" menu and can not access snippets list, add and edit screens.
* added a new settings (checkbox) to migrate the snippets storage folder to /wp-content/ root. Props to Rajan D. for prompting this improvement.

* **[TRANSLATION in Free and Pro]** ASE is now being translated into [38 languages](https://translate.wpase.com/):
* **Added new/improved translation** for:
* ASE Free: Updated Spanish (Spain), Spanish (Chile), Portuguese (Brazil), Polish, Norwegian, Dutch, Arabic
* ASE Pro: Updated Norwegian, Portuguese (Brazil), Polish
Top