Title: Cheating are we?
Last modified: July 7, 2017

---

# Cheating are we?

 *  [akingphn](https://wordpress.org/support/users/akingphn/)
 * (@akingphn)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/cheating-are-we/)
 * I would like to change the ‘cheating are we?’ message that appears when a team
   member is trying to access an area of the website they do not have permission
   to access. I can see this topic has been posted before but I can’t see a resolution
   that doesn’t involve winding the WordPress version back. Cheers.

Viewing 1 replies (of 1 total)

 *  Moderator [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/cheating-are-we/#post-9297958)
 * This can be changed with a simple custom plugin to override translatable strings
 * As an example, you can try this:
 *     ```
       <?php
       /*
       Plugin Name: No Cheating
       Plugin URI: http://cubecolour.co.uk
       Description: Change the 'Cheatin' huh?' message
       Author: cubecolour
       Version: 0.0.1
       Author URI: http://cubecolour.co.uk
       Text Domain: no-cheating
   
       Licence: GPL
   
       */
   
       if ( ! defined( 'ABSPATH' ) ) exit;
   
       /**
        * No Cheating
        *
        */
       function ccnc_filter_gettext( $translated, $original, $domain ) {
   
           // Array of original & replacement strings
           $strings = array(
               "Cheatin’ uh?" => "Computer says no",
           );
   
       	// Replace the translation with the new string
           if ( ! empty( $strings[$original] ) ) {
               $translations = get_translations_for_domain( $domain );
               $translated = $translations->translate( $strings[$original] );
           }
   
           return $translated;
       }
       add_filter( 'gettext', 'ccnc_filter_gettext', 10, 3 );
       ```
   
 * Change the example “Computer says no” text to whatever you want to be returned
   in place of the “Cheatin’ uh?” message.
 * Note that **Cheatin’ uh?** is used as that is the orginal string in WordPress
   being translated to “Cheating are we?” in your localised version.
 * Also ensure that the apostrophe in the **Cheatin’ uh?** entry in the $strings
   array is replaced with the HTML character code **&****#****8217;** as pasting
   the character code into the forum code block above turned it into an apostrophe.
 * Other strings can also be replaced by adding them to the $strings array.
    -  This reply was modified 8 years, 10 months ago by [cubecolour](https://wordpress.org/support/users/numeeja/).
    -  This reply was modified 8 years, 10 months ago by [cubecolour](https://wordpress.org/support/users/numeeja/).
      Reason: fix html code for apostrophe being shown as apostrophe

Viewing 1 replies (of 1 total)

The topic ‘Cheating are we?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [cubecolour](https://wordpress.org/support/users/numeeja/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/cheating-are-we/#post-9297958)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
