Filter hook 'alloptions'

in WP Core File wp-includes/option.php at line 661

View Source

alloptions

Filter Hook
Description
Filters all options after retrieving them.

Hook Information

File Location wp-includes/option.php View on GitHub
Hook Type Filter
Line Number 661

Hook Parameters

Type Name Description
array $alloptions Array with all options.

Usage Examples

Basic Usage
<?php
// Hook into alloptions
add_filter('alloptions', 'my_custom_filter', 10, 1);

function my_custom_filter($alloptions) {
    // Your custom filtering logic here
    return $alloptions;
}

Source Code Context

wp-includes/option.php:661 - How this hook is used in WordPress core
<?php
 656  	 *
 657  	 * @since 4.9.0
 658  	 *
 659  	 * @param array $alloptions Array with all options.
 660  	 */
 661  	return apply_filters( 'alloptions', $alloptions );
 662  }
 663  
 664  /**
 665   * Primes specific network options for the current network into the cache with a single database query.
 666   *

PHP Documentation

<?php
/**
	 * Filters all options after retrieving them.
	 *
	 * @since 4.9.0
	 *
	 * @param array $alloptions Array with all options.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/option.php
Related Hooks

Related hooks will be displayed here in future updates.