Shows warning when enable plugin with Themify Builder
-
Hi,
When I ave installed this plugin with one of my site which use Themify Builder, it shows below error.
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘wp_gallery_custom_links’ not found or invalid function name in /home/content/xxxxx/wp-includes/class-wp-hook.php on line 298
Did you or anyone face this error before? Is there any quick solution?
Also, I have checked Themify and found that they have added plugin code in compatible file as below.
// WP Gallery Custom Links if( $this->is_plugin_active( 'wp-gallery-custom-links/wp-gallery-custom-links.php' ) ) { add_filter( 'themify_builder_image_link_before', 'wp_gallery_custom_links', 10, 3 ); } function wp_gallery_custom_links( $link_before, $image, $settings ) { $attachment_meta = get_post_meta( $image->ID, '_gallery_link_url', true ); if( $attachment_meta ) { $link_before = preg_replace( '/href="(.*)"/', 'href="' . $attachment_meta . '"', $link_before ); } $attachment_meta = get_post_meta( $image->ID, '_gallery_link_target', true ); if( $attachment_meta ) { $link_before = str_replace( '>', ' target="' . $attachment_meta . '">', $link_before ); } return $link_before; }
Please look into this and let me know solution asap.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Shows warning when enable plugin with Themify Builder’ is closed to new replies.