LLMS_Abstract_Integration::get_option_default_value( mixed $default_value, string $full_option_name, bool $passed_default_value )

Autoload default option values from values defined in the integration settings array

Description Description

This will only run when extending integration classes define a version property greater than 1.

This is a callback function for the WP core filter default_option_{$option}.

Top ↑

Parameters Parameters


(mixed) (Required) The default value. If no value is passed to get_option(), this will be an empty string. Otherwise it will be the default value passed to the method.


(string) (Required) The full (prefixed) option name.


(bool) (Required) Whether or not a default value was passed to get_option().

Top ↑

Return Return

(mixed) The default option value.

Top ↑

Source Source

File: includes/abstracts/llms.abstract.integration.php

	public function get_option_default_value( $default_value, $full_option_name, $passed_default_value ) {

		// If a default value is explicitly passed, use it.
		if ( $passed_default_value ) {
			return $default_value;

		foreach ( $this->get_settings() as $setting ) {

			if ( ! empty( $setting['id'] ) && $full_option_name === $setting['id'] ) {
				return isset( $setting['default'] ) ? $setting['default'] : $default_value;

		return $default_value;


Top ↑

Changelog Changelog

Version Description
4.21.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.