Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ajay

    (@ajay)

    You could try writing your own function to filter “tptn_post_count_only”

    Something like this:

    function filter_tptn_post_count_only( $cntaccess ) {
    
        $cntaccess = number_format($cntaccess);
        $input_count = substr_count($input, ',');
        if($input_count != '0'){
            if($input_count == '1'){
                return substr($cntaccess, 0, -4).'k';
            } else if($input_count == '2'){
                return substr($cntaccess, 0, -8).'mil';
            } else if($input_count == '3'){
                return substr($cntaccess, 0,  -12).'bil';
            } else {
                return;
            }
        } else {
            return $cntaccess;
        }
    
    }
    add_filter( 'tptn_post_count_only' , 'filter_tptn_post_count_only' );

    Source for the function: https://stackoverflow.com/questions/8549463/show-1k-instead-of-1-000

    Thread Starter dailyreup

    (@dailyreup)

    i tried it, and its not working for me. would be nice to have this feature added into the plugin with a quick on and off checkbox or radio butotn

    Plugin Author Ajay

    (@ajay)

    I’ll need to test this. But, to be honest, it’s unlikely going to be an inbuilt feature within the base plugin.

    It might be an addon that I’ll see how that can interface with the plugin.

    Thread Starter dailyreup

    (@dailyreup)

    sounds good. I’ll be patient. It was more of a suggestion of feature request. That would make your plugin a little more modern.

    just my 2 cents. thanks Ajay. Great plugin btw.

    Plugin Author Ajay

    (@ajay)

    Thank you.

    I’m building an addon for this plugin that incorporates tiny little tweaks. It’s a major WIP currently, but I can always throw this one in.

    I’m trying to separate out what should be core and used by all vs. what is opt-in for few

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘is there a way to edit views after they pass 1,000’ is closed to new replies.