@@ 820-831 (lines=12) @@ | ||
817 | * @param \stdClass $data |
|
818 | * @return array |
|
819 | */ |
|
820 | public function format_comment_option( $data ) { |
|
821 | return array( |
|
822 | 'id' => intval( $data->ID ), |
|
823 | 'title' => $this->get_title_by_type( $data->ID, 'comment' ), |
|
824 | 'thumbnail' => '', |
|
825 | 'type' => 'comment', |
|
826 | 'subtype' => 'comment', |
|
827 | 'label' => $this->get_item_label( $data->ID, 'comment' ), |
|
828 | 'is_trashed' => false, |
|
829 | 'edit_link' => $this->get_object_edit_link( get_object_vars( $data ), $data->ID ), |
|
830 | ); |
|
831 | } |
|
832 | ||
833 | /** |
|
834 | * Prepares an option of type 'user' for JS usage. |
|
@@ 839-850 (lines=12) @@ | ||
836 | * @param \stdClass $data |
|
837 | * @return array |
|
838 | */ |
|
839 | public function format_user_option( $data ) { |
|
840 | return array( |
|
841 | 'id' => intval( $data->ID ), |
|
842 | 'title' => $this->get_title_by_type( $data->ID, 'user' ), |
|
843 | 'thumbnail' => get_avatar_url( $data->ID, array( 'size' => 150 ) ), |
|
844 | 'type' => 'user', |
|
845 | 'subtype' => 'user', |
|
846 | 'label' => $this->get_item_label( $data->ID, 'user' ), |
|
847 | 'is_trashed' => false, |
|
848 | 'edit_link' => $this->get_object_edit_link( get_object_vars( $data ), $data->ID ), |
|
849 | ); |
|
850 | } |
|
851 | } |
|
852 |