Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_max_autoloaded_option_size

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
1353 function wp_filter_default_autoload_value_via_option_size( $autoload, $option, $value, $serialized_value ) {
1354      /**
1355       * Filters the maximum size of option value in bytes.
1356       *
1357       * @since 6.6.0
1358       *
1359       * @param int    $max_option_size The option-size threshold, in bytes. Default 150000.
1360       * @param string $option          The name of the option.
1361       */
1362      $max_option_size = (int) apply_filters( 'wp_max_autoloaded_option_size', 150000, $option );
1363      $size            = ! empty( $serialized_value ) ? strlen( $serialized_value ) : 0;
1364
1365      if ( $size > $max_option_size ) {
1366           return false;
1367      }
1368
1369      return $autoload;
1370 }
1371