Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: set_screen_option_{$option}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
783                 * @since 5.4.2
784                 *
785                 * @see set_screen_options()
786                 *
787                 * @param mixed   $screen_option The value to save instead of the option value.
788                 *                               Default false (to skip saving the current option).
789                 * @param string  $option        The option name.
790                 * @param int     $value         The option value.
791                 */
792                $value = apply_filters( "set_screen_option_{$option}", $screen_option, $option, $value );
793
794                if ( false === $value ) {
795                     return;
796                }
797
798                break;
799      }
800
801      update_user_meta( $user->ID, $option, $value );