Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

Chouby on "[Plugin: Polylang] Scheduled posts"

$
0
0

I am not sure I want to include this feature. But here is how to do this. Add the following code to your functions.php or a custom plugin.

add_action('dbx_post_advanced', 'copy_scheduled_post');

function copy_scheduled_post() {
	if (isset($_GET['from_post']) && isset($_GET['new_lang'])) {
		$from_post = get_post($_GET['from_post']);

		if ($from_post->post_status == 'future') {
			$post->post_status = 'future';
			$post->post_date = $from_post->post_date;
			$post->post_date_gmt = $from_post->post_date_gmt;
		}
	}
}

Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>