PluginProbe ʕ •ᴥ•ʔ
SiteGuard WP Plugin / 1.2.3
SiteGuard WP Plugin v1.2.3
1.8.7 1.8.6 1.8.6-beta1 1.8.6-beta2 1.8.4 1.8.5 1.8.3 1.8.2 1.8.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.4.3 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.7.0 1.7.1 1.7.10 1.7.11 1.7.12 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.0-beta1 1.8.0-beta2 1.8.0-beta3 1.8.0-beta4
siteguard / admin / siteguard-menu-disable-pingback.php
siteguard / admin Last commit date
siteguard-login-history-table.php 11 years ago siteguard-menu-admin-filter.php 11 years ago siteguard-menu-captcha.php 11 years ago siteguard-menu-dashboard.php 11 years ago siteguard-menu-disable-pingback.php 11 years ago siteguard-menu-fail-once.php 11 years ago siteguard-menu-init.php 11 years ago siteguard-menu-login-alert.php 11 years ago siteguard-menu-login-lock.php 11 years ago siteguard-menu-rename-login.php 11 years ago siteguard-menu-same-error.php 11 years ago siteguard-menu-updates-notify.php 11 years ago siteguard-menu-waf-tuning-support.php 11 years ago siteguard-waf-exclude-rule-table.php 11 years ago
siteguard-menu-disable-pingback.php
90 lines
1 <?php
2
3 class SiteGuard_Menu_Disable_Pingback extends SiteGuard_Base {
4 function __construct( ) {
5 $this->render_page( );
6 }
7 function render_page( ) {
8 global $config;
9
10 $opt_name_feature = 'disable_pingback_enable';
11 $opt_val_feature = $config->get( $opt_name_feature );
12 if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-disable-pingback-submit' ) ) {
13 $error = false;
14 $errors = check_multisite( );
15 if ( is_wp_error( $errors ) ) {
16 echo '<div class="error settings-error"><p><strong>';
17 esc_html_e( $errors->get_error_message( ), 'siteguard' );
18 echo '</strong></p></div>';
19 $error = true;
20 }
21 if ( false == $error && false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
22 echo '<div class="error settings-error"><p><strong>';
23 esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
24 echo '</strong></p></div>';
25 $error = true;
26 }
27 if ( false == $error ) {
28 $opt_val_feature = $_POST[ $opt_name_feature ];
29 $config->set( $opt_name_feature, $opt_val_feature );
30 $config->update( );
31 ?>
32 <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
33 <?php
34 }
35 }
36
37 echo '<div class="wrap">';
38 echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
39 echo '<h2>' . esc_html__( 'Disable Pingback', 'siteguard' ) . '</h2>';
40 echo '<div class="siteguard-description">'
41 . esc_html__( 'You can find docs about this function on ', 'siteguard' )
42 . '<a href="' . esc_html__( 'http://www.jp-secure.com/cont/products/siteguard_wp_plugin/pingback_en.html', 'siteguard' )
43 . '" target="_blank">'
44 . esc_html__( 'here', 'siteguard' )
45 . '</a>'
46 . esc_html__( '.', 'siteguard' )
47 . '</div>';
48 ?>
49 <form name="form1" method="post" action="">
50
51 <table class="form-table">
52 <tr>
53 <th scope="row" colspan="2">
54 <ul class="siteguard-radios">
55 <li>
56 <input type="radio" name="<?php echo $opt_name_feature ?>" id="<?php echo $opt_name_feature.'_on' ?>" value="1" <?php echo ( '1' == $opt_val_feature ? 'checked' : '') ?> >
57 <label for="<?php echo $opt_name_feature.'_on' ?>"><?php echo esc_html_e( 'ON', 'siteguard' ) ?></label>
58 </li><li>
59 <input type="radio" name="<?php echo $opt_name_feature ?>" id="<?php echo $opt_name_feature.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_feature ? 'checked' : '') ?> >
60 <label for="<?php echo $opt_name_feature.'_off' ?>"><?php echo esc_html_e( 'OFF', 'siteguard' ) ?></label>
61 </li>
62 </ul>
63 <?php
64 $error = check_multisite( );
65 if ( is_wp_error( $error ) ) {
66 echo '<p class="description">';
67 echo $error->get_error_message( );
68 echo '</p>';
69 }
70 ?>
71 </th>
72 </tr>
73 </table>
74 <input type="hidden" name="update" value="Y">
75 <div class="siteguard-description">
76 <?php esc_html_e( 'The pingback function is disabled and its abuse is prevented.', 'siteguard' ) ?>
77 </div>
78 <hr />
79 <?php
80 wp_nonce_field( 'siteguard-menu-disable-pingback-submit' );
81 submit_button( );
82 ?>
83 </form>
84 </div>
85 <?php
86 }
87 }
88
89 ?>
90