Skip to content

Commit 1c61b98

Browse files
authored
Merge branch 'master' into fix/delete-all-transients
2 parents 97ee7dc + 9bcfdaf commit 1c61b98

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Transient_Command.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,23 +201,22 @@ public function delete( $args, $assoc_args ) {
201201
* Determines the type of transients implementation.
202202
*
203203
* Indicates whether the transients API is using an object cache or the
204-
* options table.
204+
* database.
205205
*
206206
* For a more complete explanation of the transient cache, including the
207207
* network|site cache, please see docs for `wp transient`.
208208
*
209209
* ## EXAMPLES
210210
*
211211
* $ wp transient type
212-
* Transients are saved to the wp_options table.
212+
* Transients are saved to the database.
213213
*/
214214
public function type() {
215-
global $_wp_using_ext_object_cache, $wpdb;
216-
217-
if ( $_wp_using_ext_object_cache )
215+
if ( wp_using_ext_object_cache() ) {
218216
$message = 'Transients are saved to the object cache.';
219-
else
220-
$message = 'Transients are saved to the ' . $wpdb->prefix . 'options table.';
217+
} else {
218+
$message = 'Transients are saved to the database.';
219+
}
221220

222221
WP_CLI::line( $message );
223222
}

0 commit comments

Comments
 (0)