includes/class-give-cli-commands.php 1 location
|
@@ 794-802 (lines=9) @@
|
| 791 |
|
$error = false; |
| 792 |
|
$option_name = $option_name['option_name']; |
| 793 |
|
|
| 794 |
|
switch ( true ) { |
| 795 |
|
case ( false !== strpos( $option_name, 'transient' ) ): |
| 796 |
|
$option_name = str_replace( '_transient_', '', $option_name ); |
| 797 |
|
$error = delete_transient( $option_name ); |
| 798 |
|
break; |
| 799 |
|
|
| 800 |
|
default: |
| 801 |
|
$error = delete_option( $option_name ); |
| 802 |
|
} |
| 803 |
|
|
| 804 |
|
if ( $error ) { |
| 805 |
|
WP_CLI::log( $this->color_message( self::$counter, $option_name ) ); |
includes/admin/upgrades/upgrade-functions.php 1 location
|
@@ 985-993 (lines=9) @@
|
| 982 |
|
|
| 983 |
|
if ( ! empty( $cached_options ) ) { |
| 984 |
|
foreach ( $cached_options as $option ) { |
| 985 |
|
switch ( true ) { |
| 986 |
|
case ( false !== strpos( $option, 'transient' ) ): |
| 987 |
|
$option = str_replace( '_transient_', '', $option ); |
| 988 |
|
delete_transient( $option ); |
| 989 |
|
break; |
| 990 |
|
|
| 991 |
|
default: |
| 992 |
|
delete_option( $option ); |
| 993 |
|
} |
| 994 |
|
} |
| 995 |
|
} |
| 996 |
|
} |