• Resolved Jay

    (@the_circle_pit)


    Hello,

    I just checked my error_log file and found this warning over and over again.. I was hoping someone could explain it and possibility present a fix.

    Thank you!

    PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘improved_trim_excerpt’ not found or invalid function name in /home/thecircl/public_html/wp-includes/plugin.php on line 214

    function apply_filters( $tag, $value ) {
    global $wp_filter, $merged_filters, $wp_current_filter;

    $args = array();

    // Do ‘all’ actions first.
    if ( isset($wp_filter[‘all’]) ) {
    $wp_current_filter[] = $tag;
    $args = func_get_args();
    _wp_call_all_hook($args);
    }

    if ( !isset($wp_filter[$tag]) ) {
    if ( isset($wp_filter[‘all’]) )
    array_pop($wp_current_filter);
    return $value;
    }

    if ( !isset($wp_filter[‘all’]) )
    $wp_current_filter[] = $tag;

    // Sort.
    if ( !isset( $merged_filters[ $tag ] ) ) {
    ksort($wp_filter[$tag]);
    $merged_filters[ $tag ] = true;
    }

    reset( $wp_filter[ $tag ] );

    if ( empty($args) )
    $args = func_get_args();

    do {
    foreach( (array) current($wp_filter[$tag]) as $the_ )
    if ( !is_null($the_[‘function’]) ){
    $args[1] = $value;
    **LINE 214** $value = call_user_func_array($the_[‘function’], array_slice($args, 1, (int) $the_[‘accepted_args’]));
    }
    } while ( next($wp_filter[$tag]) !== false );
    array_pop( $wp_current_filter );
    return $value;
    }

Viewing 7 replies - 1 through 7 (of 7 total)
  • Clayton James

    (@claytonjames)

    – What theme are you using, and..

    – Can you stop or change the error message by temporarily changing themes

    Thread Starter Jay

    (@the_circle_pit)

    I am using the theme movite.

    https://www.magpress.com/wordpress-themes/movite.html

    I am not sure If i can stop/change the error message when switching themes. Since the site is active so i have not tried.

    Clayton James

    (@claytonjames)

    As far as I know, improved_trim_excerpt() isn’t a native WordPress function.

    There seems to be a few references (link goes to Google) to using it in a filter for customizing/replacing the wp_trim_excerpt function. That makes me think it may be something related to your theme, or maybe a plugin meant to customize excerpts. The theme is a commercial purchase, so there’s no way to take a look at the functions file from here.

    Thread Starter Jay

    (@the_circle_pit)

    improved_trim_excerpt() is in the formatting.php of wp-includes/formatting.php

    I found one article relating to this issue. https://aaronrussell.co.uk/legacy/improving-wordpress-the_excerpt/

    Also the theme is free if you select “download” under the image in the article or use this link https://www.magpress.com/download/movite.zip

    Clayton James

    (@claytonjames)

    improved_trim_excerpt() is in the formatting.php of wp-includes/formatting.php

    If it is, I’m not seeing it. I think you might be confusing it with wp_trim_excerpt

    https://core.trac.www.ads-software.com/browser/branches/4.0/src/wp-includes/formatting.php

    I don’t find it in the Code Reference either.

    ..and a quick grep of that theme directory didn’t turn up the function.

    Are you using any plugins that customize your excerpts, or has anyone customized your theme’s functions using that filter?

    Thread Starter Jay

    (@the_circle_pit)

    I have been looking around in my plugin’s, but i do not see anything that is causing an issue. I will be testing a couple things in the next couple days and let you know.

    Thread Starter Jay

    (@the_circle_pit)

    The improved_trim_exerpt() function was not properly wrote. All is fixed… i think so lol

    Thank you for your help

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Not found or invalid function error’ is closed to new replies.