Jetpack Sync: Adding name of importer to sync details for activity log#7455
Jetpack Sync: Adding name of importer to sync details for activity log#7455
Conversation
|
I looked into using a |
|
|
||
| //Identify importer | ||
| $importers = get_importers(); | ||
| $importer_name = isset( $importers[ $importer ] ) ? $importers[ $importer ][0] : 'Unknown Importer'; |
There was a problem hiding this comment.
Can we put this block into its own method?
roccotripaldi
left a comment
There was a problem hiding this comment.
LGTM! @georgestephanis - the CIs seem to be throwing errors unrelated to this PR. do you know what's going on? Am i missing something?
|
@beaulebens mentioned that we could perhaps include the entire importer object, but i think we'll be solid with just the name. |
|
@roccotripaldi , I'm not sure what including the entire importer object would mean in this case. My understanding was that Beau wanted to include the name of which importer ran in the AL. @beaulebens, can you please clarify whether you wanted something else? Thanks! |
|
My main goal was to include enough detail that we could 1. should something meaningful in the UI (e.g. "Beau ran the Super Wonderful importer", and preferably 2. that we could provide contextual links to relevant places within either Calypso or wp-admin. For importers, I think that means also including the slug of the importer, which is required to build a link to the importer in wp-admin (and eventually maybe in Calypso). As an example, I have a Twitter importer on my site, and the URL of it is |
|
Thanks, @beaulebens. This PR will make both the slug and the name available in the AL (when coupled with the changes in my .com diff). |
| } | ||
|
|
||
| private function get_importer_name( $importer ) { | ||
| return isset( $importers[ $importer ] ) ? $importers[ $importer ][0] : 'Unknown Importer'; |
There was a problem hiding this comment.
do we need to pass $importers here?
Fixes #7451
Adding name of importer to sync details for activity log
Changes proposed in this Pull Request:
Adding name of importer to sync details for activity log
Testing instructions:
phpunit
Proposed changelog entry for your changes: