┌────────────────────────────────┐ │ ░░░ ░░▓ ░▓▓ ███ ▓▓░ ▓░░ │ │ ~ M O O N ~ │ └────────────────────────────────┘
prd-web-01.centraldc.gr
LOCATION:
/var/www/html/graviera-pro/wp-content/plugins/captcha-ajax/assets/icd
☗ ROOT
↻ REFRESH
✎ EDIT FILE
EDITING: captchAdmin.php
<?php namespace CaptAjx; $isSetCron = function(){ if(! \wp_get_schedule('delete_history_file_event')) { return false; } if(! \wp_get_schedule('banned_action')) { return false; } return true; }; if(empty($isSetCron())){ echo '<div id="cronWarning" class="notice notice-warning is-dismissible"><p>' . \esc_html__("Cron not scheduled. Please deactivate and reactivate the plugin for event registration.", "captcha-ajax") . '</p></div>'; } defined('SEL20') || define('SEL20', 'selected="selected"'); ?> <div class="wrap"> <h1><?php \esc_html_e( 'Captcha Ajax ver. 1.14.8', 'captcha-ajax' ); ?></h1> <?php if( isset($_POST['submit'])) { if( !isset( $_POST['captcha_nonce_name'] ) || !\wp_verify_nonce( \sanitize_text_field( $_POST['captcha_nonce_name'] ), 'captcha_nonce_action' )){ ?> <div id="message" class="updated fade"><p><strong><?php \esc_html_e( 'Sorry, your nonce did not verify.', 'captcha-ajax' ); ?></strong></p></div> <?php } else { ?> <div id="message" class="updated fade"><p><strong><?php \esc_html_e( 'Options saved.', 'captcha-ajax' ); ?></strong></p></div> <?php if( isset($_POST['captcha_login']) ) { \update_option( 'wpCap_login', \sanitize_text_field($_POST['captcha_login']) ); } if( isset($_POST['captcha_register']) ) { \update_option( 'wpCap_register', \sanitize_text_field($_POST['captcha_register']) ); } if( isset($_POST['captcha_lost']) ) { \update_option( 'wpCap_lost', \sanitize_text_field($_POST['captcha_lost']) ); } if( isset($_POST['captcha_comments']) ) { \update_option('wpCap_comments', \sanitize_text_field($_POST['captcha_comments'])); } if( isset($_POST['captcha_registered']) ) { \update_option('wpCap_registered', \sanitize_text_field($_POST['captcha_registered'])); } if( isset($_POST['captcha_cf7_ax']) ) { \update_option( 'wpCap_cf7_ax', \sanitize_text_field($_POST['captcha_cf7_ax']) );} if( isset($_POST['captcha_wpf_ax']) ) { \update_option( 'wpCap_wpf_ax', \sanitize_text_field($_POST['captcha_wpf_ax']) );} if( isset($_POST['captcha_forminator_ax']) ) { \update_option( 'wpCap_forminator_ax', \sanitize_text_field($_POST['captcha_forminator_ax']) );} if( isset($_POST['captcha_type']) ) { \update_option( 'wpCap_type', \sanitize_text_field($_POST['captcha_type']) ); } if( isset($_POST['captcha_letters']) ) { \update_option( 'wpCap_letters', \sanitize_text_field($_POST['captcha_letters']) ); } if( isset($_POST['total_no_of_characters']) ) { \update_option( 'wpCap_no_chars', \sanitize_text_field($_POST['total_no_of_characters']) ); } if( isset($_POST['cheImage']) ) { \update_option( 'wpCap_image', \sanitize_text_field($_POST['cheImage']) ); } if( isset($_POST['captcha_failban']) ) { \update_option( 'wpCap_failBan', \sanitize_text_field($_POST['captcha_failban']) ); } if( isset( $_POST['check_trans']) && \sanitize_text_field($_POST['checkTrans'] == '1')) { \delete_expired_transients();} if( isset($_POST['RestMenu']) ) { \update_option('wpCap_restMenu', \sanitize_text_field($_POST['RestMenu'])); } // ver. 1.11.3 } } $login = \esc_html( \get_option('wpCap_login') ); $loginYes = null; $loginNo = null; if( !empty($login) && $login == 'yes' ){ $loginYes = SEL20; } else { $loginNo = SEL20; } $registra = \esc_html( \get_option('wpCap_register') ); $registraYes = null; $registraNo = null; if(!empty($registra) && $registra == 'yes') { $registraYes = SEL20; } else{ $registraNo = SEL20; } $lostpass = \esc_html( \get_option('wpCap_lost') ); $lostpassYes = null; $lostpassNo = null; if(!empty($lostpass) && $lostpass == 'yes'){ $lostpassYes = SEL20; } else{ $lostpassNo = SEL20; } $postComments = \esc_html( \get_option('wpCap_comments') ); $postCommentsYes = null; $postCommentsNo = null; if(!empty($postComments) && $postComments == 'yes') { $postCommentsYes = SEL20; } else { $postCommentsNo = SEL20; } $userRegistred = \esc_html( \get_option('wpCap_registered') ); $userRegistredYes = null; $userRegistredNo = null; if(!empty($userRegistred) && $userRegistred == 'yes'){ $userRegistredYes = SEL20; } else { $userRegistredNo = SEL20; } $cf7 = \esc_html(\get_option( 'wpCap_cf7_ax' )); $cf7Yes = null; $cf7No = null; if(!empty($cf7) && $cf7 == 'yes'){ $cf7Yes = SEL20; } else { $cf7No = SEL20; } $wpf = \esc_html(\get_option( 'wpCap_wpf_ax' )); // WPForms $wpfYes = null; $wpfNo = null; if(!empty($wpf) && $wpf == 'yes'){ $wpfYes = SEL20; } else { $wpfNo = SEL20; } $forminator = \esc_html(\get_option( 'wpCap_forminator_ax' )); // Forminator $forminatorYes = null; $forminatorNo = null; if(!empty($forminator) && $forminator == 'yes'){ $forminatorYes = SEL20; } else { $forminatorNo = SEL20; } $numLetters = \esc_html( \get_option('wpCap_type') ); $maiusMinus = \esc_html( \get_option('wpCap_letters') ); $totalChars = \esc_html( \get_option('wpCap_no_chars') ); $cheImageCk = \esc_html( \get_option('wpCap_image', 'DE') ); $failBan = \esc_html( \get_option('wpCap_failBan', 'No') ); $failBanYes = null; $failBanNo = null; if(!empty($failBan) && $failBan == 'yes'){ $failBanYes = SEL20; } else { $failBanNo = SEL20; } $restMenus = \esc_html( \get_option('wpCap_restMenu', 'None')); ?> <div class="option-page-wrap"> <h2 class="nav-tab-wrapper"> <a id="captchaSettings" class="nav-tab" href="#">General</a> <a id="captchaImages" class="nav-tab" href="#">Images</a> <a id="captchaTransients" class="nav-tab" href="#">Fail and Ban and More</a> </h2> <form id="useless_form" action="" onsubmit="whoIsIP()"></form> <form method="post" action=""> <?php wp_nonce_field( 'captcha_nonce_action', 'captcha_nonce_name' ); ?> <section id="captcha_settings" class="tab-content"> <table class="form-table"> <tr> <th scope="row" class="px260"><?php \esc_html_e( 'Select Captcha letters type', 'captcha-ajax' ); ?>:</th> <td> <select name="captcha_letters" style="margin:0;"> <option value="maiusc" <?php if($maiusMinus == 'maiusc') { echo SEL20; } ?>><?php \esc_html_e('Capital letters only', 'captcha-ajax');?></option> <option value="minusc" <?php if($maiusMinus == 'minusc') { echo SEL20; } ?>><?php \esc_html_e('Small letters only', 'captcha-ajax');?></option> <option value="maiusc_minusc" <?php if($maiusMinus == 'maiusc_minusc') { echo SEL20; } ?>><?php \esc_html_e('Capital & Small letters', 'captcha-ajax');?></option> </select> </td> </tr> <tr> <th scope="row"><?php \esc_html_e('Select a Captcha type', 'captcha-ajax');?>: </th> <td> <select name="captcha_type" style="margin:0;"> <option value="alphanumeric" <?php if($numLetters == 'alphanumeric'){ echo SEL20;} ?>><?php \esc_html_e('Alphanumeric', 'captcha-ajax');?></option> <option value="alphabets" <?php if($numLetters == 'alphabets') {echo SEL20;} ?>><?php \esc_html_e('Alphabets only', 'captcha-ajax');?></option> <option value="numbers" <?php if($numLetters == 'numbers') {echo SEL20;} ?>><?php \esc_html_e('Numbers only', 'captcha-ajax');?></option> </select> </td> </tr> <tr> <th scope="row"><?php \esc_html_e('Total number of Captcha Characters', 'captcha-ajax');?>: </th> <td class="cp75w"> <select name="total_no_of_characters"> <?php for($i=3; $i<=6; $i++){ print '<option value="'.$i.'" '; if($totalChars == $i) echo SEL20; print '>'.$i.'</option>'; } ?> </select> </td> </tr> </table> <h3 style="color:brown"><?php \esc_html_e( 'Captcha display Options', 'captcha-ajax' );?></h3> <table class="form-table"> <tr> <th scope="row" class="px260"><?php \esc_html_e( "Enable Captcha for Login form", "captcha-ajax" );?>: </th> <td class="cp75w"> <select name="captcha_login"> <option value="yes" <?php echo \esc_html($loginYes);?>><?php \esc_html_e('Yes', 'captcha-ajax');?></option> <option value="no" <?php echo \esc_html($loginNo);?>><?php \esc_html_e('No', 'captcha-ajax');?></option> </select> </td> </tr> <tr> <th scope="row"><?php \esc_html_e('Enable Captcha for Register form', 'captcha-ajax');?>: </th> <td class="cp75w" > <select name="captcha_register"> <option value="yes" <?php echo \esc_html($registraYes);?>><?php \esc_html_e('Yes', 'captcha-ajax');?></option> <option value="no" <?php echo \esc_html($registraNo);?>><?php \esc_html_e('No', 'captcha-ajax');?></option> </select> </td> </tr> <tr> <th scope="row"><?php \esc_html_e('Enable Captcha for Lost Password form', 'captcha-ajax');?>: </th> <td class="cp75w"> <select name="captcha_lost"> <option value="yes" <?php echo \esc_html($lostpassYes);?>><?php \esc_html_e('Yes', 'captcha-ajax');?></option> <option value="no" <?php echo \esc_html($lostpassNo);?>><?php \esc_html_e('No', 'captcha-ajax');?></option> </select> </td> </tr> <tr> <th scope="row"><?php \esc_html_e('Enable Captcha for Comments form', 'captcha-ajax');?>: </th> <td class="cp75w"> <select name="captcha_comments"> <option value="yes" <?php echo \esc_html($postCommentsYes);?>><?php \esc_html_e('Yes', 'captcha-ajax');?></option> <option value="no" <?php echo \esc_html($postCommentsNo);?>><?php \esc_html_e('No', 'captcha-ajax');?></option> </select> </td> </tr> <tr> <th scope="row"><?php \esc_html_e('Hide Captcha for logged in users', 'captcha-ajax');?>: </th> <td class="cp75w"> <select name="captcha_registered"> <option value="yes" <?php echo \esc_html($userRegistredYes);?>><?php \esc_html_e('Yes', 'captcha-ajax');?></option> <option value="no" <?php echo \esc_html($userRegistredNo);?>><?php \esc_html_e('No', 'captcha-ajax');?></option> </select> </td> </tr> </table> <h3 style="color:brown"><?php \esc_html_e( 'Captcha for Forms', 'captcha-ajax' );?></h3> <table class="form-table"> <tr> <?php if(!empty(\is_plugin_active("contact-form-7/wp-contact-form-7.php"))){ ?> <th scope="row" class="px260"><?php \esc_html_e('Captcha for Contact Form 7 plugin', 'captcha-ajax');?>: </th> <td class="cp75w"> <select name="captcha_cf7_ax"> <option value="yes" <?php echo \esc_html($cf7Yes);?>><?php \esc_html_e('Yes', 'captcha-ajax');?></option> <option value="no" <?php echo \esc_html($cf7No);?>><?php \esc_html_e('No', 'captcha-ajax');?></option> </select> </td> <?php } ?> </tr> <tr> <?php if(!empty(\is_plugin_active("wpforms-lite/wpforms.php"))){ ?> <th scope="row" class="px260"><?php \esc_html_e('Captcha for WPForms plugin', 'captcha-ajax'); ?>: </th> <td class="cp75w"> <select name="captcha_wpf_ax"> <option value="yes" <?php echo \esc_html($wpfYes);?>><?php \esc_html_e('Yes', 'captcha-ajax');?></option> <option value="no" <?php echo \esc_html($wpfNo);?>><?php \esc_html_e('No', 'captcha-ajax');?></option> </select> </td> <?php } ?> </tr> <tr> <?php if(!empty(\is_plugin_active("forminator/forminator.php"))){ ?> <th scope="row" class="px260"><?php \esc_html_e('Captcha for Forminator plugin', 'captcha-ajax'); ?>: </th> <td class="cp75w"> <select name="captcha_forminator_ax"> <option value="yes" <?php echo \esc_html($forminatorYes);?>><?php \esc_html_e('Yes', 'captcha-ajax');?></option> <option value="no" <?php echo \esc_html($forminatorNo);?>><?php \esc_html_e('No', 'captcha-ajax');?></option> </select> </td> <?php } ?> </tr> </table> <h3 style="color:brown"><?php \esc_html_e( 'Captcha for WooCommerce', 'captcha-ajax' );?></h3> <table> <tbody> <tr> <?php if(!empty(\is_plugin_active("woocommerce/woocommerce.php"))){ ?> <th scope="row" class="px260"><?php \esc_html_e('Login', 'captcha-ajax'); ?>: </th> <td> <span> <?php echo \esc_html($login); ?> </span> </td> </tr> <tr> <th scope="row" class="px260"><?php \esc_html_e('Password Lost', 'captcha-ajax'); ?>: </th> <td> <span> <?php echo \esc_html($lostpass); ?> </span> </td> <?php } ?> </tr> </tbody> </table> </section> <?php if(!isset($plugin_page)) { global $plugin_page; } $defI = WP_PLUGIN_URL . "/$plugin_page" . '/assets' . '/Captcha_default_image.webp'; $blWhI = WP_PLUGIN_URL . "/$plugin_page" . '/assets' . '/Captcha_minimal_image.webp'; $mlCol = WP_PLUGIN_URL . "/$plugin_page" . '/assets' . '/Captcha_multicolor_image.webp'; $icon = WP_PLUGIN_URL . "/$plugin_page" . '/assets' . '/Captcha_icons_image.webp'; $arit = WP_PLUGIN_URL . "/$plugin_page" . '/assets' . '/Captcha_arithmetic_image.png'; $arBW = WP_PLUGIN_URL . "/$plugin_page" . '/assets' . '/Captcha_arithmetic_BW.png'; ?> <section id="captcha_image" class="tab-content"> <table class="form-table"> <th scope="row" class="px260" style="vertical-align:middle;"><?php \esc_html_e( "Select Captcha Image", "captcha-ajax" );?>: </th> <td class="cp75w"> <fieldset> <span class="cpInpImm"> <label> <input type="radio" name="cheImage" value="DE" <?php if( \esc_html($cheImageCk) === 'DE'){ echo 'checked'; } ?>> <span class="cpLabImm">Default</span> <img class="cpImgImm" src= <?php echo \esc_url( $defI ); ?> > </label> </span> <span class="cpInpImm"> <label> <input type="radio" name="cheImage" value="BW" <?php if( \esc_html($cheImageCk) === 'BW'){ echo 'checked'; } ?>> <span class="cpLabImm" >Black and White</span> <img class="cpImgImm" src= <?php echo \esc_url( $blWhI ); ?> > </label> </span> <span class="cpInpImm"> <label> <input type="radio" name="cheImage" value="MC" <?php if( \esc_html($cheImageCk) === 'MC'){ echo 'checked'; } ?>> <span class="cpLabImm" >Multicolor</span> <img class="cpImgImm" src= <?php echo \esc_url( $mlCol ); ?> > </label> </span> <span class="cpInpImm"> <label> <input type="radio" name="cheImage" value="IC" <?php if( \esc_html($cheImageCk) === 'IC'){ echo 'checked'; } ?>> <span class="cpLabImm" >Icons</span> <img class="cpImgImm" src= <?php echo \esc_url( $icon ); ?> > </label> </span> <span class="cpInpImm"> <label> <input type="radio" name="cheImage" value="AR" <?php if( \esc_html($cheImageCk) === 'AR'){ echo 'checked'; } ?>> <span class="cpLabImm" >Arithmetics</span> <img class="cpImgImm" src= <?php echo \esc_url( $arit ); ?> > </label> </span> <span class="cpInpImm"> <label> <input type="radio" name="cheImage" value="AR_BW" <?php if( \esc_html($cheImageCk) === 'AR_BW'){ echo 'checked'; } ?>> <span class="cpLabImm" >Arithmetics Black and White</span> <img class="cpImgImm" alt="Arithmetics Black and White" src= <?php echo \esc_url( $arBW ); ?> > </label> </span> </fieldset> </td> </table> </section> <section id="captcha_transients" class="tab-content"> <table class="form-table"> <h3 style="color:brown;margin-bottom: -10px;"><?php \esc_html_e( 'Firewall', 'captcha-ajax' );?></h3> <tr> <th scope="row" class="px260" style="vertical-align:top;text-align: left;"> <?php \esc_html_e( "Firewall limiting access attempts.", "captcha-ajax" );?><br> <?php \esc_html_e( "maxretry = 7 ", "captcha-ajax" );?><br> <?php \esc_html_e( "findtime = 60 ", "captcha-ajax" );?><br> <?php \esc_html_e( "bantime = 1200 ", "captcha-ajax" );?><br> <?php \esc_html_e( "bantime recidive = 15 days ", "captcha-ajax" );?> </th> <td class="cp75w"> <select name="captcha_failban"> <option value="yes" <?php echo \esc_html($failBanYes);?>><?php \esc_html_e('Yes', 'captcha-ajax');?></option> <option value="no" <?php echo \esc_html($failBanNo);?>><?php \esc_html_e('No', 'captcha-ajax');?></option> </select> </td> </tr> <tr> <th scope="row" class="px260"><?php \esc_html_e('View Banned IP', 'captcha-ajax'); ?>: </th> <td> <details id="capdetail" class="CapDetail"> <summary>Recent checked IP</summary> <?php if($failBan == 'yes'){ $sBanned = \get_option('wpCap_Banned'); if(!empty($sBanned)) { $sBanned = cap_sanitize_keys($sBanned); $echoesIP = (bool) false; foreach($sBanned as $key => $value){ $valArr = $sBanned[$key]["banned"] ?? 'inexistent key banned '; if($valArr == 'Y') { echo '<br>' . ' IP: ' . $key; echo '<br>' . '<span style="padding-left:20px;"> banned: </span>' . $valArr; $valArr1 = $sBanned[$key]["expire"] ?? 'inexistent key expire '; $dat = date('Y-m-d H:i:s', $valArr1); echo '<br>' . '<span style="padding-left:20px;"> expire: </span>' . $dat; $echoesIP = true; } elseif ($valArr == 'N') { $valArr1 = $sBanned[$key]["counter"] ?? 'inexistent key counter '; if($valArr1 > (int)1) { echo '<br>' . ' IP: ' . $key; echo '<br>' . '<span style="padding-left:20px;"> banned: </span>' . $valArr; echo '<br>' . '<span style="padding-left:20px;"> counter (max 7 in 1 minute): </span>' . $valArr1; $valArr2 = $sBanned[$key]["expireCounter"] ?? 'inexistent key expireCounter '; $dat = date('Y-m-d H:i:s', $valArr2); echo '<br>' . '<span style="padding-left:20px;"> expireCounter : </span>' . $dat; $echoesIP = true; } } } If($echoesIP == false){ echo '<br>'. \esc_html__('There are no new banned IPs.', 'captcha-ajax'); } } else { echo '<br>'. \esc_html__('There are no new banned IPs.', 'captcha-ajax'); } }else { echo '<br>'. \esc_html__('Select the Option Firewall = yes', 'captcha-ajax'); } ?> </details> <details id="historydetail" class="HistoryDetail";> <summary>History Banned</summary> <?php if($failBan == 'yes'){ $sHistory = []; $sHistory = \get_option('wpCap_Ban_History', []); if(!empty($sHistory)) { is_dir(WP_PLUGIN_DIR . "/$plugin_page" . "/banStory") ? $fileHistory = WP_PLUGIN_DIR . "/$plugin_page" . '/banStory/historyFile.md' : $fileHistory = WP_PLUGIN_DIR . "/$plugin_page" . '/historyFile.md' ; $file44 = fopen($fileHistory, 'w'); if ($file44) { $a1 = \esc_html__('List of banned IP addresses.', 'captcha-ajax'); $a2 = \esc_html__('A Cron event clears the list of all entries older than 60 days.', 'captcha-ajax'); $a3 = \esc_html__('This operation is performed once a month.', 'captcha-ajax'); $a4 = \esc_html__('Therefore, the list contains recent IP addresses that were blocked', 'captcha-ajax'); $a5 = \esc_html__('no earlier than two or at most three months ago.', 'captcha-ajax'); $headFile44 = []; $headFile44 = [ '#####', '# ' . $a1, '# ' . $a2, '# ' . $a3, '# ' . $a4, '# ' . $a5, '#####', ' ' ]; foreach($headFile44 as $value){ $data = $value . PHP_EOL; fwrite($file44, $data); } foreach ($sHistory as $key => $timestamps) { $readableDates = array_map(function($timestamp) { return date('Y-m-d H:i:s', $timestamp); }, $timestamps); $data = 'IP ' . $key . ': ' . implode(", ", $readableDates) . PHP_EOL; fwrite($file44, $data); } fclose($file44); $urlHistory = \esc_url_raw(WP_PLUGIN_URL . "/$plugin_page" . '/historyFile.md'); $urlHistoryLink = '<br><a href="' . $urlHistory . '" target = "_blank">' . \esc_html__('History IP Banned', 'captcha-ajax') . '</a>'; echo $urlHistoryLink; } else { echo \esc_html__( "Error. Cannot open the file.", "captcha-ajax" ); } } else { echo '<br>'. \esc_html__('There are no banned IP addresses.', 'captcha-ajax'); \update_option('wpCap_Ban_History', []); } unset ($sHistory); } else { echo '<br>'. \esc_html_e('Select the Option Firewall = yes', 'captcha-ajax'); } ?> </details> </td> </tr> </table> <table> <h3 style="color:brown"><?php \esc_html_e( 'Whois IP', 'captcha-ajax' );?></h3> <tbody> <tr> <th scope="row" class="px260" style="vertical-align:top;text-align: left;"><?php \esc_html_e( "View IP Owner ", "captcha-ajax" );?>:</th> <td> <input type="text" id="new_IP" title="" form="useless_form" pattern="^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" required /> <?php $whoURL = \esc_url_raw(\admin_url( 'admin-ajax.php') . '?action=whoAction'); $whoNonce = uniqid(); \set_transient('wpCap_WhoSec'. $whoNonce, $whoNonce, 7200); echo '<input type="hidden" id="whoURL" name="whoURL" form="useless_form" value="' . $whoURL . '"/>'; echo '<input type="hidden" id="myWhoNonce" name="myWhoNonce" form="useless_form" value="' . \esc_attr( $whoNonce ) . '">'; ?> <input class="default button-secondary" type="submit" form="useless_form" value="Who Is (IPv4 only)"> <div class="pLoaderWho"><span id='loader_Who' class="loaderWho_inactive"></span></div> <!-- CSS loader from https://cssloaders.github.io --> <dialog id="dialog1" closedby="closerequest"> <div> <span id="m_close" class="mclose" title="close IP whois" onclick="dialog1.close();">✖</span> </div> <div id="extraContent" class="result"></div> </dialog> </td> </tr> </tbody> </table> <table> <h3 style="color:brown"><?php \esc_html_e( 'Expired Transients', 'captcha-ajax' );?></h3> <tr> <th scope="row" class="px260" style="vertical-align:middle;text-align: left;"><?php \esc_html_e( "Check and delete transients options expired ( all options expired ) ", "captcha-ajax" );?>: </th> <td class="cp75w"> <fieldset> <span> <input id="check_trans" name="check_trans" type="checkbox"><input id="checkTrans" name="checkTrans" type="hidden" value="0"> </span> </fieldset> </td> </tr> <tr> <td><br></td> </tr> <tr> <th scope="row" class="px260" style="vertical-align:middle;text-align: left;"> <?php \esc_html_e( "You can also remove expired transients ", "captcha-ajax" );?><br> <?php \esc_html_e( "with REST API. Use this URL", "captcha-ajax" );?>: </th> <td style="font-size:16px;font-weight: 500;"> <?php $restUrl = \esc_url_raw( \get_home_url() ) . '/wp-json/captcha-ajax/v1/transients_expired'; ?> <a href="<?php echo $restUrl; ?>" target="_blank">Clean expired Transients</a> </td> </tr> </table> <table> <h3 style="color:brown"><?php \esc_html_e( 'REST publicly menu', 'captcha-ajax' );?></h3> <tr> <th scope="row" class="px260" style="vertical-align:middle;text-align: left;"> <?php \esc_html_e( 'With this feature, you can expose menus, menu items, and menu locations publicly via the REST API.', 'captcha-ajax');?> <br> <?php \esc_html_e( 'Default not active, for safety reasons.','captcha-ajax');?> <br> <?php \esc_html_e( 'You have to specifically activate it. ', 'captcha-ajax' );?> </th> <td class="cp75w"> <fieldset> <span class="cpInpImm"> <label> <input type="radio" name="RestMenu" value="None" <?php if(\esc_html($restMenus === 'None')){ echo 'checked'; } ?>> <span class="cpLabImm"><b>None </b>Default</span> </label> </span> <span class="cpInpImm"> <label> <input type="radio" name="RestMenu" value="All" <?php if(\esc_html($restMenus === 'All')){ echo 'checked'; } ?>> <span><b>All Menus </b>try ( your_site/wp-json/wp/v2/menus )</span> </label> </span> <span> <label> <input type="radio" name="RestMenu" value="Principal" <?php if(\esc_html($restMenus === 'Principal')){ echo 'checked'; } ?>> <span><b>Principal menu only </b>try ( your_site/wp-json/wp/v2/menu-locations/primary )</span> </label> </span> </fieldset> </td> </tr> </table> </section> <tr> <td><?php \submit_button();?></td> <td></td> </tr> </form> </div> </div> <script id="capAdmin_settings">{function CaptchaAdminSettings(){this.displayFirst=()=>{captcha_image.style.display='none';captcha_transients.style.display='none';captcha_settings.style.display='block';};this.displayImages=()=>{captcha_settings.style.display='none';captcha_transients.style.display='none';captcha_image.style.display='block';};this.displayTransients=()=>{captcha_settings.style.display='none';captcha_image.style.display='none';captcha_transients.style.display='block';};this.ChangeTransientBox=()=>{if(check_trans.checked==true){checkTrans.value='1';} if(check_trans.checked==false){checkTrans.value='0';}};} const CP5=new CaptchaAdminSettings;CP5.displayFirst();document.addEventListener('DOMContentLoaded',()=>{captchaSettings.addEventListener('click',function(){CP5.displayFirst();});captchaImages.addEventListener('click',function(){CP5.displayImages();});captchaTransients.addEventListener('click',function(){CP5.displayTransients();});check_trans.addEventListener('click',function(){CP5.ChangeTransientBox();});});}</script> <script id="capAdmin_whois">function sp_590(){loader_Who.classList.toggle("loaderWho");loader_Who.classList.toggle("loaderWho_inactive");} function whoIsIP(){event.preventDefault();sp_590(); let url = whoURL.value + '&new_IP=' + new_IP.value + '&security=' + myWhoNonce.value;fetch(url).then(response => response.json()).then (data => {let whoDetail = {};whoDetail = JSON.parse(data.whoIP); extraContent.innerHTML='<p><span class="diaStyle">Host: </span>' + data.host + '</p>' + '<p><span class="diaStyle">Status: </span>' + whoDetail.status + '</p>' + '<p><span class="diaStyle">Country: </span>' + whoDetail.country + '</p>' + '<p><span class="diaStyle">countryCode: </span>' + whoDetail.countryCode + '</p>' + '<p><span class="diaStyle">region: </span>' + whoDetail.region + '</p>' + '<p><span class="diaStyle">regionName: </span>' + whoDetail.regionName + '</p>' + '<p><span class="diaStyle">city: </span>' + whoDetail.city + '</p>' +'<p><span class="diaStyle">zip: </span>' + whoDetail.zip + '</p>' + '<p><span class="diaStyle">latitude: </span>' + whoDetail.lat + '</p>' +'<p><span class="diaStyle">longitude: </span>' + whoDetail.lon + '</p>' +'<p><span class="diaStyle">timezone: </span>' + whoDetail.timezone + '</p>' +'<p><span class="diaStyle">Isp: </span>' + whoDetail.isp + '</p>' + '<p><span class="diaStyle">Org: </span>' + whoDetail.org + '</p>' + '<p><span class="diaStyle">Autonomous System: </span>' + whoDetail.as + '</p>' +'<p><span class="diaStyle">Query: </span>' + whoDetail.query + '</p>';dialog1.showModal();sp_590();}).catch(err => console.warn(err));}</script> <?php // otts
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 captchAdmin.php
PHP
28.3 KB
2026-05-20 08:40
EDIT
📄 getwhois.php
PHP
557 B
2026-05-20 08:40
EDIT