Support » Theme: raindrops » call_user_func_array() error

  • Hi everyone !
    And thanks for this great theme !

    Really good looking and really functionnal.

    I updated my theme today, and I regret it : now I have this message appearing at the top:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘raindrops_add_header_archive_description’ was given in /wp-includes/plugin.php on line 429

    I’ve looked everywhere in function.php to find the line making problems, but with no success.

    Do you know how to solve it ?

    Thanks for your help (and here is the website : http://www.commander007.net/orbis/)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author nobita

    (@nobita)

    Occurrence part of this error is occurring in the part which outputs the Description of the category in the header.

    I can not be identified or cause has occurred.

    However, measures will have

    Add functions.php

    Please be sure to describe the beginning of the file

    <?php
    function raindrops_add_header_archive_description() {
    
    	return;
    }
    ?>

    This error will no longer appear

    Thank you.

    Theme Author nobita

    (@nobita)

    I detect issue

    https://github.com/tenman/raindrops/blob/master/functions.php#L9265-L9288

    It loose code ( conditional tag )

    I will change below new version ( maybe 1.304 )

    function raindrops_add_header_archive_description(){
    
    	if ( is_category() ||  is_tag() ) {
    
    		$html = '<meta name="%1$s" content="%2$s" />'. "\n";
    
    		$raindrops_archive_description_length = apply_filters( 'raindrops_archive_description_length', 115 );
    
    		$description = wp_kses( get_the_archive_description(), array() );
    		$description = wp_html_excerpt( $description, $raindrops_archive_description_length , '' );
    
    		if ( ! empty( $description ) ) {
    			$result = sprintf( $html, 'description', $description );
    			echo apply_filters( 'raindrops_add_header_archive_description', $result );
    		}
    	}
    }

    Thank you for pointing out

    Thank you very much ! It is fixed !
    Thanks for the great work !

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘call_user_func_array() error’ is closed to new replies.