I'm working on an extension that indexes the content of the entry when publish form is submitted, but I need to know if the entry is a new one or an updated one, and in both case, I need the entry_id (the new one juste created or the old one).

Do you know a way to do that? Should I use an other hook?

--Solution--

In fact, entry_submission_end come with 3 parameters: entry_id, meta and data. If the entry is a new one, entry_id contains the new entry_id but $data['entry_id'] is 0, so you can have a condition on that to check if you are editing or creating an entry.


Question: What does mathematics have to do with programming?
Answer: Math describes (say) a cubic equation.

An algorithm describes how to solve that cubic equation.

Constructing that (or any) algorithm in a way that can be executed by a machine is programming.

Computer science is the analysis of the algorithm - its theoretical time/space efficiency, error bounds, etc.  This much could be considered a branch of mathematics.  Note however that computer science and programming are not actually the same thing.  It is important to have a foundation in computer science if you want to be a good programmer, because it helps you to better design and reason about the algorithms you develop.  But it is not a requirement.

A good programmer may not be (in fact, often is not) a good mathematician, and vice versa.  They are separate identifiable skills.