'wordpress', 'widget_id' => get_option('hc_wid'), 'request_url' => $file_path, 'result_url' => admin_url('index.php').'?hc_action=delete_xml&xml='.$file_name, 'result' => 'success' ); if($json_arr){ echo json_encode($json_arr); }else{ echo json_encode(array('result'=>'success')); } die(); } break; case 'save_wid': update_option('hc_wid', $_GET['wid']); update_option('hc_access', $_GET['access']); echo $_GET['access']; die(); break; case 'delete_xml': if(isset($_GET['result']) && $_GET['result'] == 'success'){ $filename = HC_XML_PATH.'/'.$_GET['xml']; unlink($filename); return json_encode(array('result'=>'success')); }else{ return json_encode(array('result'=>'error')); } exit(); break; } } } add_action('init', 'hc_request_handler'); function hc_admin_head(){ ?> guid); $url = str_replace('https://','',str_replace('http://','',str_replace('www.','',str_replace($parse['host'], get_option('home'), $post->guid)))); ?>
guid); $url = str_replace($parse['scheme'].'://'.$parse['host'], get_option('home'), $post->guid); return ''.$comment_text.''; } // action function for above hook function hc_admin_page() { // добавления подменю в раздел Параметры add_options_page('HyperComments', 'HyperComments', 8, 'hypercomments', 'hc_options_page'); } // Отображает страницу для настроек function hc_options_page() { if( $_POST['hc_form_counter_sub'] == 'Y' ) { update_option( 'hc_selector', $_POST['hc_form_selector'] ); if(isset($_POST['hc_title_widget'])){ update_option( 'hc_title_widget', $_POST['hc_title_widget'] ); }else{ delete_option('hc_title_widget'); } echo 'Options saved
'.__('You must configure the plugin to enable HyperComments.', 'hypercomments').'