Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/themify-.../includes/plugin-c...
File: gallerycustomlinks.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Builder Plugin Compatibility Code
[2] Fix | Delete
*
[3] Fix | Delete
* @package Themify_Builder
[4] Fix | Delete
* @subpackage Themify_Builder/classes
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
class Themify_Builder_Plugin_Compat_GalleryCustomLinks {
[8] Fix | Delete
[9] Fix | Delete
static function init() {
[10] Fix | Delete
add_filter( 'themify_builder_image_link_before', array( __CLASS__, 'wp_gallery_custom_links' ), 10, 3 );
[11] Fix | Delete
}
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* Compatibility with WP Gallery Custom Links plugin
[15] Fix | Delete
* @link https://wordpress.org/plugins/wp-gallery-custom-links
[16] Fix | Delete
* Apply Link and Target fields to gallery images in Grid layout
[17] Fix | Delete
*
[18] Fix | Delete
* @return string
[19] Fix | Delete
*/
[20] Fix | Delete
public static function wp_gallery_custom_links(string $link_before, $image, $settings ):string {
[21] Fix | Delete
$attachment_meta = get_post_meta( $image->ID, '_gallery_link_url', true );
[22] Fix | Delete
if( $attachment_meta ) {
[23] Fix | Delete
$link_before = preg_replace( '/href="(.*)"/', 'href="' . $attachment_meta . '"', $link_before );
[24] Fix | Delete
}
[25] Fix | Delete
$attachment_meta = get_post_meta( $image->ID, '_gallery_link_target', true );
[26] Fix | Delete
if( $attachment_meta ) {
[27] Fix | Delete
$link_before = str_replace( '>', ' target="' . $attachment_meta . '">', $link_before );
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
return $link_before;
[31] Fix | Delete
}
[32] Fix | Delete
}
[33] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function