| Server IP : 146.59.209.152 / Your IP : 216.73.216.46 Web Server : Apache System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : infrafs ( 43850) PHP Version : 8.2.29 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/infrafs/bike/wp-content/plugins/colibri-page-builder/support/ |
Upload File : |
<?php
use function ExtendBuilder\array_get_value;
function colibriwp_fix_wp58_sidebar()
{
if (get_option('colibriwp_fix_wp58_sidebar')) {
return;
}
update_option('colibriwp_fix_wp58_sidebar', true);
$sidebars_widgets = wp_get_sidebars_widgets();
$first_block = array_get_value($sidebars_widgets, 'colibri-sidebar-1.0');
if ($first_block === 'block-2') {
$widget_block_option = get_option('widget_block', array());
if (isset($widget_block_option[2])) {
$widget_block_option[2] = array(
'content' => '<!-- wp:search {"showLabel":false,"buttonUseIcon":true} /-->'
);
update_option('widget_block', $widget_block_option);
}
}
}
add_action('admin_init', 'colibriwp_fix_wp58_sidebar');
add_action('colibri_page_builder/activated', 'colibriwp_fix_wp58_sidebar');