<?php
/**
* Handles Comment Post to WordPress and prevents duplicate comment posting.
*
* @package WordPress
*/
if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
$protocol = $_SERVER['SERVER_PROTOCOL'];
if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) {
$protocol = 'HTTP/1.0';
}
header( 'Allow: POST' );
header( "$protocol 405 Method Not Allowed" );
header( 'Content-Type: text/plain' );
exit;
}
/** Sets up the WordPress Environment. */
require __DIR__ . '/wp-load.php';
nocache_headers();
$comment = wp_handle_comment_submission( wp_unslash( $_POST ) );
if ( is_wp_error( $comment ) ) {
$data = (int) $comment->get_error_data();
if ( ! empty( $data ) ) {
wp_die(
'<p>' . $comment->get_error_message() . '</p>',
__( 'Comment Submission Failure' ),
array(
'response' => $data,
'back_link' => true,
)
);
} else {
exit;
}
}
$user = wp_get_current_user();
$cookies_consent = ( isset( $_POST['wp-comment-cookies-consent'] ) );
/**
* Fires after comment cookies are set.
*
* @since 3.4.0
* @since 4.9.6 The `$cookies_consent` parameter was added.
*
* @param WP_Comment $comment Comment object.
* @param WP_User $user Comment author's user object. The user may not exist.
* @param bool $cookies_consent Comment author's consent to store cookies.
*/
do_action( 'set_comment_cookies', $comment, $user, $cookies_consent );
$location = empty( $_POST['redirect_to'] ) ? get_comment_link( $comment ) : $_POST['redirect_to'] . '#comment-' . $comment->comment_ID;
// If user didn't consent to cookies, add specific query arguments to display the awaiting moderation message.
if ( ! $cookies_consent && 'unapproved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_author_email ) ) {
$location = add_query_arg(
array(
'unapproved' => $comment->comment_ID,
'moderation-hash' => wp_hash( $comment->comment_date_gmt ),
),
$location
);
}
/**
* Filters the location URI to send the commenter after posting.
*
* @since 2.0.5
*
* @param string $location The 'redirect_to' URI sent via $_POST.
* @param WP_Comment $comment Comment object.
*/
$location = apply_filters( 'comment_post_redirect', $location, $comment );
wp_safe_redirect( $location );
exit;
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| .tmb/ | 2026-11-26 08:02 | 21.4 KB | 76129f60960:kunden | dxwrxwrxwr | |
| wp-admin/ | 2026-10-22 10:47 | 9.14 MB | 76129f60960:kunden | dxwrx-rx-r | |
| wp-content/ | 2026-12-03 10:33 | 2.82 GB | 76129f60960:kunden | dxwrx-rx-r | |
| wp-includes/ | 2026-10-22 10:47 | 82.3 MB | 76129f60960:kunden | dxwrx-rx-r | |
| - Kopie [2].htaccess | 2014-06-22 18:10 | 370 B | 76129f60960:kunden | -xw-x----- | |
| - Kopie.htaccess | 2014-06-09 13:23 | 248 B | 76129f60960:kunden | -xw-x----- | |
| .htaccess | 2026-11-23 23:39 | 11.45 KB | 76129f60960:kunden | -xw-x----- | |
| .htaccess 2 | 2019-08-06 14:17 | 10.77 KB | 76129f60960:kunden | -xw-x----- | |
| .user.ini | 2024-08-09 12:44 | 0 B | 76129f60960:kunden | -xw-x----- | |
| android-icon-192x192.png | 2024-08-09 22:51 | 9.79 KB | 76129f60960:kunden | -xw-x----- | |
| apple-icon-114x114.png | 2024-08-09 22:51 | 5.41 KB | 76129f60960:kunden | -xw-x----- | |
| apple-icon-120x120.png | 2024-08-09 22:51 | 5.77 KB | 76129f60960:kunden | -xw-x----- | |
| apple-icon-144x144.png | 2024-08-09 22:51 | 7.04 KB | 76129f60960:kunden | -xw-x----- | |
| apple-icon-152x152.png | 2024-08-09 22:51 | 7.39 KB | 76129f60960:kunden | -xw-x----- | |
| apple-icon-180x180.png | 2024-08-09 22:51 | 9.1 KB | 76129f60960:kunden | -xw-x----- | |
| apple-icon-57x57.png | 2024-08-09 22:51 | 2.6 KB | 76129f60960:kunden | -xw-x----- | |
| apple-icon-60x60.png | 2024-08-09 22:51 | 2.67 KB | 76129f60960:kunden | -xw-x----- | |
| apple-icon-72x72.png | 2024-08-09 22:51 | 3.27 KB | 76129f60960:kunden | -xw-x----- | |
| apple-icon-76x76.png | 2024-08-09 22:51 | 3.46 KB | 76129f60960:kunden | -xw-x----- | |
| browserconfig.xml | 2022-09-28 15:25 | 281 B | 76129f60960:kunden | -xw-x----- | |
| favicon-16x16.png | 2024-08-09 22:51 | 606 B | 76129f60960:kunden | -xw-x----- | |
| favicon-256x256.png | 2024-08-09 22:51 | 12.22 KB | 76129f60960:kunden | -xw-x----- | |
| favicon-32x32.png | 2024-08-09 22:51 | 1.35 KB | 76129f60960:kunden | -xw-x----- | |
| favicon-96x96.png | 2024-08-09 22:51 | 4.5 KB | 76129f60960:kunden | -xw-x----- | |
| favicon.ico | 2024-08-09 22:51 | 1.12 KB | 76129f60960:kunden | -xw-x----- | |
| googlede7d90019e89a3ac.html | 2019-12-03 15:17 | 53 B | 76129f60960:kunden | -xw-x----- | |
| googlee3df9224049962ff.html | 2023-02-05 14:48 | 53 B | 76129f60960:kunden | -xw-x----- | |
| index.php | 2021-01-14 01:34 | 405 B | 76129f60960:kunden | -xw-x----- | |
| license.txt | 2026-11-19 22:47 | 19.44 KB | 76129f60960:kunden | -xw-x--x-- | |
| liesmich.html | 2026-11-19 22:47 | 8.42 KB | 76129f60960:kunden | -xw-x--x-- | |
| manifest.json | 2022-09-28 15:25 | 720 B | 76129f60960:kunden | -xw-x----- | |
| ms-icon-144x144.png | 2024-08-09 22:51 | 7.04 KB | 76129f60960:kunden | -xw-x----- | |
| ms-icon-150x150.png | 2024-08-09 22:51 | 7.27 KB | 76129f60960:kunden | -xw-x----- | |
| ms-icon-310x310.png | 2024-08-09 22:51 | 12.83 KB | 76129f60960:kunden | -xw-x----- | |
| ms-icon-70x70.png | 2024-08-09 22:51 | 3.17 KB | 76129f60960:kunden | -xw-x----- | |
| php-info.php | 2016-02-19 14:17 | 21 B | 76129f60960:kunden | -xw-x----- | |
| readme.html | 2026-11-19 22:47 | 7.23 KB | 76129f60960:kunden | -xw-x--x-- | |
| robots.txt | 2014-10-29 18:47 | 35 B | 76129f60960:kunden | -xw-x----- | |
| wp-activate.php | 2026-10-22 10:47 | 7.54 KB | 76129f60960:kunden | -xw-x--x-- | |
| wp-blog-header.php | 2021-01-14 01:34 | 351 B | 76129f60960:kunden | -xw-x----- | |
| wp-comments-post.php | 2023-09-21 23:24 | 2.27 KB | 76129f60960:kunden | -xw-x----- | |
| wp-config-sample.php | 2026-10-22 10:47 | 3.89 KB | 76129f60960:kunden | -xw-x--x-- | |
| wp-config.php | 2021-07-24 12:41 | 3.99 KB | 76129f60960:kunden | -xw-x----- | |
| wp-cron.php | 2026-10-22 10:47 | 5.49 KB | 76129f60960:kunden | -xw-x--x-- | |
| wp-links-opml.php | 2026-10-22 10:47 | 2.43 KB | 76129f60960:kunden | -xw-x--x-- | |
| wp-load.php | 2024-08-09 01:01 | 3.84 KB | 76129f60960:kunden | -xw-x----- | |
| wp-login.php | 2026-10-22 10:47 | 51.3 KB | 76129f60960:kunden | -xw-x--x-- | |
| wp-mail.php | 2026-10-22 10:47 | 8.52 KB | 76129f60960:kunden | -xw-x--x-- | |
| wp-settings.php | 2026-10-22 10:47 | 32.38 KB | 76129f60960:kunden | -xw-x--x-- | |
| wp-signup.php | 2026-11-19 21:55 | 34.27 KB | 76129f60960:kunden | -xw-x--x-- | |
| wp-trackback.php | 2026-10-22 10:47 | 5.27 KB | 76129f60960:kunden | -xw-x--x-- | |
| xmlrpc.php | 2026-10-22 10:47 | 3.13 KB | 76129f60960:kunden | -xw-x--x-- | |