acf_loop::update_loop
update_loop
This function will update a loop's setting
Method of the class: acf_loop{}
No Hooks.
Returns
(true|false). true on success
Usage
$acf_loop = new acf_loop(); $acf_loop->update_loop( $i, $key, $value );
- $i
- .
Default:'active' - $key
- .
Default:null - $value
- .
Default:null
Changelog
| Since 5.3.2 | Introduced. |
acf_loop::update_loop() acf loop::update loop code ACF 6.0.4
function update_loop( $i = 'active', $key = null, $value = null ) {
// i
$i = $this->get_i( $i );
// bail early if no set
if ( ! $this->is_loop( $i ) ) {
return false;
}
// set
$this->loops[ $i ][ $key ] = $value;
// return
return true;
}