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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../public_h.../wp-conte.../plugins/themify-.../includes/componen...
File: module.php
'max' => 1000
[2000] Fix | Delete
),
[2001] Fix | Delete
'em' => array(
[2002] Fix | Delete
'min' => -50,
[2003] Fix | Delete
'max' => 50
[2004] Fix | Delete
),
[2005] Fix | Delete
'%' => ''
[2006] Fix | Delete
)
[2007] Fix | Delete
);
[2008] Fix | Delete
if ($state === 'h' || $state === 'hover') {
[2009] Fix | Delete
$res['ishover'] = true;
[2010] Fix | Delete
}
[2011] Fix | Delete
return $res;
[2012] Fix | Delete
}
[2013] Fix | Delete
[2014] Fix | Delete
protected function module_title_custom_style() {//@deprecated has been moved to js
[2015] Fix | Delete
return array(
[2016] Fix | Delete
// Background
[2017] Fix | Delete
self::get_expand('bg', array(
[2018] Fix | Delete
self::get_tab(array(
[2019] Fix | Delete
'n' => array(
[2020] Fix | Delete
self::get_color('.module .module-title', 'background_color_module_title', 'bg_c', 'background-color')
[2021] Fix | Delete
),
[2022] Fix | Delete
'h' => array(
[2023] Fix | Delete
self::get_color('.module .module-title', 'bg_c_m_t', 'bg_c', 'background-color', 'h')
[2024] Fix | Delete
)
[2025] Fix | Delete
))
[2026] Fix | Delete
)),
[2027] Fix | Delete
// Font
[2028] Fix | Delete
self::get_expand('f', array(
[2029] Fix | Delete
self::get_tab(array(
[2030] Fix | Delete
'n' => array(
[2031] Fix | Delete
self::get_font_family('.module .module-title', 'font_family_module_title'),
[2032] Fix | Delete
self::get_color('.module .module-title', 'font_color_module_title'),
[2033] Fix | Delete
self::get_font_size('.module .module-title', 'font_size_module_title'),
[2034] Fix | Delete
self::get_line_height('.module .module-title', 'line_height_module_title'),
[2035] Fix | Delete
self::get_text_align('.module .module-title', 'text_align_module_title'),
[2036] Fix | Delete
self::get_text_shadow('.module .module-title', 't_sh_m_t'),
[2037] Fix | Delete
),
[2038] Fix | Delete
'h' => array(
[2039] Fix | Delete
self::get_font_family('.module .module-title', 'f_f_m_t', 'h'),
[2040] Fix | Delete
self::get_color('.module .module-title', 'f_c_m_t', null, null, 'h'),
[2041] Fix | Delete
self::get_font_size('.module .module-title', 'f_s_m_t', '', 'h'),
[2042] Fix | Delete
self::get_text_shadow('.module .module-title', 't_sh_m_t', 'h'),
[2043] Fix | Delete
)
[2044] Fix | Delete
))
[2045] Fix | Delete
))
[2046] Fix | Delete
);
[2047] Fix | Delete
}
[2048] Fix | Delete
[2049] Fix | Delete
/**
[2050] Fix | Delete
* Returns a list of image/imageGradient fields in module's Styling
[2051] Fix | Delete
*/
[2052] Fix | Delete
public static function get_styling_image_fields() : array {
[2053] Fix | Delete
return [];
[2054] Fix | Delete
}
[2055] Fix | Delete
[2056] Fix | Delete
/**
[2057] Fix | Delete
* Return a list of module fields that need translating in WPML
[2058] Fix | Delete
*
[2059] Fix | Delete
* Format:
[2060] Fix | Delete
* [
[2061] Fix | Delete
* 'value' => String,
[2062] Fix | Delete
* 'title' => Optional title displayed in WPML translation screeen
[2063] Fix | Delete
* 'id' => field ID,
[2064] Fix | Delete
* 'type' => 'TEXTAREA', 'VISUAL', 'LINK', or default: 'LINE'
[2065] Fix | Delete
* ]
[2066] Fix | Delete
*/
[2067] Fix | Delete
public static function get_translatable_fields( $module, $classname ) : array {
[2068] Fix | Delete
$fields = [];
[2069] Fix | Delete
/*@note: "link" field is being registered as LINE instead, so they show up in translation editor */
[2070] Fix | Delete
foreach ( array_merge( $classname::get_translatable_text_fields( $module ), $classname::get_translatable_link_fields( $module ) ) as $field_id ) {
[2071] Fix | Delete
if ( isset( $module['mod_settings'][ $field_id ] ) ) {
[2072] Fix | Delete
$fields[] = [
[2073] Fix | Delete
'value' => $module['mod_settings'][ $field_id ],
[2074] Fix | Delete
'id' => $field_id
[2075] Fix | Delete
];
[2076] Fix | Delete
}
[2077] Fix | Delete
}
[2078] Fix | Delete
foreach ( $classname::get_translatable_textarea_fields( $module ) as $field_id ) {
[2079] Fix | Delete
if ( isset( $module['mod_settings'][ $field_id ] ) ) {
[2080] Fix | Delete
$fields[] = [
[2081] Fix | Delete
'value' => $module['mod_settings'][ $field_id ],
[2082] Fix | Delete
'id' => $field_id,
[2083] Fix | Delete
'type' => 'TEXTAREA'
[2084] Fix | Delete
];
[2085] Fix | Delete
}
[2086] Fix | Delete
}
[2087] Fix | Delete
[2088] Fix | Delete
foreach ( $classname::get_translatable_repeatable_fields( $module ) as $repeater_field_id => $repeater_field_childs ) {
[2089] Fix | Delete
if ( ! empty( $module['mod_settings'][ $repeater_field_id ] ) ) {
[2090] Fix | Delete
foreach ( $module['mod_settings'][ $repeater_field_id ] as $repeater_row_index => &$repeater_row_value ) {
[2091] Fix | Delete
foreach ( $repeater_field_childs as $item_id => $item_type ) {
[2092] Fix | Delete
if ( isset( $repeater_row_value[ $item_id ] ) ) {
[2093] Fix | Delete
$fields[] = [
[2094] Fix | Delete
'value' => $repeater_row_value[ $item_id ],
[2095] Fix | Delete
'id' => $repeater_field_id . '::' . $repeater_row_index . '::' . $item_id,
[2096] Fix | Delete
'type' => $item_type
[2097] Fix | Delete
];
[2098] Fix | Delete
}
[2099] Fix | Delete
}
[2100] Fix | Delete
}
[2101] Fix | Delete
}
[2102] Fix | Delete
}
[2103] Fix | Delete
[2104] Fix | Delete
return $fields;
[2105] Fix | Delete
}
[2106] Fix | Delete
[2107] Fix | Delete
/**
[2108] Fix | Delete
* Translate module data
[2109] Fix | Delete
*/
[2110] Fix | Delete
public static function translate_module( $module, $translations ) {
[2111] Fix | Delete
/* convert $translation array for repeatable fields */
[2112] Fix | Delete
$m = Themify_Builder_WPML_Integration::get_module( $module['mod_name'] );
[2113] Fix | Delete
if ( $m ) {
[2114] Fix | Delete
$repeter_fields = $m::get_translatable_repeatable_fields( $module );
[2115] Fix | Delete
if ( ! empty( $repeter_fields ) ) {
[2116] Fix | Delete
foreach ( $repeter_fields as $repeater_field_id => $repeater_field_childs ) {
[2117] Fix | Delete
foreach ( $translations as $translation_key => $translation_value ) {
[2118] Fix | Delete
if ( str_contains( $translation_key, $repeater_field_id . '::' ) ) { // this value is for a repeatable field, need to unpack
[2119] Fix | Delete
list( $_repeater_id, $row_id, $item_id ) = explode( '::', $translation_key );
[2120] Fix | Delete
if ( isset( $module['mod_settings'][ $repeater_field_id ][ $row_id ][ $item_id ] ) ) {
[2121] Fix | Delete
$module['mod_settings'][ $repeater_field_id ][ $row_id ][ $item_id ] = $translation_value;
[2122] Fix | Delete
unset( $translations[ $translation_key ] );
[2123] Fix | Delete
}
[2124] Fix | Delete
}
[2125] Fix | Delete
}
[2126] Fix | Delete
}
[2127] Fix | Delete
}
[2128] Fix | Delete
}
[2129] Fix | Delete
[2130] Fix | Delete
$module['mod_settings'] = array_merge( $module['mod_settings'], $translations );
[2131] Fix | Delete
return $module;
[2132] Fix | Delete
}
[2133] Fix | Delete
[2134] Fix | Delete
public static function get_translatable_text_fields( $module ) {
[2135] Fix | Delete
return [];
[2136] Fix | Delete
}
[2137] Fix | Delete
[2138] Fix | Delete
public static function get_translatable_textarea_fields( $module ) {
[2139] Fix | Delete
return [];
[2140] Fix | Delete
}
[2141] Fix | Delete
[2142] Fix | Delete
public static function get_translatable_link_fields( $module ) {
[2143] Fix | Delete
return [];
[2144] Fix | Delete
}
[2145] Fix | Delete
[2146] Fix | Delete
public static function get_translatable_repeatable_fields( $module ) {
[2147] Fix | Delete
return [];
[2148] Fix | Delete
}
[2149] Fix | Delete
}
[2150] Fix | Delete
[2151] Fix | Delete
if (!function_exists('themify_builder_testimonial_author_name')) :
[2152] Fix | Delete
[2153] Fix | Delete
function themify_builder_testimonial_author_name($post, $show_author) {
[2154] Fix | Delete
$out = '';
[2155] Fix | Delete
if ('yes' === $show_author) {
[2156] Fix | Delete
if ($author = get_post_meta($post->ID, '_testimonial_name', true))
[2157] Fix | Delete
$out = '<span class="dash"></span><cite class="testimonial-name">' . $author . '</cite> <br/>';
[2158] Fix | Delete
[2159] Fix | Delete
if ($position = get_post_meta($post->ID, '_testimonial_position', true))
[2160] Fix | Delete
$out .= '<em class="testimonial-title">' . $position;
[2161] Fix | Delete
[2162] Fix | Delete
if ($link = get_post_meta($post->ID, '_testimonial_link', true)) {
[2163] Fix | Delete
if ($position) {
[2164] Fix | Delete
$out .= ', ';
[2165] Fix | Delete
} else {
[2166] Fix | Delete
$out .= '<em class="testimonial-title">';
[2167] Fix | Delete
}
[2168] Fix | Delete
$out .= '<a href="' . esc_url($link) . '">';
[2169] Fix | Delete
}
[2170] Fix | Delete
[2171] Fix | Delete
if ($company = get_post_meta($post->ID, '_testimonial_company', true))
[2172] Fix | Delete
$out .= $company;
[2173] Fix | Delete
else
[2174] Fix | Delete
$out .= $link;
[2175] Fix | Delete
[2176] Fix | Delete
if ($link)
[2177] Fix | Delete
$out .= '</a>';
[2178] Fix | Delete
[2179] Fix | Delete
$out .= '</em>';
[2180] Fix | Delete
}
[2181] Fix | Delete
return $out;
[2182] Fix | Delete
}
[2183] Fix | Delete
[2184] Fix | Delete
endif;
[2185] Fix | Delete
[2186] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function