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
|
@@ 943-951 (lines=9) @@
|
| 940 |
|
|
| 941 |
|
if ( ! empty( $cached_options ) ) { |
| 942 |
|
foreach ( $cached_options as $option ) { |
| 943 |
|
switch ( true ) { |
| 944 |
|
case ( false !== strpos( $option, 'transient' ) ): |
| 945 |
|
$option = str_replace( '_transient_', '', $option ); |
| 946 |
|
delete_transient( $option ); |
| 947 |
|
break; |
| 948 |
|
|
| 949 |
|
default: |
| 950 |
|
delete_option( $option ); |
| 951 |
|
} |
| 952 |
|
} |
| 953 |
|
} |
| 954 |
|
} |