I'm trying to build some functionality where if you're logged into an admin account you'll see a small 'edit' link next to each post title. clicking will use jquery to create 2 form inputs - 1 with the current post title and the other containing the current slug.
I'd ideally like to then allow admins to edit any post/slug from the post page itself using Ajax. To accomplish this I need to find how to update MySQL when the user hits "save". What would be the best way to go about doing this?
I think I'll need to create a new .php file which is called by JavaScript, passing in the title/slug vars. But I'm not sure which Wordpress core files have the SQL code for updating a post title.
Any help would be greatly appreciated!