WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp load alloptions

Description

Retrieve all autoload options or all options, if no autoloaded ones exist. This function caches its results. It will pull the autoload options by default unless that fails, in which case it will return all options.

Use this function instead of the deprecated function get_alloptions()

Usage

<?php $all_options wp_load_alloptions(); ?>

Parameters

None.

Return Values

(array) 
List of all options.

Examples

<?php 
  $all_options 
wp_load_alloptions();
  
$my_options = array();
  foreach( 
$all_options as $name => $value ) {
    if(
stristr($name'_transient')) $my_options[$name] = $value;
  }
  
print_r($my_options);
?>

Notes

Change Log

Since: 1.0.0

Source File

wp_load_alloptions() is located in wp-includes/option.php.

Related

See also index of Function Reference and index of Template Tags.