piklist
piklist copied to clipboard
Suggested change for PikList_CPT::wp_insert_post_data()
Hi guys,
When you are on a non-English WordPress, you can never use the filter: piklist_empty_post_title
Here is the function:
public static function wp_insert_post_data($data, $post_array)
{
if (($data['post_status'] != 'auto-draft') && (($data['post_title'] == 'Auto Draft') || empty($data['post_title'])))
{
$data['post_title'] = apply_filters('piklist_empty_post_title', $data['post_title'], $post_array);
}
return $data;
}
Suggested change:
public static function wp_insert_post_data($data, $post_array)
{
$data['post_title'] = apply_filters('piklist_empty_post_title', $data['post_title'], $post_array);
return $data;
}
This is because $data['post_title'] == 'Automatische concepten' in for example Dutch.
It is nice to encapsulate filters, so they are not running all the time. But this one is unusable for all non-English Piklist users.
Thanks!
Hi,
Any news on this one?