We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f3dab2b + a70e0fe commit d380667Copy full SHA for d380667
lib/class-wp-json-authentication.php
@@ -68,12 +68,11 @@ public function add_consumer( $params ) {
68
);
69
$params = wp_parse_args( $params, $default );
70
71
- $data = array();
72
- $data['post_title'] = $params['name'];
73
- $data['post_content'] = $params['description'];
74
- unset( $data['post_title'], $data['post_content'] );
75
-
76
- $data['post_type'] = 'json_consumer';
+ $data = array(
+ 'post_type' => 'json_consumer',
+ 'post_title' => $params['name'],
+ 'post_content' => $params['description'],
+ );
77
78
$ID = wp_insert_post( $data );
79
if ( is_wp_error( $ID ) ) {
0 commit comments