create_and_select( array( 'original_id' => $original_id, 'translation_id' => $translation_id, 'note' => $note, 'user_id' => get_current_user_id(), ) ); } /** * Edit the note * * @since 3.0.0 * * @param string $note_id Note ID. * @param string $note Note object. * @param string $translation Translation object. * * @return object The output of the query. */ public function edit( $note_id, $note, $translation ) { $note_object = GP::$notes->get( $note_id ); $this->update( array( 'note' => $note ), array( 'id' => $note_id ) ); return $this->get( $note_id ); } /** * Retrieves the note for this translation id. * * @since 3.0.0 * * @param object $translation_id The translation id. * @param object $order The note order. * * @return array notes */ public function get_by_translation_id( $translation_id, $order = null ) { return $this->many( $this->select_all_from_conditions_and_order( array( 'translation_id' => $translation_id, ), $order ) ); } } GP::$notes = new GP_Note();