array( 'active' => isset( $_POST['statifyblacklist']['referer']['active'] ) ? (int) $_POST['statifyblacklist']['referer']['active'] : 0, 'cron' => isset( $_POST['statifyblacklist']['referer']['cron'] ) ? (int) $_POST['statifyblacklist']['referer']['cron'] : 0, 'regexp' => isset( $_POST['statifyblacklist']['referer']['regexp'] ) ? (int) $_POST['statifyblacklist']['referer']['regexp'] : 0, 'blacklist' => array_flip( $referer ), ), 'target' => array( 'active' => isset( $_POST['statifyblacklist']['target']['active'] ) ? (int) $_POST['statifyblacklist']['target']['active'] : 0, 'cron' => isset( $_POST['statifyblacklist']['target']['cron'] ) ? (int) $_POST['statifyblacklist']['target']['cron'] : 0, 'regexp' => isset( $_POST['statifyblacklist']['target']['regexp'] ) ? (int) $_POST['statifyblacklist']['target']['regexp'] : 0, 'blacklist' => array_flip( $target ), ), 'ip' => array( 'active' => isset( $_POST['statifyblacklist']['ip']['active'] ) ? (int) $_POST['statifyblacklist']['ip']['active'] : 0, 'blacklist' => $ip, ), 'version' => StatifyBlacklist::VERSION_MAIN, ) ); // Generate messages. if ( false !== $statifyblacklist_update_result ) { if ( array_key_exists( 'referer', $statifyblacklist_update_result ) ) { $statifyblacklist_post_warning = __( 'Some URLs are invalid and have been sanitized.', 'statify-blacklist' ); } elseif ( array_key_exists( 'ip', $statifyblacklist_update_result ) ) { // translators: List of invalid IP addresses (comma separated). $statifyblacklist_post_warning = sprintf( __( 'Some IPs are invalid : %s', 'statify-blacklist' ), implode( ', ', $statifyblacklist_update_result['ip'] ) ); } } else { $statifyblacklist_post_success = __( 'Settings updated successfully.', 'statify-blacklist' ); } } // End if(). } // End if(). /* * Disable some code style rules that are impractical for textarea content: * * phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen * phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd */ ?>
'; esc_html_e( 'Statify plugin is not active.', 'statify-blacklist' ); print '
' .
esc_html( $statifyblacklist_post_warning );
print '
';
esc_html_e( 'Settings have not been saved yet.', 'statify-blacklist' );
print '
' . esc_html( $statifyblacklist_post_success ) . '