Calculates total amount of autoloaded data.
Source
public function get_autoloaded_options_size() {
$alloptions = wp_load_alloptions();
$total_length = 0;
foreach ( $alloptions as $option_value ) {
if ( is_array( $option_value ) || is_object( $option_value ) ) {
$option_value = maybe_serialize( $option_value );
}
$total_length += strlen( (string) $option_value );
}
return $total_length;
}
Changelog
Version | Description |
---|---|
6.6.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.