wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_options › WordPress Function

Od6.4.0
Przestarzałyn/a
get_options ( $options )
Parametry:
  • (string[]) $options An array of option names to retrieve.
    Wymagane: Tak
Powrót:
  • (array) An array of key-value pairs for the requested options.
Zdefiniowane na:
Codex:

Retrieves multiple options.

Options are loaded as necessary first in order to use a single database query at most.


Źródło

function get_options( $options ) {
	wp_prime_option_caches( $options );

	$result = array();
	foreach ( $options as $option ) {
		$result[ $option ] = get_option( $option );
	}

	return $result;
}