General: Replace Cheatin’ uh? with friendlier error messages.

While intended as a playful error message, `Cheatin’ uh?` can be interpreted as insulting or accusatory in an already stressful situation. This replaces Cheatin’ with more meaningful error messages, depending on the error that occurs.

Props ElectricFeet, EricMeyer, karmatosed, dd32, BandonRandon, melchoyce for language; dmsnell for original patch; peterwilsoncc.
Fixes #38332.



git-svn-id: https://develop.svn.wordpress.org/trunk@42648 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson
2018-02-05 02:29:53 +00:00
parent d512973c84
commit f317869c7f
24 changed files with 47 additions and 46 deletions

View File

@@ -38,7 +38,7 @@ if ( ! $post_type_object ) {
if ( ! current_user_can( $post_type_object->cap->edit_posts ) ) {
wp_die(
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
'<h1>' . __( 'You don&#8217;t have permission to do this.' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to edit posts in this post type.' ) . '</p>',
403
);