Opened 9 years ago
Closed 9 years ago
#33684 closed enhancement (fixed)
Cheatin' uh?: Update in wp-includes/class-wp-customize-manager.php
Reported by: | kraftbj | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Role/Capability | Keywords: | has-patch |
Focuses: | ui | Cc: |
Description
Spin off of #14530 to track updating the Cheatin error message to something context specific. Patch needs to be split off of original ticket.
Attachments (3)
Change History (12)
#1
@
9 years ago
- Keywords has-patch added
This file has a custom wp_die handler, so I applied the logic and spirit of #14530 like this:
- "Upstream" from the actual
wp_die
call, I added error messages to each instance of the class'wp_die
function. - For the generic theme error return, I used
$this->theme()->errors()->get_error_message()
. To follow the chain, the class'theme()
callswp_get_theme
, which is aWP_Theme
object.WP_Theme::errors()
returns theWP_Error
object, soget_error_message
returns the pretty error message.
An example to test that error message:
- WordPress install with multiple themes installed. Access the Customizer. Preview theme A.
- From another window, delete theme B.
- From the original window, attempt to Live Preview theme A.
The result will be the attached screenshot.
#3
@
9 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 33889:
#4
@
9 years ago
Do wp_die()
messages need to be translatable? If we're going to be giving messages that pertain to being more useful to the user that caused them, then being able to have those messages in the user's desired language has got to be a necessity?
#5
@
9 years ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
Re-opening, as I've now seen that sibling commits do indeed have translatable strings, which simply got missed for this ticket.
initial patch