{"id":8860106,"date":"2017-03-01T06:57:02","date_gmt":"2017-03-01T06:57:02","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/call_user_func_array-error-7\/"},"modified":"2017-03-01T06:57:02","modified_gmt":"2017-03-01T06:57:02","slug":"call_user_func_array-error-7","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/call_user_func_array-error-7\/","title":{"rendered":"call_user_func_array error"},"content":{"rendered":"<p>Hi there,<\/p>\n<p>We installed your plugin on our site and it works perfectly except that we&#8217;re getting this error:<br \/>\n<code>call_user_func_array() expects parameter 1 to be a valid callback, second array member is not a valid method in wp-includes\/class-wp-hook.php<\/code><\/p>\n<p>I narrowed it down to this line in the plugin:<br \/>\n<code>add_action( &#039;wp_enqueue_scripts&#039;, array( $this, self::timeline_express_print_inline_styles( $options ) ) );<\/code><\/p>\n<p>Commenting that out, I got rid of the error, but of course, this function is needed so I had to find a way to work around it. Here&#8217;s what I came up with: <\/p>\n<pre><code>add_action( &#039;wp_enqueue_scripts&#039;, array( $this, &#039;timeline_express_print_inline_styles&#039; ) );\n\npublic function timeline_express_print_inline_styles() {\n\n    $timeline_express_options = timeline_express_get_options();\n    ...\n}\n<\/code><\/pre>\n<p>Is there a way for me to add this into my theme? I tried removing the action and adding it again on my own files so I don&#8217;t touch the plugin, it it doesn&#8217;t seem to be working.<\/p>\n<p>Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-8860106","topic","type-topic","status-publish","hentry","topic-tag-call_user_func_array"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8860106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8860106\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=8860106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}