How to regenerate native slugs for scheduled posts?

[ad_1]

Hi @ploz,

By default, Permalink Manager only works with the post statuses that are returned by the get_post_statuses() function. However, using the code snippet below, you can easily add support for future posts.

function pm_additional_post_statuses($post_statuses) {
	if(is_array($post_statuses)) {
		$post_statuses['expired'] = 'Expired';
		$post_statuses['future'] = 'Scheduled';
	}

	return $post_statuses;
}
add_filter('permalink_manager_post_statuses', 'pm_additional_post_statuses');

Thread Starter
ploz

(@ploz)

Thank you, that was really helpful.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer