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.../httpdocs/clone/wp-conte.../plugins/themify-.../classes
File: class-themify-builder.php
if (!isset($col['styling'][$prop])) {
[500] Fix | Delete
$col['styling'][$prop] = '';
[501] Fix | Delete
}
[502] Fix | Delete
if (strpos($col['styling'][$prop], ',') === false && is_numeric($v)) {
[503] Fix | Delete
//the first value is old value of v5(if user will try to downgrade FW),the second after converting
[504] Fix | Delete
$v = (int) $v;
[505] Fix | Delete
$col['styling'][$prop] .= ',' . $v;
[506] Fix | Delete
$update = true;
[507] Fix | Delete
}
[508] Fix | Delete
}
[509] Fix | Delete
} else {
[510] Fix | Delete
if (!isset($col['styling']['breakpoint_' . $bp])) {
[511] Fix | Delete
$col['styling']['breakpoint_' . $bp] = array();
[512] Fix | Delete
}
[513] Fix | Delete
if ($v === '%') {//unit proop
[514] Fix | Delete
$col['styling']['breakpoint_' . $bp][$prop] = $v;
[515] Fix | Delete
} else {
[516] Fix | Delete
if (!isset($col['styling']['breakpoint_' . $bp][$prop])) {
[517] Fix | Delete
$col['styling']['breakpoint_' . $bp][$prop] = '';
[518] Fix | Delete
}
[519] Fix | Delete
if (strpos($col['styling']['breakpoint_' . $bp][$prop], ',') === false && is_numeric($v)) {
[520] Fix | Delete
$v = (int) $v;
[521] Fix | Delete
$col['styling']['breakpoint_' . $bp][$prop] .= ',' . $v;
[522] Fix | Delete
$update = $hasChange = true;
[523] Fix | Delete
}
[524] Fix | Delete
}
[525] Fix | Delete
}
[526] Fix | Delete
}
[527] Fix | Delete
}
[528] Fix | Delete
}
[529] Fix | Delete
}
[530] Fix | Delete
if ($hasChange === true) {
[531] Fix | Delete
for ($i = 0; $i < $bpLength - 1; ++$i) {
[532] Fix | Delete
$bp = $breakpints[$i];
[533] Fix | Delete
if (!empty($col['styling']['breakpoint_' . $bp])) {
[534] Fix | Delete
$st = $col['styling']['breakpoint_' . $bp];
[535] Fix | Delete
foreach ($allowed as $p) {
[536] Fix | Delete
if (isset($st[$p])) {
[537] Fix | Delete
$parentSt = null;
[538] Fix | Delete
for ($j = $i + 1; $j < $bpLength; ++$j) {
[539] Fix | Delete
$parentBp = $breakpints[$j];
[540] Fix | Delete
$parentSt = $parentBp === 'desktop' ? $col['styling'] : (isset($col['styling']['breakpoint_' . $parentBp]) ? $col['styling']['breakpoint_' . $parentBp] : null);
[541] Fix | Delete
if (isset($parentSt[$p])) {
[542] Fix | Delete
break;
[543] Fix | Delete
}
[544] Fix | Delete
}
[545] Fix | Delete
if (isset($parentSt) && ($parentSt[$p] == $st[$p] || strpos($parentSt[$p], $st[$p]) !== false)) {
[546] Fix | Delete
unset($col['styling']['breakpoint_' . $bp][$p]);
[547] Fix | Delete
}
[548] Fix | Delete
}
[549] Fix | Delete
}
[550] Fix | Delete
if (empty($col['styling']['breakpoint_' . $bp])) {
[551] Fix | Delete
unset($col['styling']['breakpoint_' . $bp]);
[552] Fix | Delete
}
[553] Fix | Delete
}
[554] Fix | Delete
}
[555] Fix | Delete
}
[556] Fix | Delete
}
[557] Fix | Delete
if (!empty($col['modules'])) {
[558] Fix | Delete
foreach ($col['modules'] as &$mod) {
[559] Fix | Delete
// Check for Sub-rows
[560] Fix | Delete
if (!empty($mod['cols'])) {
[561] Fix | Delete
foreach ($mod['cols'] as &$sub_col) {
[562] Fix | Delete
if (isset($convert[$sub_col['element_id']])) {
[563] Fix | Delete
$hasChange = false;
[564] Fix | Delete
foreach ($convert[$sub_col['element_id']] as $bp => $props) {
[565] Fix | Delete
if (in_array($bp, $breakpints, true)) {
[566] Fix | Delete
foreach ($props as $prop => $v) {
[567] Fix | Delete
if (in_array($prop, $allowed, true)) {
[568] Fix | Delete
if ($bp === 'desktop') {
[569] Fix | Delete
if ($v === '%') {//unit proop
[570] Fix | Delete
$sub_col['styling'][$prop] = $v;
[571] Fix | Delete
} else {
[572] Fix | Delete
if (!isset($sub_col['styling'][$prop])) {
[573] Fix | Delete
$sub_col['styling'][$prop] = '';
[574] Fix | Delete
}
[575] Fix | Delete
if (strpos($sub_col['styling'][$prop], ',') === false && is_numeric($v)) {
[576] Fix | Delete
$v = (int) $v;
[577] Fix | Delete
$sub_col['styling'][$prop] .= ',' . $v;
[578] Fix | Delete
$update = true;
[579] Fix | Delete
}
[580] Fix | Delete
}
[581] Fix | Delete
} else {
[582] Fix | Delete
if (!isset($sub_col['styling']['breakpoint_' . $bp])) {
[583] Fix | Delete
$sub_col['styling']['breakpoint_' . $bp] = array();
[584] Fix | Delete
}
[585] Fix | Delete
if ($v === '%') {//unit proop
[586] Fix | Delete
$sub_col['styling']['breakpoint_' . $bp][$prop] = $v;
[587] Fix | Delete
} else {
[588] Fix | Delete
if (!isset($sub_col['styling']['breakpoint_' . $bp][$prop])) {
[589] Fix | Delete
$sub_col['styling']['breakpoint_' . $bp][$prop] = '';
[590] Fix | Delete
}
[591] Fix | Delete
if (strpos($sub_col['styling']['breakpoint_' . $bp][$prop], ',') === false && is_numeric($v)) {
[592] Fix | Delete
$v = (int) $v;
[593] Fix | Delete
$sub_col['styling']['breakpoint_' . $bp][$prop] .= ',' . $v;
[594] Fix | Delete
$update = $hasChange = true;
[595] Fix | Delete
}
[596] Fix | Delete
}
[597] Fix | Delete
}
[598] Fix | Delete
}
[599] Fix | Delete
}
[600] Fix | Delete
}
[601] Fix | Delete
}
[602] Fix | Delete
if ($hasChange === true) {
[603] Fix | Delete
for ($i = 0; $i < $bpLength - 1; ++$i) {
[604] Fix | Delete
$bp = $breakpints[$i];
[605] Fix | Delete
if (!empty($sub_col['styling']['breakpoint_' . $bp])) {
[606] Fix | Delete
$st = $sub_col['styling']['breakpoint_' . $bp];
[607] Fix | Delete
foreach ($allowed as $p) {
[608] Fix | Delete
if (isset($st[$p])) {
[609] Fix | Delete
$parentSt = null;
[610] Fix | Delete
for ($j = $i + 1; $j < $bpLength; ++$j) {
[611] Fix | Delete
$parentBp = $breakpints[$j];
[612] Fix | Delete
$parentSt = $parentBp === 'desktop' ? $sub_col['styling'] : (isset($sub_col['styling']['breakpoint_' . $parentBp]) ? $sub_col['styling']['breakpoint_' . $parentBp] : null);
[613] Fix | Delete
if (isset($parentSt[$p])) {
[614] Fix | Delete
break;
[615] Fix | Delete
}
[616] Fix | Delete
}
[617] Fix | Delete
if (isset($parentSt) && ($parentSt[$p] == $st[$p] || strpos($parentSt[$p], $st[$p]) !== false)) {
[618] Fix | Delete
unset($sub_col['styling']['breakpoint_' . $bp][$p]);
[619] Fix | Delete
}
[620] Fix | Delete
}
[621] Fix | Delete
}
[622] Fix | Delete
if (empty($sub_col['styling']['breakpoint_' . $bp])) {
[623] Fix | Delete
unset($sub_col['styling']['breakpoint_' . $bp]);
[624] Fix | Delete
}
[625] Fix | Delete
}
[626] Fix | Delete
}
[627] Fix | Delete
}
[628] Fix | Delete
}
[629] Fix | Delete
}
[630] Fix | Delete
}
[631] Fix | Delete
}
[632] Fix | Delete
}
[633] Fix | Delete
}
[634] Fix | Delete
}
[635] Fix | Delete
}
[636] Fix | Delete
unset($convert, $allowed, $breakpints);
[637] Fix | Delete
if ($update === true) {
[638] Fix | Delete
self::$builder_is_saving = true;
[639] Fix | Delete
ThemifyBuilder_Data_Manager::update_builder_meta($id, $builder_data, false);
[640] Fix | Delete
}
[641] Fix | Delete
}
[642] Fix | Delete
}
[643] Fix | Delete
die;
[644] Fix | Delete
}
[645] Fix | Delete
[646] Fix | Delete
[647] Fix | Delete
/**
[648] Fix | Delete
* Remove Builder static content, leaving an empty shell to inject Builder output in later.
[649] Fix | Delete
*
[650] Fix | Delete
* @return string
[651] Fix | Delete
*/
[652] Fix | Delete
public static function clear_static_content(?string $content):?string {
[653] Fix | Delete
//skip for excerpt hook
[654] Fix | Delete
global $wp_current_filter;
[655] Fix | Delete
[656] Fix | Delete
if (!in_array('get_the_excerpt', $wp_current_filter, true) && !Themify_Builder_Model::is_builder_disabled_for_post_type(get_post_type()) && ThemifyBuilder_Data_Manager::has_static_content($content)) {
[657] Fix | Delete
$empty_placeholder = ThemifyBuilder_Data_Manager::add_static_content_wrapper('');
[658] Fix | Delete
$content = ThemifyBuilder_Data_Manager::update_static_content_string($empty_placeholder, $content);
[659] Fix | Delete
}
[660] Fix | Delete
[661] Fix | Delete
return $content;
[662] Fix | Delete
}
[663] Fix | Delete
[664] Fix | Delete
/**
[665] Fix | Delete
* Hook to content filter to show builder output
[666] Fix | Delete
*/
[667] Fix | Delete
public static function builder_show_on_front(?string $content=''):?string {
[668] Fix | Delete
[669] Fix | Delete
global $post;
[670] Fix | Delete
$post_id = get_the_id();
[671] Fix | Delete
$is_gs_admin_page = isset($_GET['page']) && 'themify-global-styles' === $_GET['page'] && is_admin();
[672] Fix | Delete
// Exclude builder output in admin post list mode excerpt, Don`t show builder on product single description
[673] Fix | Delete
if (
[674] Fix | Delete
($is_gs_admin_page === false && (!is_object($post) || ( is_admin() && !themify_is_ajax() ) || (!Themify_Builder_Model::is_front_builder_activate() && false === apply_filters('themify_builder_display', true, $post_id) ) || post_password_required()
[675] Fix | Delete
)) || (themify_is_woocommerce_active() && (themify_is_shop() || is_singular('product')))/* disable Builder display on WC pages. Those are handled in Themify_Builder_Plugin_Compat */
[676] Fix | Delete
) {
[677] Fix | Delete
return $content;
[678] Fix | Delete
}
[679] Fix | Delete
[680] Fix | Delete
//the_excerpt
[681] Fix | Delete
global $wp_current_filter;
[682] Fix | Delete
if (in_array('get_the_excerpt', $wp_current_filter, true)) {
[683] Fix | Delete
return $content ? $content : self::get_first_text($post_id);
[684] Fix | Delete
}
[685] Fix | Delete
[686] Fix | Delete
if (strpos($post->post_content, '<!--more-->') !== false && !is_single($post->ID) && !is_page($post->ID)) {
[687] Fix | Delete
return $content;
[688] Fix | Delete
}
[689] Fix | Delete
[690] Fix | Delete
return self::render($post_id, $content);
[691] Fix | Delete
}
[692] Fix | Delete
[693] Fix | Delete
/**
[694] Fix | Delete
* Renders Builder data for a given $post_id
[695] Fix | Delete
*
[696] Fix | Delete
* If $content is sent, the function will attempt to find the proper place
[697] Fix | Delete
* where Builder content should be injected to. Otherwise, raw output is returned.
[698] Fix | Delete
*/
[699] Fix | Delete
public static function render(?int $post_id,?string $content = ''):?string {
[700] Fix | Delete
if (!Themify_Builder_Model::is_builder_disabled_for_post_type(get_post_type($post_id))) {
[701] Fix | Delete
/* in the frontend editor, render only a container and set the frontend_builder_ids[] property */
[702] Fix | Delete
if ($post_id == self::$builder_active_id && Themify_Builder_Model::is_front_builder_activate()) {
[703] Fix | Delete
Themify_Builder_Stylesheet::enqueue_stylesheet(false, $post_id);
[704] Fix | Delete
$builder_output = sprintf('<div id="themify_builder_content-%1$d" data-postid="%1$d" class="tf_clear themify_builder_content themify_builder_content-%1$d themify_builder"></div>', $post_id);
[705] Fix | Delete
Themify_Builder::get_builder_stylesheet('');
[706] Fix | Delete
} else {
[707] Fix | Delete
/* Infinite-loop prevention */
[708] Fix | Delete
if (in_array($post_id, self::$post_ids, true)) {
[709] Fix | Delete
/* we have already rendered this, go back. */
[710] Fix | Delete
return $content;
[711] Fix | Delete
}
[712] Fix | Delete
[713] Fix | Delete
$builder_data = ThemifyBuilder_Data_Manager::get_data($post_id);
[714] Fix | Delete
if(empty($builder_data) && !Themify_Builder_Model::is_frontend_editor_page()){
[715] Fix | Delete
return $content;
[716] Fix | Delete
}
[717] Fix | Delete
self::$post_ids[] = $post_id;
[718] Fix | Delete
$template_args = array();
[719] Fix | Delete
// Check For page break module
[720] Fix | Delete
$page_breaks = self::count_page_break_modules($post_id);
[721] Fix | Delete
if ($page_breaks > 0) {
[722] Fix | Delete
$pb_result = self::load_current_inner_page_content($builder_data, $page_breaks);
[723] Fix | Delete
$builder_data = $pb_result['builder_data'];
[724] Fix | Delete
$template_args['pb_pagination'] = $pb_result['pagination'];
[725] Fix | Delete
$pb_result = null;
[726] Fix | Delete
}
[727] Fix | Delete
$template_args['builder_output'] = $builder_data;
[728] Fix | Delete
$template_args['builder_id'] = $post_id;
[729] Fix | Delete
global $ThemifyBuilder;
[730] Fix | Delete
$isLoop=self::$is_loop===true || $ThemifyBuilder->in_the_loop === true;
[731] Fix | Delete
$template = $isLoop ? 'builder-layout-part-output.php' : 'builder-output.php';
[732] Fix | Delete
self::$is_rendering = true;
[733] Fix | Delete
$builder_output = Themify_Builder_Component_Module::retrieve_template($template, $template_args, THEMIFY_BUILDER_TEMPLATES_DIR, '', false);
[734] Fix | Delete
self::$is_rendering = false;
[735] Fix | Delete
if (strpos($builder_output, 'module_row') !== false) {
[736] Fix | Delete
do_action('themify_builder_before_template_content_render');
[737] Fix | Delete
}
[738] Fix | Delete
if ($isLoop === false) {
[739] Fix | Delete
Themify_Builder_Stylesheet::enqueue_stylesheet(false, $post_id);
[740] Fix | Delete
}
[741] Fix | Delete
Themify_Builder::get_builder_stylesheet($builder_output);
[742] Fix | Delete
[743] Fix | Delete
/* render finished, make the Builder content of this particular post available to be rendered again */
[744] Fix | Delete
array_pop(self::$post_ids);
[745] Fix | Delete
}
[746] Fix | Delete
/* if $content parameter is empty, simply return the builder output, no need to replace anything */
[747] Fix | Delete
if ($content === '') {
[748] Fix | Delete
return $builder_output;
[749] Fix | Delete
}
[750] Fix | Delete
[751] Fix | Delete
/* find where Builder output should be injected to inside $content */
[752] Fix | Delete
// Start builder block replacement
[753] Fix | Delete
if (Themify_Builder_Model::is_gutenberg_active() && Themify_Builder_Gutenberg::has_builder_block($content)) {
[754] Fix | Delete
$content = ThemifyBuilder_Data_Manager::update_static_content_string('', $content); // remove static content tag
[755] Fix | Delete
$content = Themify_Builder_Gutenberg::replace_builder_block_tag($builder_output, $content);
[756] Fix | Delete
}
[757] Fix | Delete
elseif (ThemifyBuilder_Data_Manager::has_static_content($content)) {
[758] Fix | Delete
$content = ThemifyBuilder_Data_Manager::update_static_content_string($builder_output, $content);
[759] Fix | Delete
}
[760] Fix | Delete
else {
[761] Fix | Delete
$display_position = apply_filters('themify_builder_display_position', 'below', $post_id);
[762] Fix | Delete
if ('above' === $display_position) {
[763] Fix | Delete
$content = $builder_output . $content;
[764] Fix | Delete
} else {
[765] Fix | Delete
$content .= $builder_output;
[766] Fix | Delete
}
[767] Fix | Delete
}
[768] Fix | Delete
}
[769] Fix | Delete
[770] Fix | Delete
return $content;
[771] Fix | Delete
}
[772] Fix | Delete
[773] Fix | Delete
/**
[774] Fix | Delete
* Load stylesheet for Builder if necessary.
[775] Fix | Delete
*/
[776] Fix | Delete
public static function get_builder_stylesheet(string $builder_output,bool $force = false) {
[777] Fix | Delete
/* in RSS feeds and REST API endpoints, do not output the scripts */
[778] Fix | Delete
if (self::$frontedit_active === true || is_feed() || themify_is_rest() || (isset($_GET['tf-scroll']) && $_GET['tf-scroll'] === 'yes' && themify_is_ajax())) {
[779] Fix | Delete
return '';
[780] Fix | Delete
}
[781] Fix | Delete
static $is = null;
[782] Fix | Delete
if ($is === null && ($force === true || Themify_Builder_Model::is_front_builder_activate() || strpos($builder_output, 'module_row') !== false )) { // check if builder has any content
[783] Fix | Delete
$is = true;
[784] Fix | Delete
Themify_Enqueue_Assets::addPreLoadJs(THEMIFY_BUILDER_URI . '/js/themify-builder-script.js', THEMIFY_VERSION);
[785] Fix | Delete
if (!themify_is_themify_theme() || !Themify_Enqueue_Assets::addCssToFile('builder-styles-css', THEMIFY_BUILDER_URI . '/css/themify-builder-style.css', THEMIFY_VERSION, 'themify_common')) {
[786] Fix | Delete
themify_enque_style('builder-styles-css', THEMIFY_BUILDER_URI . '/css/themify-builder-style.css', null, THEMIFY_VERSION);
[787] Fix | Delete
}
[788] Fix | Delete
if (is_rtl() && !Themify_Enqueue_Assets::addCssToFile('builder-styles-rtl', THEMIFY_BUILDER_URI . '/css/themify-builder-style-rtl.css', THEMIFY_VERSION, 'builder-styles-css')) {
[789] Fix | Delete
themify_enque_style('builder-styles-rtl', THEMIFY_BUILDER_URI . '/css/themify-builder-style-rtl.css', null, THEMIFY_VERSION);
[790] Fix | Delete
}
[791] Fix | Delete
Themify_Enqueue_Assets::addLocalization('done', 'tb_style', true);
[792] Fix | Delete
}
[793] Fix | Delete
return '';
[794] Fix | Delete
}
[795] Fix | Delete
[796] Fix | Delete
[797] Fix | Delete
[798] Fix | Delete
/**
[799] Fix | Delete
* Check Builder can edit current post or not
[800] Fix | Delete
*/
[801] Fix | Delete
public static function builder_is_available():?int {
[802] Fix | Delete
$is = true;
[803] Fix | Delete
$post_id = null;
[804] Fix | Delete
if (themify_is_shop()) {
[805] Fix | Delete
$post_id = themify_shop_pageId();
[806] Fix | Delete
} elseif (!is_archive() && !is_home() && !is_search() && !is_404()) {
[807] Fix | Delete
$p = get_queried_object(); //get_the_ID can back wrong post id
[808] Fix | Delete
$post_id = isset($p->ID) ? $p->ID : null;
[809] Fix | Delete
unset($p);
[810] Fix | Delete
} else {
[811] Fix | Delete
$is = false;
[812] Fix | Delete
}
[813] Fix | Delete
if (!empty($post_id)) {
[814] Fix | Delete
$is = Themify_Builder_Model::is_frontend_editor_page($post_id);
[815] Fix | Delete
if ($is === true) {
[816] Fix | Delete
$is = !Themify_Builder_Model::is_builder_disabled_for_post_type(get_post_type($post_id));
[817] Fix | Delete
}
[818] Fix | Delete
}
[819] Fix | Delete
$is = apply_filters('themify_builder_admin_bar_is_available', $is);
[820] Fix | Delete
return $is === true ? $post_id : null;
[821] Fix | Delete
}
[822] Fix | Delete
[823] Fix | Delete
[824] Fix | Delete
/**
[825] Fix | Delete
* Add Builder body class
[826] Fix | Delete
*/
[827] Fix | Delete
public static function body_class(array $classes):array {
[828] Fix | Delete
if (Themify_Builder_Model::is_frontend_editor_page()) {
[829] Fix | Delete
if (Themify_Builder_Model::is_front_builder_activate()) {
[830] Fix | Delete
$classes[] = 'themify_builder_active builder-breakpoint-desktop';
[831] Fix | Delete
}
[832] Fix | Delete
if (Themify_Global_Styles::$isGlobalEditPage === true) {
[833] Fix | Delete
$classes[] = 'gs_post';
[834] Fix | Delete
}
[835] Fix | Delete
}
[836] Fix | Delete
if (Themify_Builder_Model::is_animation_active()) {
[837] Fix | Delete
$classes[] = 'tb_animation_on';
[838] Fix | Delete
}
[839] Fix | Delete
return apply_filters('themify_builder_body_class', $classes);
[840] Fix | Delete
}
[841] Fix | Delete
[842] Fix | Delete
public static function inline_css():void {
[843] Fix | Delete
$is_animation = Themify_Builder_Model::is_animation_active();
[844] Fix | Delete
$is_parallax = Themify_Builder_Model::is_parallax_active();
[845] Fix | Delete
$is_lax = Themify_Builder_Model::is_scroll_effect_active();
[846] Fix | Delete
$is_sticky = Themify_Builder_Model::is_sticky_scroll_active();
[847] Fix | Delete
$is_builder_active = Themify_Builder_Model::is_front_builder_activate();
[848] Fix | Delete
$bp = themify_get_breakpoints();
[849] Fix | Delete
$mobile = $bp['mobile'];
[850] Fix | Delete
$tablet = $bp['tablet'][1];
[851] Fix | Delete
$st = $noscript = '';
[852] Fix | Delete
if ($is_animation !== false) {
[853] Fix | Delete
$st = '.tb_animation_on{overflow-x:hidden}.themify_builder .wow{visibility:hidden;animation-fill-mode:both}[data-tf-animation]{will-change:transform,opacity,visibility}';
[854] Fix | Delete
if ($is_animation === 'm') {
[855] Fix | Delete
$st = '@media(min-width:' . $tablet . 'px){' . $st . '}';
[856] Fix | Delete
}
[857] Fix | Delete
if ($is_builder_active === true) {
[858] Fix | Delete
$st .= '.hover-wow.tb_hover_animate{animation-delay:initial!important}';
[859] Fix | Delete
} else {
[860] Fix | Delete
$noscript = '.themify_builder .wow,.wow .tf_lazy{visibility:visible!important}';
[861] Fix | Delete
}
[862] Fix | Delete
}
[863] Fix | Delete
if ($is_parallax !== true) {
[864] Fix | Delete
$p = '.themify_builder .builder-parallax-scrolling{background-position-y:0!important}';
[865] Fix | Delete
if ($is_parallax === 'm') {
[866] Fix | Delete
$p = '@media(max-width:' . $tablet . 'px){' . $p . '}';
[867] Fix | Delete
}
[868] Fix | Delete
$st .= $p;
[869] Fix | Delete
}
[870] Fix | Delete
if ($is_lax !== false) {
[871] Fix | Delete
$p = '.themify_builder .tf_lax_done{transition-duration:.8s;transition-timing-function:cubic-bezier(.165,.84,.44,1)}';
[872] Fix | Delete
if ($is_lax === 'm') {
[873] Fix | Delete
$p = '@media(min-width:' . $tablet . 'px){' . $p . '}';
[874] Fix | Delete
$p .= '@media(max-width:' . ($tablet + 2) . 'px){.themify_builder .tf_lax_done{opacity:unset!important;transform:unset!important;filter:unset!important}}';
[875] Fix | Delete
}
[876] Fix | Delete
$st .= $p;
[877] Fix | Delete
}
[878] Fix | Delete
if ($is_sticky !== false) {
[879] Fix | Delete
$p = '[data-sticky-active].tb_sticky_scroll_active{z-index:1}[data-sticky-active].tb_sticky_scroll_active .hide-on-stick{display:none}';
[880] Fix | Delete
if ($is_sticky === 'm') {
[881] Fix | Delete
$p = '@media(min-width:' . $tablet . 'px){' . $p . '}';
[882] Fix | Delete
}
[883] Fix | Delete
$st .= $p;
[884] Fix | Delete
}
[885] Fix | Delete
$bp = array('desktop' => ($bp['tablet_landscape'][1] + 1)) + $bp;
[886] Fix | Delete
$visiblity_st = '';
[887] Fix | Delete
$p = $is_builder_active === true ? 'display:none!important' : 'width:0!important;height:0!important;padding:0!important;visibility:hidden!important;margin:0!important;display:table-column!important;background:0!important;content-visibility:hidden;overflow:hidden!important';
[888] Fix | Delete
foreach ($bp as $k => $v) {
[889] Fix | Delete
$visiblity_st .= '@media(';
[890] Fix | Delete
if (is_array($v)) {
[891] Fix | Delete
$visiblity_st .= 'min-width:' . $v[0] . 'px) and (max-width:' . $v[1] . 'px)';
[892] Fix | Delete
} else {
[893] Fix | Delete
$visiblity_st .= $k === 'desktop' ? 'min' : 'max';
[894] Fix | Delete
$visiblity_st .= '-width:' . $v . 'px)';
[895] Fix | Delete
}
[896] Fix | Delete
$visiblity_st .= '{.hide-' . $k . '{' . $p . '}}';
[897] Fix | Delete
}
[898] Fix | Delete
unset($bp);
[899] Fix | Delete
$st .= $visiblity_st;
[900] Fix | Delete
$gutters = Themify_Builder_Model::get_gutters(false);
[901] Fix | Delete
if (!empty($gutters)) {
[902] Fix | Delete
$gutter_st = '';
[903] Fix | Delete
foreach ($gutters as $k => $v) {
[904] Fix | Delete
$gutter_st .= '--' . $k . ':' . $v . '%;';
[905] Fix | Delete
}
[906] Fix | Delete
if ($gutter_st !== '') {
[907] Fix | Delete
$st .= 'div.row_inner,div.module_subrow{' . $gutter_st . '}';
[908] Fix | Delete
}
[909] Fix | Delete
}
[910] Fix | Delete
$st .= '@media(max-width:' . $tablet . 'px){div.module-gallery-grid{--galn:var(--galt)}}';
[911] Fix | Delete
$st .= '@media(max-width:' . $mobile . 'px){
[912] Fix | Delete
.themify_map.tf_map_loaded{width:100%!important}
[913] Fix | Delete
.ui.builder_button,.ui.nav li a{padding:.525em 1.15em}
[914] Fix | Delete
.fullheight>.row_inner:not(.tb_col_count_1){min-height:0}
[915] Fix | Delete
div.module-gallery-grid{--galn:var(--galm);gap:8px}
[916] Fix | Delete
}';
[917] Fix | Delete
echo '<style id="tb_inline_styles" data-no-optimize="1">', $st, '</style>';
[918] Fix | Delete
[919] Fix | Delete
if ($noscript !== '') {
[920] Fix | Delete
echo '<noscript><style>', $noscript, '</style></noscript>';
[921] Fix | Delete
}
[922] Fix | Delete
}
[923] Fix | Delete
[924] Fix | Delete
/**
[925] Fix | Delete
* Reset builder query
[926] Fix | Delete
* @param $action
[927] Fix | Delete
*/
[928] Fix | Delete
public static function reset_builder_query(string $action = 'reset'):void {
[929] Fix | Delete
if ('reset' === $action) {
[930] Fix | Delete
remove_filter('the_content', array(__CLASS__, 'builder_show_on_front'), 11);
[931] Fix | Delete
} elseif ('restore' === $action) {
[932] Fix | Delete
add_filter('the_content', array(__CLASS__, 'builder_show_on_front'), 11);
[933] Fix | Delete
}
[934] Fix | Delete
}
[935] Fix | Delete
[936] Fix | Delete
[937] Fix | Delete
/**
[938] Fix | Delete
* Load content of only current inner page
[939] Fix | Delete
* @param $builder_data
[940] Fix | Delete
* @param $page_breaks count of page break modules
[941] Fix | Delete
* @return array
[942] Fix | Delete
*/
[943] Fix | Delete
public static function load_current_inner_page_content(array $builder_data,int $page_breaks):array {
[944] Fix | Delete
$p = !empty($_GET['tb-page']) ? (int) $_GET['tb-page'] : 1;
[945] Fix | Delete
$temp_data = array();
[946] Fix | Delete
$page_num = 1;
[947] Fix | Delete
foreach ($builder_data as $row) {
[948] Fix | Delete
if (isset($row['styling']['custom_css_row']) && strpos($row['styling']['custom_css_row'], 'tb-page-break') !== false) {
[949] Fix | Delete
++$page_num;
[950] Fix | Delete
} else {
[951] Fix | Delete
$temp_data[$page_num][] = $row;
[952] Fix | Delete
}
[953] Fix | Delete
}
[954] Fix | Delete
unset($page_num);
[955] Fix | Delete
++$page_breaks;
[956] Fix | Delete
$p = ($p > $page_breaks || $p < 1) ? 1 : $p;
[957] Fix | Delete
return array(
[958] Fix | Delete
'pagination' => Themify_Builder_Component_Module::get_pagination('', '', 'tb-page', 0, $page_breaks, $p),
[959] Fix | Delete
'builder_data' => isset($temp_data[$p]) ? $temp_data[$p] : $builder_data
[960] Fix | Delete
);
[961] Fix | Delete
}
[962] Fix | Delete
[963] Fix | Delete
/**
[964] Fix | Delete
* Check builder content for page break module
[965] Fix | Delete
*/
[966] Fix | Delete
private static function count_page_break_modules(int $post_id):int {
[967] Fix | Delete
$data = ThemifyBuilder_Data_Manager::get_data($post_id, true);
[968] Fix | Delete
return preg_match_all('/"mod_name":"page-break"/', $data, $modules);
[969] Fix | Delete
}
[970] Fix | Delete
[971] Fix | Delete
[972] Fix | Delete
[973] Fix | Delete
/**
[974] Fix | Delete
* Actions to perform when login via Login module fails
[975] Fix | Delete
*
[976] Fix | Delete
* @since 4.5.4
[977] Fix | Delete
*/
[978] Fix | Delete
public static function wp_login_failed($username) {
[979] Fix | Delete
if (isset($_SERVER['HTTP_REFERER'])) {
[980] Fix | Delete
$referrer = $_SERVER['HTTP_REFERER']; // where did the post submission come from?
[981] Fix | Delete
// if there's a valid referrer, and it's not the default log-in screen
[982] Fix | Delete
if (isset($_POST['tb_login'], $_POST['tb_redirect_fail']) && (int) $_POST['tb_login'] === 1 && !empty($referrer) && !strstr($referrer, 'wp-login') && !strstr($referrer, 'wp-admin')) {
[983] Fix | Delete
nocache_headers();
[984] Fix | Delete
wp_safe_redirect($_POST['tb_redirect_fail']);
[985] Fix | Delete
exit;
[986] Fix | Delete
}
[987] Fix | Delete
}
[988] Fix | Delete
}
[989] Fix | Delete
[990] Fix | Delete
[991] Fix | Delete
[992] Fix | Delete
private static function plugins_compatibility() {
[993] Fix | Delete
$plugins = array(
[994] Fix | Delete
'autooptimize' => 'autoptimize/autoptimize.php',
[995] Fix | Delete
'bwpminify' => 'bwp-minify/bwp-minify.php',
[996] Fix | Delete
'cachepress' => 'sg-cachepress/sg-cachepress.php',
[997] Fix | Delete
'dokan' => 'dokan-pro/dokan-pro.php',
[998] Fix | Delete
'duplicateposts' => 'duplicate-post/duplicate-post.php',
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function