$id_base =
$this->id_data
['base'
];
$is_multidimensional = !
empty( $this->id_data
['keys'
] );
$multidimensional_filter = array
( $this, '_multidimensional_preview_filter'
);
/*
* Check if the setting has a pre-existing value (an isset check),
* and if doesn't have any incoming post value. If both checks are true,
* then the preview short-circuits because there is nothing that needs
* to be previewed.
*/
$undefined =
new stdClass();
$needs_preview =
( $undefined !==
$this->
post_value( $undefined ) );
$value = null;
// Since no post value was defined, check if we have an initial value set.
if ( !
$needs_preview ) { if ( $this->is_multidimensional_aggregated
) { $root = self::
$aggregated_multidimensionals[ $this->type
][ $id_base ]['root_value'
];
$value =
$this->
multidimensional_get( $root,
$this->id_data
['keys'
],
$undefined );
} else { $default =
$this->default;
$this->default =
$undefined; // Temporarily set default to undefined so we can detect if existing value is set.
$value =
$this->
value();