/Rewrite-slug-before-publishing-a-post

[WordPress Plugin] Rewrite post_name (slug) before publishing a post using the native WordPress function.

Primary LanguagePHP

=== Rewrite slug before publishing a post ===
Contributors: balfer
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EE2FWM4VUMU9G&lc=ES&item_name=Dario%20BF&item_number=plugin_slugs_&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
Tags: rewrite, slugs
Requires at least: 4.1
Tested up to: 4.5.2
Stable tag: 1.0
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

== Description ==

Is a known (SEO) issue that if You save a draft post without title, the post_name or slug is immediately saved with the post id.

Later, when You finish your post and put some title, the slug doesn't change; neither also when your slug preference is %postname%.

So, what if we include the following function to rewrite the slug before publishing the post?


== Installation ==

1. Upload the entire `rewrite-slug-before-publishing-a-post` folder to the `/wp-content/plugins/` directory.
1. Activate the plugin through the 'Plugins' menu in WordPress.

== Changelog ==

= 1.0 =

* Initial version