Conversation
zinigor
left a comment
There was a problem hiding this comment.
So far looks good, but if I understand correctly, current plugin management code on Calypso uses 1.1. Is there a way to test 1.2 as well?
|
Yes I use the developer console developer.wordpress.com/docs/api/console/ and but you need to patch the code as expected. |
| $for_output | ||
| ); | ||
| break; | ||
| case 'plugin_v1_2' : |
There was a problem hiding this comment.
I think we could do
case 'plugin' :
case 'plugin_v1_2' :
and extend the case with
if ( === `plugin_v1_2` ) {
do something in particular
}
| $result = delete_plugins( array( $plugin ) ); | ||
| if ( is_wp_error( $result ) ) { | ||
| $error = $this->log[ $plugin ][] = $result->get_error_message(); | ||
| $error = $this->log[$plugin][] = $result->get_error_message(); |
There was a problem hiding this comment.
missing spaces around $plugin
| $error = $this->log[$plugin][] = $result->get_error_message(); | ||
| } else { | ||
| $this->log[ $plugin ][] = 'Plugin deleted'; | ||
| $this->log[$plugin][] = 'Plugin deleted'; |
There was a problem hiding this comment.
missing spaces around $plugin
| 'action_links' => '(array) An array of action links that the plugin uses.', | ||
| ); | ||
|
|
||
| static $_response_format_v1_2 = array( |
There was a problem hiding this comment.
why do we need to declare it here again?
There was a problem hiding this comment.
So that we have something to reference when we declare the endpoint
There was a problem hiding this comment.
could we remove the other and use this one?
There was a problem hiding this comment.
Don't we need both for backwards compatibility?
1009764 to
188fd96
Compare
These change need to be tested better.
Refactor to use the _response_format_v1_2 format array.
d498aa1 to
c2ddea1
Compare
V1.2 of the api
Changes proposed in this Pull Request:
Testing instructions:
Proposed changelog entry for your changes: