Title: Incorrect plugin work
Last modified: October 9, 2023

---

# Incorrect plugin work

 *  [ordasvit](https://wordpress.org/support/users/ordasvit/)
 * (@ordasvit)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/incorrect-plugin-work/)
 * Hello
 * Error in your plugin:
 * Your plugin show:
 * WARNING: Found `echo get_theme_mod` in file_name. [Theme options must be escaped (Opens in a new window).](https://developer.wordpress.org/themes/theme-security/data-sanitization-escaping/#escaping-securing-output).
 * BUT, for setting definition WP have special check algorithm, as example below
   for define “`display_excerpt_or_full_post`” settings, WP use “`sanitize_callback`”
   function:
 *     ```wp-block-code
               $wp_customize->add_setting(
                   'display_excerpt_or_full_post',
                   array(
                       'capability'        => 'edit_theme_options',
                       'default'           => 'excerpt',
                       'sanitize_callback' => static function( $value ) {
                           return 'excerpt' === $value || 'full' === $value ? $value : 'excerpt';
                       },
                   )
               );
       ```
   
 * so as result we need define `sanitize_callback` function and also add same check
   for by pass your plugin check

The topic ‘Incorrect plugin work’ is closed to new replies.

 * ![](https://ps.w.org/theme-check/assets/icon-128x128.png?rev=972579)
 * [Theme Check](https://wordpress.org/plugins/theme-check/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/theme-check/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/theme-check/)
 * [Active Topics](https://wordpress.org/support/plugin/theme-check/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/theme-check/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/theme-check/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [ordasvit](https://wordpress.org/support/users/ordasvit/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/incorrect-plugin-work/)
 * Status: not resolved