function hocwp_phpmailer_init_change_info($phpmailer) { $data = hocwp_get_smtp_mail_data(); if (empty($data['mailer'])) { return; } if ('smtp' == $data['mailer'] && empty($data['smtp_host'])) { return; } $phpmailer->Mailer = $data['mailer']; if ((bool) $data['mail_set_return_path']) { $phpmailer->Sender = $phpmailer->From; } $phpmailer->SMTPSecure = $data['smtp_ssl'] == 'none' ? '' : $data['smtp_ssl']; if ('smtp' == $data['mailer']) { $phpmailer->Host = $data['smtp_host']; $phpmailer->Port = $data['smtp_port']; if (hocwp_string_to_bool($data['smtp_auth'])) { $phpmailer->SMTPAuth = true; $phpmailer->Username = $data['smtp_user']; $phpmailer->Password = $data['smtp_pass']; } } $phpmailer = apply_filters('hocwp_phpmailer', $phpmailer); }
function hocwp_compress_style_and_script_ajax_callback() { $result = array(); $type = hocwp_get_method_value('type'); $type = hocwp_json_string_to_array($type); $force_compress = hocwp_get_method_value('force_compress'); $force_compress = hocwp_string_to_bool($force_compress); $compress_core = hocwp_get_method_value('compress_core'); $compress_core = hocwp_string_to_bool($compress_core); $args = array('type' => $type, 'force_compress' => $force_compress, 'compress_core' => $compress_core); hocwp_compress_style_and_script($args); wp_send_json($result); }
function hocwp_wc_single_product_gallery_left() { $result = get_option('hocwp_single_product_gallery_left'); $result = hocwp_string_to_bool($result); return apply_filters('hocwp_wc_single_product_gallery_left', $result); }