R9023443
ve_rewrite_rules’); /** * Flush rewrite rules on plugin deactivation. * * @since 1.2.0 */ function disable_embeds_flush_rewrite_rules() { remove_filter(‘rewrite_rules_array’, ‘disable_embeds_rewrites’); flush_rewrite_rules(); } register_deactivation_hook(__FILE__, ‘disable_embeds_flush_rewrite_rules’); /** * Caozhuti Custom function for get an option */ if (!function_exists(‘_cao’)) { function _cao($option = ”, $default = null) { $options = get_option(‘_caozhuti_options’); // Attention: Set your unique id of the framework return (isset($options[$option])) ? $options[$option] : $default; } } function curlPost($url = ”, $postData = ”, $options = array()) { if (is_array($postData)) { $postData = http_build_query($postData); } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_TIMEOUT, 30); //设置cURL允许执行的最长秒数 if (!empty($options)) { curl_setopt_array($ch, $options); } //https请求 不验证证书和host curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $data = curl_exec($ch); curl_close($ch); return $data; }
