includes/admin/upgrades/upgrade-functions.php 1 location
|
@@ 753-761 (lines=9) @@
|
| 750 |
|
|
| 751 |
|
if ( ! empty( $cached_options ) ) { |
| 752 |
|
foreach ( $cached_options as $option ) { |
| 753 |
|
switch ( true ) { |
| 754 |
|
case ( false !== strpos( $option, 'transient' ) ): |
| 755 |
|
$option = str_replace( '_transient_', '', $option ); |
| 756 |
|
delete_transient( $option ); |
| 757 |
|
break; |
| 758 |
|
|
| 759 |
|
default: |
| 760 |
|
delete_option( $option ); |
| 761 |
|
} |
| 762 |
|
} |
| 763 |
|
} |
| 764 |
|
} |
includes/class-give-cli-commands.php 1 location
|
@@ 782-790 (lines=9) @@
|
| 779 |
|
$error = false; |
| 780 |
|
$option_name = $option_name['option_name']; |
| 781 |
|
|
| 782 |
|
switch ( true ) { |
| 783 |
|
case ( false !== strpos( $option_name, 'transient' ) ): |
| 784 |
|
$option_name = str_replace( '_transient_', '', $option_name ); |
| 785 |
|
$error = delete_transient( $option_name ); |
| 786 |
|
break; |
| 787 |
|
|
| 788 |
|
default: |
| 789 |
|
$error = delete_option( $option_name ); |
| 790 |
|
} |
| 791 |
|
|
| 792 |
|
if ( $error ) { |
| 793 |
|
WP_CLI::log( $this->color_message( self::$counter, $option_name ) ); |