Arlima
Arlima copied to clipboard
Search / drag & drop to new truncates content
When using drag & drop from search article in Arlima to a list, the content is truncated. How to avoid this feature?
Content of the list or content of the post dragged over to the list?
From the search dragged over to a list.
Yes, but I need to know what content that's getting truncated. Do you mean that the content of the list (the articles) dissapears when you drop a post onto the list? Or, do you mean that the body text of the post dissapears once being dropped on a list?
Yes, the preamble of the text from the post being dragged is truncated over 100-150 chars. So when my editors creates a new entry from a searched article in Arlima to a list the text truncates.
- Search an article in Arlima in your main list page.
- Drag the post from the search list to an Arlima list to the left.
- The content of the post in Arlima is truncated if its longer than 150 chars or so.
Ah, yes. That is the excerpt of the post I believe. Theres probably some wp-filter that you can use. I will look into it
There's no obvious way to modify this behaviour. Here's a quick and dirty solution.
$is_arlima_ajax = defined('DOING_AJAX') && DOING_AJAX && check_ajax_referer('arlima-nonce');
if( $is_arlima_ajax && $_REQUEST['action'] == 'arlima_query_posts' ) {
add_filter('the_post', function($post) {
$post->post_excerpt = $post->post_content;
return $post;
});
}
Maybe it would be god to let you decide whether or not to use the post excerpt or the post content via a constant in wp-config.php. I will look into it.