Code Monkey home page Code Monkey logo

Comments (6)

victorjonsson avatar victorjonsson commented on May 29, 2024

Content of the list or content of the post dragged over to the list?

from arlima.

ekandreas avatar ekandreas commented on May 29, 2024

From the search dragged over to a list.

from arlima.

victorjonsson avatar victorjonsson commented on May 29, 2024

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?

from arlima.

ekandreas avatar ekandreas commented on May 29, 2024

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.

  1. Search an article in Arlima in your main list page.
  2. Drag the post from the search list to an Arlima list to the left.
  3. The content of the post in Arlima is truncated if its longer than 150 chars or so.

arlima-truncates

from arlima.

victorjonsson avatar victorjonsson commented on May 29, 2024

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

from arlima.

victorjonsson avatar victorjonsson commented on May 29, 2024

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.

from arlima.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.