• Nico

    (@nikospkrk)


    Hi Chouby,
    It’s not my first time here but I want to say thank you again for that marvelous multi languages plugin!
    I found a “bug” (not technicaly a bug I guess, maybe more a lacking small feature?), when you create a schedule page/post in a specific language (french for instance), and you schedule it, then when you click on another language link (english) to add the translated post, the schedule date does not get “transferred” to the new page/post created (although the featured image does for instance). Is it a wordpress limitation or just something you missed to noticed yet?

    Cheers,

    https://www.ads-software.com/extend/plugins/polylang/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    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;
    		}
    	}
    }
    Thread Starter Nico

    (@nikospkrk)

    Thank you for the fix, but I don’t think messing with that behaviour should be on the theme side. It sounds a lot more like a plugin fix to me.
    I have to say that I don’t really see any downside on this, am I missing something that make you think you should not implement it in the plugin then?

    Cheers,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Scheduled posts’ is closed to new replies.