I would like to know how wordpress generates the permalink for the post while writing the post.
Is it using javascript?
I would like to know how wordpress generates the permalink for the post while writing the post.
Is it using javascript?
The permalink is not "generated", for using permalinks, read about mod_rewrite.
The link looks like "write-your-post-title-here" is an actual file, which is not.
The page will redirect you to maybe "posts.php", there the appendex is being analyzed and then a db call is started with exactly that options.
something like
"SELECT * FROM posts WHERE title LIKE `write-your-post-title-here`"
No JS, no AJAX.
JS is used to "update" the optical state of the link. So if you click on edit, and change the post title, JS will dynamically update the text that you can see what you're actually typing.
hi how are you yes its done by JS and ajax as soon you write title it will send title with ajax and change into permalink and get permalink field. i found source code hope it will help you.
wp-admin/includes/post.php line 1257
this is the js which is used
wp-admin/js/post.js line 706