| 484 | | if ( $expiration ) |
| 485 | | update_option( $transient_timeout, time() + $expiration ); |
| 486 | | $result = update_option( $transient, $value ); |
| | 484 | $skipupdate = false; |
| | 485 | if ( $expiration ) { |
| | 486 | if (false === get_option($transient_timeout)) { |
| | 487 | delete_option($transient); |
| | 488 | add_option( $transient_timeout, time() + $expiration, '', 'no' ); |
| | 489 | $result = add_option( $transient, $value, '', 'no' ); |
| | 490 | $skipupdate = true; |
| | 491 | } else |
| | 492 | update_option( $transient_timeout, time() + $expiration ); |
| | 493 | } |
| | 494 | if (false === $skipupdate) |
| | 495 | $result = update_option( $transient, $value ); |