| 497 | | if ( false === get_option( $transient ) ) { |
| 498 | | $autoload = 'yes'; |
| 499 | | if ( $expiration ) { |
| 500 | | $autoload = 'no'; |
| 501 | | add_option( $transient_timeout, time() + $expiration, '', 'no' ); |
| 502 | | } |
| 503 | | $result = add_option( $transient, $value, '', $autoload ); |
| 504 | | } else { |
| 505 | | if ( $expiration ) |
| 506 | | update_option( $transient_timeout, time() + $expiration ); |
| 507 | | $result = update_option( $transient, $value ); |
| 508 | | } |
| | 497 | $autoload = 'yes'; |
| | 498 | |
| | 499 | if ( false != get_option( $transient ) ) { |
| | 500 | delete_option( $transient ); |
| | 501 | delete_option( $transient_timeout ); |
| | 502 | } |
| | 503 | |
| | 504 | if ( $expiration ) { |
| | 505 | $autoload = 'no'; |
| | 506 | add_option( $transient_timeout, time() + $expiration, '', 'no' ); |
| | 507 | } |
| | 508 | |
| | 509 | $result = add_option( $transient, $value, '', $autoload ); |