: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if ($state === 'h' || $state === 'hover') {
protected function module_title_custom_style() {//@deprecated has been moved to js
self::get_expand('bg', array(
self::get_color('.module .module-title', 'background_color_module_title', 'bg_c', 'background-color')
self::get_color('.module .module-title', 'bg_c_m_t', 'bg_c', 'background-color', 'h')
self::get_expand('f', array(
self::get_font_family('.module .module-title', 'font_family_module_title'),
self::get_color('.module .module-title', 'font_color_module_title'),
self::get_font_size('.module .module-title', 'font_size_module_title'),
self::get_line_height('.module .module-title', 'line_height_module_title'),
self::get_text_align('.module .module-title', 'text_align_module_title'),
self::get_text_shadow('.module .module-title', 't_sh_m_t'),
self::get_font_family('.module .module-title', 'f_f_m_t', 'h'),
self::get_color('.module .module-title', 'f_c_m_t', null, null, 'h'),
self::get_font_size('.module .module-title', 'f_s_m_t', '', 'h'),
self::get_text_shadow('.module .module-title', 't_sh_m_t', 'h'),
* Returns a list of image/imageGradient fields in module's Styling
public static function get_styling_image_fields() : array {
* Return a list of module fields that need translating in WPML
* 'title' => Optional title displayed in WPML translation screeen
* 'type' => 'TEXTAREA', 'VISUAL', 'LINK', or default: 'LINE'
public static function get_translatable_fields( $module, $classname ) : array {
/*@note: "link" field is being registered as LINE instead, so they show up in translation editor */
foreach ( array_merge( $classname::get_translatable_text_fields( $module ), $classname::get_translatable_link_fields( $module ) ) as $field_id ) {
if ( isset( $module['mod_settings'][ $field_id ] ) ) {
'value' => $module['mod_settings'][ $field_id ],
foreach ( $classname::get_translatable_textarea_fields( $module ) as $field_id ) {
if ( isset( $module['mod_settings'][ $field_id ] ) ) {
'value' => $module['mod_settings'][ $field_id ],
foreach ( $classname::get_translatable_repeatable_fields( $module ) as $repeater_field_id => $repeater_field_childs ) {
if ( ! empty( $module['mod_settings'][ $repeater_field_id ] ) ) {
foreach ( $module['mod_settings'][ $repeater_field_id ] as $repeater_row_index => &$repeater_row_value ) {
foreach ( $repeater_field_childs as $item_id => $item_type ) {
if ( isset( $repeater_row_value[ $item_id ] ) ) {
'value' => $repeater_row_value[ $item_id ],
'id' => $repeater_field_id . '::' . $repeater_row_index . '::' . $item_id,
public static function translate_module( $module, $translations ) {
/* convert $translation array for repeatable fields */
$m = Themify_Builder_WPML_Integration::get_module( $module['mod_name'] );
$repeter_fields = $m::get_translatable_repeatable_fields( $module );
if ( ! empty( $repeter_fields ) ) {
foreach ( $repeter_fields as $repeater_field_id => $repeater_field_childs ) {
foreach ( $translations as $translation_key => $translation_value ) {
if ( str_contains( $translation_key, $repeater_field_id . '::' ) ) { // this value is for a repeatable field, need to unpack
list( $_repeater_id, $row_id, $item_id ) = explode( '::', $translation_key );
if ( isset( $module['mod_settings'][ $repeater_field_id ][ $row_id ][ $item_id ] ) ) {
$module['mod_settings'][ $repeater_field_id ][ $row_id ][ $item_id ] = $translation_value;
unset( $translations[ $translation_key ] );
$module['mod_settings'] = array_merge( $module['mod_settings'], $translations );
public static function get_translatable_text_fields( $module ) {
public static function get_translatable_textarea_fields( $module ) {
public static function get_translatable_link_fields( $module ) {
public static function get_translatable_repeatable_fields( $module ) {
if (!function_exists('themify_builder_testimonial_author_name')) :
function themify_builder_testimonial_author_name($post, $show_author) {
if ('yes' === $show_author) {
if ($author = get_post_meta($post->ID, '_testimonial_name', true))
$out = '<span class="dash"></span><cite class="testimonial-name">' . $author . '</cite> <br/>';
if ($position = get_post_meta($post->ID, '_testimonial_position', true))
$out .= '<em class="testimonial-title">' . $position;
if ($link = get_post_meta($post->ID, '_testimonial_link', true)) {
$out .= '<em class="testimonial-title">';
$out .= '<a href="' . esc_url($link) . '">';
if ($company = get_post_meta($post->ID, '_testimonial_company', true))