Title: set_screen_option_{$option}
Published: August 11, 2020
Last modified: May 20, 2026

---

# apply_filters( “set_screen_option_{$option}”, mixed $screen_option, string $option, int $value )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#wp--skip-link--target)

Filters a screen option value before it is set.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#description)󠁿

The dynamic portion of the hook name, `$option`, refers to the option name.

Returning false from the filter will skip saving the current option.

### 󠀁[See also](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#see-also)󠁿

 * [set_screen_options()](https://developer.wordpress.org/reference/functions/set_screen_options/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#parameters)󠁿

 `$screen_option`mixed

The value to save instead of the option value.
 Default false (to skip saving the
current option).

`$option`string

The option name.

`$value`int

The option value.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#source)󠁿

    ```php
    $value = apply_filters( "set_screen_option_{$option}", $screen_option, $option, $value );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/misc.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/misc.php#L797)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/misc.php#L797-L797)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#related)󠁿

| Used by | Description | 
| [set_screen_options()](https://developer.wordpress.org/reference/functions/set_screen_options/)`wp-admin/includes/misc.php` |

Saves option for number of rows when listing posts, pages, comments, etc.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/set_screen_option_option/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.4.2](https://developer.wordpress.org/reference/since/5.4.2/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fset_screen_option_option%2F)
before being able to contribute a note or feedback.