OSDN Git Service

Use our new util function
authorDaniel Bachhuber <d@danielbachhuber.com>
Tue, 20 Aug 2013 14:37:59 +0000 (07:37 -0700)
committerDaniel Bachhuber <d@danielbachhuber.com>
Tue, 20 Aug 2013 14:37:59 +0000 (07:37 -0700)
php/commands/post.php
php/commands/user.php

index c0c37a2..c14887e 100644 (file)
@@ -181,7 +181,7 @@ class Post_Command extends \WP_CLI\CommandWithDBObject {
                case 'table':
                        $fields = get_object_vars( $post );
                        unset( $fields['filter'], $fields['post_content'], $fields['format_content'] );
-                       $this->assoc_array_to_table( $fields );
+                       \WP_CLI\Utils\assoc_array_to_table( $fields );
                        break;
 
                case 'json':
index cf3d956..2e6454a 100644 (file)
@@ -119,7 +119,7 @@ class User_Command extends \WP_CLI\CommandWithDBObject {
                switch ( $assoc_args['format'] ) {
 
                case 'table':
-                       $this->assoc_array_to_table( $user_data );
+                       \WP_CLI\Utils\assoc_array_to_table( $user_data );
                        break;
 
                case 'json':